Creating Custom Business Objects with Business Manager

Use Business Manager to create custom business object definition. When the custom object is defined in Salesforce B2C Commerce, you can create scripts to create instances of the custom business object. For example, you can define an email subscription custom object, and then use a script to create a custom object that stores email and name information entered by customers in the storefront.

The custom object type is available for use in all storefronts defined for the organization. When creating instances of the object, you can make those instances site-specific or organization-wide.

To define a custom business object:

  1. Select Administration > Site Development > Custom Object Types. Click Add to add a new definition.
  2. Define your custom object and a key attribute. The attribute stores a unique key for every custom object of this type.

    For example, create a ProcessingDays object that lets you inform customers how long it will take for their order to ship. Add a ShipmentNo key attribute.

  3. Click the Attribute Definitions tab.
    Note: B2C Commerce automatically creates three attributes for you: UUID, creationDate, and lastModified. These attributes store system data and can't be removed.
  4. Click New to add additional attributes to store information used for the object.

    For example, add the attributes OrderProcessing, Shipping, and TotalShippingTime.

  5. Click Apply to save your changes and Back to return to the previous page.
  6. Click the Attribute Grouping tab to define attribute groups. Attribute groups are shown in Business Manager and let you create or edit objects created through scripts.
  7. Click New to add an attribute group.

    For example, create a new attribute group called ShipmentTime.

  8. Click Edit to add attributes to the group.

    For example, add the attributes OrderProcessing, Shipping, and TotalShippingTime.

Management and Creation

You can also use Business Manager to create and manage an instance of the custom object types you created through the Custom Objects Definitions module under Administration. Custom object instances can be stored globally (which makes the instances available to the entire organization and all sites), or locally (that is, per site). The custom object type definition is always available to the entire organization (to all sites).

To manage or create a custom object:

  1. Select site > Merchant Tools > Custom Objects > Custom Object Editor. Create an instance of the custom object that you defined in Business Manager's Administration module.
  2. Assign values to the attributes.

    For example, assign OrderProcessing a value of five, Shipping a value of six, and TotalShippingTime a value of 11.