Circumstancing a rule
Circumstancing a rule
To circumstance a rule, you first create a base rule and then create specialized versions of the rule. Each version is tailored to a specific exception in case behavior.
Follow these steps to circumstance a rule:
- In Dev Studio, open the base rule.
- On the base rule, in the header tab, select Save as > Specialize by circumstance. The New Record form opens with two circumstancing options: Template and Property and Date.
- On the New Record form, identify the type of circumstance. To circumstance on one variable, select Property and Date. To circumstance on more than one variable, select Template.
- Configure and save the circumstance conditions.
Single variable circumstancing (Property and Date)
- Specify the condition under which the rule is used. The following example shows a service level circumstanced to run whenever the value of .CustomerStatus is "silver".
Vorsicht: The Value must be entered within quotation marks.
- To circumstance by date, use the following table to configure the circumstancing condition to meet various business requirements.
Business requirement Specify date property Specify start date Specify end date Rule to be effective only if the value of the specified date property occurs within a date range Yes Yes Yes Rule to be effective only if the value of the specified date property occurs after a certain date Yes Yes No Rule to be effective only within a date range No Yes Yes Rule to be effective only after a certain date No Yes No - To view the circumstancing condition for a rule, locate the rule in the Application Explorer. Pega indicates a circumstanced rule by using a collapse arrow. Clicking the arrow expands the rule entry to display the supported circumstances. In the following example, the DisputeReponse service level includes a circumstance used when the value of .CustomerStatus is "silver".
Hinweis: You can also review the circumstancing condition for a rule by clicking the Circumstanced link in the rule header.
Multivariate circumstancing (template)
To configure records with multiple variables, use multivariate circumstancing. Multivariate circumstancing refers to records that you circumstance by more than one property. For example, an international corporation is using circumstancing to define the spring promotion incentive commissions for sales representatives in the various countries where the corporation operates. The commission amount varies by the monetary value of the sale and the country in which the sale occurs.
To configure multivariate circumstancing, specify the circumstance template and circumstance definition. The circumstance template is the rule that defines the properties used to determine if the circumstance is applicable. In the spring promotion commission example, you first configure a circumstance template that defines .CountryofSale and .SaleValue as the two multivariate properties.
To configure a circumstance template, see the help topic Creating a circumstance template.
For each circumstanced rule, you must also provide a unique circumstance definition. A circumstance definition defines the values for the circumstance template. In the spring promotion commission example, you create circumstance definitions for the various combinations of countries and sales amount needed after you create the circumstance template.
You do not have to account for all possible combinations. The rule resolution algorithm uses the base rule when the circumstance definition is inapplicable.
To configure a circumstance definition, see the help topic Creating a circumstance definition.
When the circumstance template and definition are ready, configure the circumstancing for the rule.
- In the rule form, for Circumstance By, select the Template radio button.
- In the Template field, select the appropriate circumstance template.
- In the Definition field, select the appropriate circumstance definition.
- Save the record.