Skip to main content

Use Case: Setting a Multi-Attribute Price

Zuora

Use Case: Setting a Multi-Attribute Price

This use case shows you how to use a Lookup Value in a rule that will set the Effective Price of a Product in a Quote to the value of the List Price in a record of a custom object Price Table Entry.

Set up Lookup Table Data for the Use Case

  1. Create a new custom object Price Table Entry with the following fields:
    •   Ownership (Text)
    •   Lead Source (Text)
    •   List Price (Number)
  2. Create one record of Price Table Entry and set the field values as follows:
    •   Ownership: Public
    •   Lead Source: Web
    •   List Price: 99
  3. Optionally, create other records with different values.

Create the Rule

  1. In the Rules tab, click New and add the following rule.
    1.   Rule Name: Set Price Based on Attributes
    2.   Active: Select the field.
  2. Define a Condition that checks if the Quote has Products.
    1. In the CONDITION section, click Add Criteria....
    2. In the first Attribute Type field, click and select Rollup Value.
    3. In the Object field, click and select Rate Plan.
    4. In the Rollup Type field, click and select Count.
    5. Change the is equal to to is greater than in the pick list.
    6. In the second Attribute Type field, click and select Static Value.
    7. In the Value field, type 0.
  3. Define the Action that sets the Effective Price based on the Price Table Entry records.
    1. In the ACTIONS section, click Add Action....
    2. In the Action Type field, click and select Update Product.
    3. In the Object field, click and select Charge.
    4. In the Field field, click and select Effective Price.
    5. In the New Value Type field, click and select Lookup Value.
      1. In the Lookup Object field, select Price Table Entry.
      2. In the Value Name field, select List Price.
      3. For Attribute 1, select Ownership.
        1. For Attribute Value Type, select Object Field Value.
        2. Click on Object Field, and select Quote > Account > Ownership.
      4. Click the + button next to Attribute 1 to add a second attribute.
      5. For Attribute 2, select Lead Source.
        1. For Attribute Value Type, select Object Field Value.
        2. Click on Object Field, and select Quote > Opportunity > Lead Source.
    6. In the Message field, type "Charge Price updated."
  4. Click Save.

Verify the Rule

  1. Create or update an Account and set the Ownership value to Public.
  2. Under that Account, create or update an Opportunity. Set the Opportunity's Lead Source value to Web.
  3. Under this Opportunity, create a New Subscription Quote.
  4. In the Guided Selling flow, add a Per Unit product to the quote.
    1. In the Edit Products page, verify that the Effective Price of the product is updated to 99.
    2. The Rules Engine Logs section will show the message "Charge Price updated." that you have specified in the rule.
  5. Optionally, update the Account's Ownership or the Opportunity's Lead Source values to other values that match a Price Table Entry. Refresh the product selection to validate the new effective price matches this Price Table Entry's List Price field.
  6. Note that you must ensure that any valid combination of attribute inputs matches at least one record of the Lookup Object when you use the multi-attribute pricing rule. Otherwise, the price calculation will not be possible.
  7. Lookup Object records can also contain a wildcard character "*" in an attribute field to match against any input value.