Skip to main content

Price Rule

Zuora

Price Rule

The Price property allows you to set up customised rules that dynamically return prices for a product per user session.

How does it work?

The Price, also referred to as Price Book Item, is pre-defined in your Zuora tenant. 

In the Zuora console, you need to define what the Price Book looks like first. A Price Book can be understood as a price table that could contain several columns. Each column represents an attribute field, such as location, user type, etc. In the price table, each row represents a price, with specific values assigned to its attribute field. 

Below is an example of a price book item in JSON:

"priceBookItems": [
    {
        "id": "8ad0934e8727f64201872cd24cf46281",
        "number": "PBI-00000894",
        "productChargeId": "8ad093848727f65201872cb73b624587",
        "offerId": "8ad08dc98727e36b01872c91527a0afa",
        "offerNumber": "OF-00000041",
        "effectiveStartDate": "2023-03-29",
        "effectiveEndDate": "2025-03-29",
        "currency": "GBP",
        "defaultQuantity": 1.0,
        "listPriceBase": "Per_Billing_Period",
        "includedUnits": null,
        "price": 129.0,
        "overagePrice": null,
        "tiers": null,
        "intervalPrices": null,
        "BillingPeriod__c": "Annual",
        "Domain__c": null,
        "SalesOrg__c": "B2C",
        "Vendor__c": null,
        "SubscriptionTerm__c": "24Month",
        "IsReseller__c": null
    }
]

Note that on the Zuora side, price book items are bundled at the product rate plan charge level, meaning each charge within a product rate plan could be associated with a price table. See Create Zuora products and price books for information about how to set up products and price books in Zuora.

After the price book items are set up in the Zuora console, you can leverage the Price rules builder to define rules that filter and sort the prices against the Price Book fields. 

image2.png

For example, the following rule will first filter out the prices based on the Currency field of the Price Book table, then sort the filtered price book item list, and finally return the top item in the list. 

In addition, you can add Custom Inputs to the rule for either decision-making or filtering purposes.

Note: As Price Book Items are associated with each rate plan charge in Zuora, the Price rule engine will filter and return prices at the charge level too. If a rate plan contains more than one charge, multiple sets of prices could be returned.

Price Book Specific Nodes

You can configure the Filter and Sort nodes in your price rules. Both nodes are available in the Price Book tab on the canvas. The price rules must end with the Display Price node, which is available in the Price Output tab.

Filter

Use the Filter node to configure filters against the price book table. Take the following steps to set up a Filter node:

  1. Specify the filter type in the Filter field.
  2. Specify the field name on the Price Book that will be filtered against. To use a custom field defined on the Price Book in Zuora, you need to add __c to the end of the field value, for example, country__cNote: If the Price Book field you want to use in the filter is not in the dropdown list of the Filter field, select Other for that field and specify the field name in Price Book Field.
  3. Specify the condition.
  4. Specify the source values. 
    1. You can either select a Custom Input defined for the Dynamic Offer, or a fixed value. 
    2. For the Country, State, Zip Code and City filter types, you can choose to use the user IP as the source. 
    3. For the Date filter type, you must specify a date.

You can enable the filter to display all the Price Book Item fields and field values defined in your Zuora Billing tenant. With this update, you no longer need to manually specify the field name in the node configuration to identify the field. Instead, you can choose from the Price Book Field dropdown list. For the field that contains enum values, (define as "picklist" type in Zuora Billing), you can also select from the defined enum values when the condition is set to Equals and Source is set to Value

To enable this, reach out to our Support team.

Sort

Use the Sort node to sort the price book items. Available field types to sort are Text, Number and Date.

You can enable the filter to display all the Price Book Item fields and field values defined in your Zuora Billing tenant. With this update, you no longer need to manually specify the field name in the node configuration to identify the field. Instead, you can choose from the Price Book Field dropdown list. For the field that contains enum values, (define as "picklist" type in Zuora Billing), you can also select from the defined enum values when the condition is set to Equals and Source is set to Value

To enable this, reach out to our Support team.

Display Price

You must place the Display Price node at the end of the price rule. This node can specify whether the rule will return the top item only or all the items.

Tip: You can stack multiple Filter nodes to set up a comprehensive filter. Use the Type field at the bottom of the configuration window to specify the logical relationship between the filters.