How to create Object Types for Vlocity Products

Product Object Types are to Vlocity what Record Types are to Salesforce Products but with additional features. They also define the hierarchy of Products and the layout shown for specific Products under it.

They are necessary to create Vlocity Products and need to be created prior.

Some information about Product Object Types in Vlocity

Technically speaking, the first Object Type under Product2 is the “Object Type” and every other under is considered a “Sub type” of that Object type. Complicated enough? Well consider this example:

  • Product2 (Object level)
    • Base (Object Type)
      • Computers (Sub Type)
        • Laptops (Sub Type)
        • Desktops (Sub Type)
      • Phones (Sub Type)
        • Smartphones (Sub Type)
        • Phones (Sub Type)

They are all Object Types under Product2. But in the system they are Object Types as far as Vlocity is concerned, one under another.

Setting up a new Product Object Type in Salesforce Industries

  1. From the Vlocity Product Designer, open the Power Launcher and open the Vlocity Objects and Object Types tab.
    If you can’t find the tab, Add the missing vlocity tabs to the Power launcher.
salesforce industries Product object types power launcher
  1. From the list view, open the Product2 Object
salesforce industries Product object types from Product2 Object

This will display the Object Types under Product2, details and the Layout.

Create a new “Base” Object type (first time setup)

I recommend create a “Base Object Type” under Product2 (which will inherit Product2 Layout), customize that layout with all the Fields (but not Attributes) you might need and then create every other Object Type under that Base. Every Object Type under it will inherit the Base’s layout.

Add or remove all the Salesforce Fields that you want to include in all Products in Product2 but not the Attributes. Add a Base Object and then add all the other Object Types under it.

A great thing about Object types is that they can inherit the layout of the parent above them.

  1. Click on the New Object Type button
salesforce industries Product object types New object type
  1. Add a name to your Base Object Type
salesforce industries Product object types general properties and effectivity
  1. Click on the magnifying glass icon in Parent Object Type. A pop up window will show a Lookup Search.
  2. Find Product2 and select it
salesforce industries Product object types Lookup search for parent object
  1. In the Effectivity section, check Active
  2. Fill the Effective From date (must be in the past if you want this show right now)
salesforce industries Product object types general properties filled out
  1. Click Done to save the new Object Type

Review Base Object Type’s Layout

  1. Click on the Layout Management tab
    This layout was inherited from Product2’s. From this tab, you can add or remove Fields and Attributes as needed. This will only be remove them from the layout of this Object Type.
    • To Remove Fields/Attributes, click on the trash icon next to it
    • To Add Fields/Attributes, click on the appropriate tab on the right (Fields or Attributes) and drag and drop the field/attribute into the section and place you want.
salesforce industries Product object types layout management interface

Create “Sub Type” Object Types under your Base

The Object types you create under another will inherit the Parent’s Layout but once created, you can change the parent Object type and this won’t affect any downstream Object types. It’s a one-time inheritance upon creation.

  1. Click on the New Object Type button
salesforce industries Product object types New object type
  1. Add a name to your new Object Type
salesforce industries Product object types general properties and effectivity
  1. Click on the magnifying glass icon in Parent Object Type. A pop up window will show a Lookup Search.
  2. In the Lookup Search, select your Base Object (however you named it). I named mine BaseObject
salesforce industries Product object types lookup search with base object
  1. Check the Active checkbox and add an Effective From date in the past.
  2. Click Done to save the changes

Adjust new Object Type’s Layout

As with the Base object type, you’ll see that this new Object Type inherited the Layout of the Base. Now you can add or remove fields and attributes as you see fit without altering the Base Object Type.

Every Product that gets assigned to this Object type, will automatically inherit this layout. This determines the Fields you can see in the cart and the fields you can see when seeing the Details tab in the Products.

From the Layout Management tab, you can add or remove Fields and Attributes for this Object Type. This independent from children below and parents above.

Empty Layouts

If the layout is empty then you’ll get an error like this when opening the Details tab in the Product.

de-reference a null object error

You can check out more information about Product Object Types in the EPC documentation.

Was this article helpful?
YesNo