Skip to main content

Use Case: A Rule to Add a Product for a Volume Purchase

Zuora

Use Case: A Rule to Add a Product for a Volume Purchase

This use case describes how to create a rule that will automatically add the Premium Service rate plan when the purchase quantity is more than 20.

Set up the Products for the Use Case

  1. In Zuora, create two products and their rate plans in Product Catalog.
    1. Name the first product Basic Hardware and name its rate plan Hardware.
    2. Add a charge of the Per Unit charge model to the Hardware rate plan.
    3. Name the second product Premium Service and name its rate plan Premium Service Rate Plan.
    4. Add a charge to the Premium Service Rate Plan.
  2. In Zuora, run the Product Catalog sync.

Create the Filter

Create a filter condition that you will use in the rule to ensure a product rate plan is added only once.

  1. In the Filter Conditions tab. click New or New Filter Condition.
  2. In the Name field, type Check for Premium Service.
  3. In the Object Type field, click and select Quote Rate Plan.
  4. Click Add Criteria.
  5. In the Attribute Type field, click and select Object Field Value.
  6. Click the Object Field, and in the Quote Rate Plan Field, select Quote Product Name.
  7. Click Select.
  8. In the Attribute Type field, select Static Value.
  9. In the Value field, type Premium Service.
  10. Click and select is equal to.
  11. Click Save.

Create the Rule

  1. In the Rules tab, click New and add the following rule:
    • Rule NameAdd Premium Service if Quanity is Over 20
    • Active: Select the field.
  2. Define a condition that checks if the purchase quantity is over 20 in the quote.
    1. In the CONDITION section, click Add Criteria....
    2. In the Attribute Type field, click and select Rollup Value.
    3. In the Object field, click and select Charge.
    4. In the Rollup Type field, click and select Sum.
    5. In the Object Field field, click and select Quantity.
    6. Click is equal to and select is greater than.
    7. In the Attribute Type field, click and select Static Value.
    8. In the Value field, type 20.
  3. Define a condition that checks if Premium Service is already added to the quote.
    1. Click Add Criterion.
    2. In the Attribute Type field, click and select Rollup Value.
    3. In the Object field, click and select Quote Rate Plan.
    4. In the Filter field, click and select Check for Premium Service.
    5. In the Rollup Type field, click and select Count.
    6. Click is equal to and select is less than.
    7. In the Attribute Type field, select Static Value.
    8. In the Value field, type 1.
  4. Define the action that automatically adds Premium Service to the quote.
    1. In the ACTIONS section, click Add Action....
    2. In the Action Type field, click and select Add Product.
    3. In the Product field, click and select Premium Service.
    4. In the Rate Plan field, click and select Premium Service Rate Plan.
    5. In the Message field, type "Premium Service added."
  5. Click Save.

Verify the Rule

  1. Create a new quote of the New Subscription type.
  2. Add the Basic Hardware product and Hardware rate plan in the Enhanced Guided Selling flow.
  3. Set the quantity to 21 in the Lightning Guided Product Selector.
  4. Verify that the Premium Service product and the Premium Service Rate Plan are added to the quote.
  5. The Rules Engine Logs section will show the message you specified in the rule, "Premium Service added."