Skip to main content

Create a custom object with multi-attribute data

Zuora

Create a custom object with multi-attribute data

The Multi-Attribute Pricing charge model for one-time and recurring charges is available to all customers.

To be able to look up multi-attribute data, you have to define a custom object, and then add records to that custom object.

Procedure

You can create the custom object with multi-attribute data through the Zuora UI or REST API.

Create a custom object as the lookup table

To create a custom object through the Zuora UI, complete the following steps:

  1. In the left-hand navigation section, navigate to Platform > Object Manager.
  2. Click + CREATE CUSTOM OBJECT.
  3. On the Custom Objects page that is displayed, configure the lookup table definition: 
    1. In the NAME field, enter the UI element name for the new custom object. In this scenario, enter CarRental.
    2. In the API NAME field, enter an API label name for the custom object. In this scenario, enter CarRental.
      The API label name will be used later, so note it for reference.
  4. In the Custom Fields area, click + NEW CUSTOM FIELD.
  5. In the Custom Field dialog that is displayed, complete the following configurations:
    1. In the custom fields overview area, enter the UI element name for the new custom field in the NAME field. In this scenario, enter type.
      The value in the API NAME field is automatically populated based on the specified field name. In this scenario, type__c is automatically displayed. The API Name of the field will also be used later.
    2. In the Details area, select Text from the FIELD TYPE list.
    3. Switch the Filterable toggle on to ensure that the custom field is filterable.
      It is best practice to also switch the Required on if you need to use the custom field in the price formula later. 
    4. Click SAVE to save the custom field configurations.
  6. Repeat steps 4 and 5 to create the state and multiplier custom fields.
    When creating the multiplier custom field, you have to select Number from the FIELD TYPE list.
  7. Click SAVE to save the custom object configurations.

The definition of the lookup table called CarRental is now created, with the type, state, and multiplier fields.

The data type of the type and state fields created for the lookup table must be exactly the same as those created for the Usage object in Create custom fields for the Usage object. Otherwise, a match might fail, resulting in an error during the rating process of the usage record.

Add records to the lookup table

After the lookup table definition is created, you can add records to the lookup table.

To add records to the lookup table through the Zuora UI, complete the following steps:

  1. In the left-hand navigation section, navigate to Platform > Object Manager.
  2. On the CUSTOM OBJECTS tab, click the custom object name in the LABEL column. In this scenario, click CarRental
  3. On the custom object page that is displayed, click + CREATE.
  4. On the Record Details dialog that is displayed, define the first record that is listed in the lookup table of the Overview section.
    1. In the type field, enter minicar.
    2. In the state field, enter California.
    3. In the multiplier field, enter 2.
    4. Click SAVE to save the record configurations.
      The details about the newly created record are displayed.
  5. Click < next to the custom object name to go back to the the Record Details dialog.
  6. Repeat step 5 to add the other records that are listed in the lookup table of the Overview section.

The four records have now been added to the defined lookup table called CarRental, and are displayed on the CarRental Records page.