Multi-variant circumstancing
Multi-variant circumstancing addresses the challenge faced by businesses responding to situational processes when multiple factors are required before applying the correct Rule.
Circumstance template and definition
For example, a bank waives account fees for customers who maintain an account balance of EUR10,000 and are residents of Germany. But for customers who are not residents of Germany, the account balance must exceed EUR25,000.
In this situation, you create a circumstance template to define the properties on which to circumstance the Rule. You then create a circumstance definition to specify the minimum balance of EUR25,000 and the exception for customers who are non-residents of Germany.
The circumstance template is the Rule that defines the properties used to determine if the circumstance is applicable. In the minimum balance example, you first configure a circumstance template that defines .CountryOfResidence and .MinimumBalance as the two multivariate properties.
For each circumstanced Rule, you must also provide a unique circumstance definition. A circumstance definition defines the values for the circumstance template. In the minimum balance example, you then select the circumstance template and define the property values applicable for the variant.
You then apply the circumstance template and circumstance definition to the Rule variant. If the Case matches the combination that is defined in the circumstance definition, the application uses the circumstanced variant of the Rule, rather than the base Rule.
A hotel booking website has a loyalty reward program based on where customers live as well as their reward level. The website wants to vary the content of an email based on customer locations and reward levels. Pega Platform™ uses circumstancing to configure variables such as location and reward levels and refers to records with multiple variables as multivariate circumstancing.
Match the numbers to the following image to learn more about the relationship between a circumstance template, circumstance definition, and the Rule variants that use them:
- Circumstance template: A circumstance template defines the properties used to determine if the circumstance applies. In the hotel booking website example, you first create a circumstance template that defines the state and reward level properties.
- Circumstance definition: A circumstance definition defines the values for the circumstance template. In the hotel booking website example, you create circumstance definitions for the combinations of state and reward levels as needed after creating the circumstance template.
You do not have to account for all possible combinations. The Rule resolution algorithm uses the base Rule when no circumstance definition can be applied. - Circumstance record: After you create a circumstance template and one or more circumstance definitions, you circumstance the appropriate record.
In the hotel booking website example, you circumstance the correspondence record for each unique email content and reference the circumstance template and definition that uses the State and RewardLevel values.
Check your knowledge with the following interaction:
Circumstancing and Rule resolution
When several circumstanced versions of the base Rule are available, the Rule resolution algorithm selects a Rule based on the availability of Rules in the higher Ruleset versions.
In the following image, a hotel booking website application includes circumstanced Rules based on state and reward level properties. Match the numbers to the following image to understand the Pega Platform™ Rule resolution on circumstanced Rules:
- CA Gold: If the state is set to CA and reward level set to Gold, Pega Platform picks this Rule during Rule resolution. The CA and Gold values are configured as a circumstance option.
- MA Platinum: If the state is set to MA and reward level set to Platinum, Pega Platform picks this Rule during Rule resolution. The MA and Platinum values are configured as a circumstance option.
- NY Silver: If the state is set to NY and reward level set to Silver, Pega Platform picks the default highest Ruleset. The NY and Silver values are not configured as a circumstance option, so the Rule resolves to the highest Rule.
Check your knowledge with the following interaction:
This Topic is available in the following Module:
Want to help us improve this content?