Skip to main content

Use Case: A Rule to Set the Price of a Maintenance Charge Based on the Software Price

Zuora

Use Case: A Rule to Set the Price of a Maintenance Charge Based on the Software Price

This use case shows you how to use a calculated valuePric in a rule that will set the price of the Maintenance Product to be 20% of the Software Product on the quote.

Set up the Products for the Use Case 

  1. In Zuora, add a custom field to the Product object:
    • Name: ProductCategory
    • API Name: ProductCategory__c
    • Type: Text
  2. Create two products and their rate plans in Product Catalog.
    1. Set the ProductCategory field of the first product to Software.
    2. Set the ProductCategory field of the second product to Maintenance.
  3. In Zuora Quotes, create a custom field to the Product object with the same API name and type as in Step #1 above.
  4. In Zuora, run a Product Catalog sync.

Create the Rule

  1. In the Rules tab, click New and add the following rule.
    • Rule Name: Maintenance Price Set to 20% of Software Price
    • Active: Select the field.
  2. Define a Condition that checks if a Software Product exists on the quote.
    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. In the Filter field, click to create a Filter Condition that selects the products of the Software category.
      1. Click New Filter.
      2. In the Filter field, specify a filter name.
      3. In the first Attribute Type field, click and select Object Field Value.
      4. In the Object Field field, click -Select Field-.
        1. In the Rate Plan Field field, click and select Product>.
        2. In the Product Field field, click and select ProductCategory.
        3. Click Select.
      5. In the second Attribute Type field, click and select Static Value.
      6. In the Value field, type Software.
      7. Click Create and click Select.
    6. In the second Attribute Type field, click and select Static Value.
    7. In the Value field, type 1.
  3. Define the Action that sets the Effective Price of the Maintenance charge to the 20% of the Software price.
    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 Filter field, click to create a Filter Condition that selects the products of the Maintenance category.
      1. Click New Filter.
      2. In the Filter field, specify a filter name.
      3. In the Charge Field field, click and select Quote Rate Plan >.
      4. In the Quote Rate Plan field, click and select Product>.
      5. In the Product field, click and select ProductCategory.
      6. Click Select.
      7. In the second Attribute Type field, click and select Static Value.
      8. In the Value field, type Maintenance.
      9. Click Create and click Select.
    6. In the New Value Type field, click and select Calculated Value.
    7. In the Calculated Value field, click -Select Value- to define a formula to calculate 20% of the Software price.
      1. In the Object Type filed, click and select Quote.
      2. In the Calculated Value field, type a name for this Calculated Value.
      3. Click New Calculated Value.
      4. Click Add Input.
      5. In the Input Type field, click and select Rollup Value.
      6. In the Object field, click and select Charge.
      7. In the Rollup Type field, click and select Sum.
      8. In the Filter field, click to create a new Filter that selects the products of the Software category.
        1. In the Filter field, specify a unique filter name.
        2. Click New Filter.
        3. In the first Attribute Type field, click and select Object Field Value.
        4. In the Object Field field, click to create a new filter on the Charge object.
          1. In the Charge Field field, click and select Quote Rate Plan.
          2. In the Quote Rate Plan Field field, click and select Product>.
          3. In the Product Field field, click and select ProductCategory.
          4. Click Select.
        5. In the second Attribute Type field, click and select Static Value.
        6. In the Value field, type Software.
        7. Click Create and click Select.
      9. In the Object Field field, click and select Effective Price.
      10. In the second Input Type field, click and select Static Value.
      11. In the Value field, type 0.2.
      12. Click Create and click Select.
    8. In the Message field, type "Support Charge updated."
  4. Click Save.

Verify the Rule

  1. Create a new quote of the New Subscription type.
  2. Add the two products and rate plans in the Enhanced Guided Selling flow.
  3. Verify that the Effective Price of the Maintenance product is 20% of the total price of the Software product.
  4. The Rules Engine Logs section will show the message you specified in the rule, "Support Charge updated."