Loading
Business Rules Engine
Show Rule Explanations to Users (Example)

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.

  1. Create an expression set version and define these variables and constants:
    Variables and Constants
    Resource NameResource TypeData TypeInitial Value
    Birthdate Variable Date
    Age Variable Number
    GPA Variable Number
    DiscountedFees Variable Currency
    BaseFees Constant Currency 40,000
    EligibleDiscount Constant Percent 20
  2. Add these steps to the expression set version:
    1. Calculation: To calculate the age of the student based on the birth date that the student enters.

      Calculation step to calculate age.

    2. Conditional Group: A condition that checks whether the student is above 45 and has a minimum GPA of 3.
    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.

      Conditional group to evaluate eligibility condition and calculate discounted fees if the condition is met.

  3. 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 NameTemplate MessageTemplate 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
  4. Simulate the version to test whether everything works as expected by using these sample input values:
    • Age: 50
    • GPA: 3.5

    Simulation sample inputs.

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

    Simulation result internal view.

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

    external view.

 
Ladataan
Salesforce Help | Article