You are here:
Show Rule Explanations to Users (Example)
This example shows how you can configure an expression set version to show step-result explanations to external users. The example also shows how to preview the explanations that your users see.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions for Industries clouds that have Business Rules Engine and Decision Explainer enabled |
To encourage higher education among adults, a university offers a 20% discount on base fees to people over 45 who have a minimum grade point average (GPA) of 3.
You create an expression set that checks the eligibility of the student based on the age and GPA. The expression set returns the discounted fees if the student is eligible. You select the explainability message templates for the steps for which you want to show explanations to users. You then simulate the expression set and preview how your external users see the explanations.
- Create an expression set version and define these variables and constants:
Variables and Constants Resource Name Resource Type Data Type Initial Value Birthdate Variable Date — Age Variable Number — GPA Variable Number — DiscountedFees Variable Currency — BaseFees Constant Currency 40,000 EligibleDiscount Constant Percent 20 - Add these steps to the expression set version:
- Calculation: To calculate the age of the student based on the birth date that the student
enters.

- Conditional Group: A condition that checks whether the student is above 45 and has a minimum GPA of 3.
- Calculation: A calculation inside the conditional group. The calculation runs only if the
condition evaluates to true. The calculation provides the final discounted fees.

- Calculation: To calculate the age of the student based on the birth date that the student
enters.
- Select the condition step, and then select the relevant explainability message templates
that provide the explanations for when the condition is met (Passed) and isn’t met
(Failed).
Explainability Message Templates Selected Template Name Template Message Template Usage Scenario DiscountEligible Based on your age and GPA, you’re eligible for a 20% discount on the base fees. Condition result is Passed DiscountNotEligible You don't meet the eligibility criteria for a fee discount. To be eligible for the discount, your age must be at least 45, and have a minimum GPA of 3. Condition result is Failed - Simulate the version to test whether everything works as expected by using these sample
input values:
- Age: 50
- GPA: 3.5

- As expected, your simulation results show that the input values that you entered qualify for
a discounted fee.

- To preview how your viewers see the explanation that you added to the condition step, click
, and then select
Concise View.

