Dynamic Offers allow you to set up rules to dynamically display product plans, prices, and other elements, such as images, to different groups of end users. You can also define how discounts are applied to the prices. Each time Zephr receives a request, the rule engine will evaluate the input data and return relevant values for each element in the offer. This feature makes it easier to implement a comprehensive product display plan and customised pricing strategy.
- Dynamic Offers provides an API-based integration that allows you to use Zephr's rules engine to build logic for when and how offers should display. Your frontends can then take the response from the dynamic offers decision API and use it to show the offers to your end users. For more information about different ways to integrate with Zephr, see Integration Methods.
- The Dynamic Offer Decision Engine Public API is used to send requests to the decision engine. The API examples topic provides examples of the API request and response.
- To use this feature, you must use Zuora Billing as the payment provider.
- See Zuora Billing for information about how to connect your Zephr console with your Zuora tenant.
- Before starting to configure the dynamic offers, you need to set up products and price book items associated with the product rate plan charges.
You can define rules for the following types of properties in a dynamic offer:
- Product: The products available in your Catalogue. In the Rules Builder, you can create product outputs containing either one or more payment options that are defined in your Catalogue.
- Price: The price book item associated with each product rate plan charge. Note: The Price property ONLY supports the Zuora Billing integration.
During the execution of a dynamic offer, the product rule will be run first to determine the product output that will be returned. The price rule will then be run against all the prices associated with each product in the output and determine which prices will be returned. For more information about how to work with the Price rules builder, see Price Rule.
- Tagline: Customised string
- Discount: Discounts you want to apply to the product in specific conditions
- Customised Property: Customised string, enum, number values, or Zephr components
You can specify inputs that are needed for your rules. Available options are as follows:
- session: Session ID
- IP: IP address
- user_agent: The browser that the end user is using to access the page
- path: The path of the page that is being visited
- content_id: The unique ID of the content that is being visited
In addition, you can add custom input fields to a dynamic offer. The custom inputs can be used to form the rules.
How Dynamic Offer Works?
The following flow demonstrates how dynamic offers work:
- Create a dynamic offer in the Zephr console
- Set up the integration with the dynamic offer API for your website
- Each time an end-user visits your website, a request that contains the required data will be sent to the Zephr rule engine, and Zephr will evaluate the data and return results accordingly.
- Your website will display elements to the end user based on the returned data.
Note: The tutorial below only covers step 1 in the above flow. To enable the rules to work for your websites, you must make sure step 2 is properly set.
Create a Dynamic Offer
Before creating a dynamic offer, you must make sure that in the Zuora tenant, the products and the associated price books are properly set up. For a detailed explanation of why this is needed and how to complete the setup, see Price Rule.
In the Zephr console, navigate to Products > Dynamic Offers. Take the following steps to create a dynamic offer:
- Click Add a Dynamic Offer.
- On the Add a Dynamic Offer screen, enter a title for the offer. The slug of the offer will be shown under the field. Optionally, enter a description for the offer. Click Save to proceed.
- On the configuration screen, locate the Inputs section, where you can define the inputs that you need:
- You can deselect the default input options.
- You can also add custom input as needed. You need to specify the title, key, and type of the custom input. Available input types are String, Number and Boolean. Later you can set up rules that contain different branches based on the evaluation of the input values. Note that the custom inputs are optional for the API requests.
If you are not familiar with the concept of Input in Zephr, see Developer Interface for SDK Features for more information.
After you have set up the input fields, you can preview the example request in cURL in the Implementation section. To copy the example request, hover over to the upper right corner of the code block and click the Copy icon.
- Define rules for the product, price, tagline and discount properties. You need to be familiar with the Zephr Rules Builder feature before configuring the rules.
- Product: Click Product Output > Add Product Output to create a product output. A product output could contain one or more products defined in your product Catalogue.
- Price: If you use Zuora Billing as the payment provider, you can use the Price property to set up rules to return different prices dynamically. For more information about how to work with the Price rule builder, see Price Rule.
- Tagline: You can define different string values using the String Output node.
- Discount: Define the discounts that can be dynamically applied to the products or certain prices of a product. For more information, see Discount Rule. Note: Discount will not directly be applied to the returned prices.
- Under the Custom Properties section, you can add custom properties for your offer based on need, and define rules for the custom properties:
- Click Add New Property
- Enter a title for the property and specify the output type. Available type options are Component, Enum, String, and Number. Note that if you select Component or Enum as the type, you'll need to add output options.
- Define rules for the property using Rules Builder. You can change to a different output type by unlocking the Developer Interface at the bottom of the screen.
- Click Save
- Preview the API request in the Implementation section at the bottom of the screen.
- At the bottom of the configuration page, select how the dynamic offer version is saved. Available options are Save Draft, Save and Stage, and Save and Publish.
After the dynamic offer is published, you can go on to test if the rules engine work as expected, and then start setting up the integration.
On the Dynamic Offers homepage, you can edit an offer by clicking on its title. To delete an offer, click the More icon on the right, and then click Delete.