Loading
Salesforce now sends email only from verified domains. Read More
Business Rules Engine
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Example of Invoking a Decision Explainer Enabled Expression Set from Flow

          Example of Invoking a Decision Explainer Enabled Expression Set from Flow

          This example shows how to invoke an expression set that uses Decision Explainer from flow. The example also shows how to view every run of the expression set in the action logs for the context in which the expression set is run.

          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 promote fitness and well-being, a company is offering a discount on its annual gym membership to its contacts. To encourage physical movement, the company launched a week-long step challenge for its contacts. The annual membership price is $1,000. A discount is offered on this price based on a contact’s age and the step count from the week-long step challenge.

          The company’s sales team gave the rule designer and the Salesforce admin the age and step count ranges and the applicable discount percentages. The company also asked that the discounted gym membership fees be updated on a contact’s record detail page for quick reference.

          The rule designer contacted the company’s Salesforce admin and together they divided the requirement into these tasks:

          Task Description
          Create a decision matrix to calculate the discount percent based on the step count from the step challenge. The matrix uses an input column with the datatype number range to capture the step count. The matrix captures the discount percent in the output column for these ranges.
          Create a decision matrix to get age-based discount. The matrix uses an input column with the data type number range to define the age range. The matrix captures the discount percent in the output column for these ranges.
          Create an expression set and its version to design the end-to-end rule to calculate the discounted gym membership.

          The expression set version:

          • Takes the step count as an input and looks up the decision matrix to get the step-based discount.
          • Uses the contact’s birth date to calculate age.
          • Passes the contact’s age to the age-based discount matrix to get the additional discount.
          • Calculates the total discount by adding the age-based and the step-based discounts.
          • Calculates the discounted premium by subtracting the total discount percent from the base membership fee of $1,000.
          • Enables Decision Explainer for customer service representatives to understand the logic behind the discounted membership fee for a specific contact.
          Create a flow to run the expression set and return the output to the flow.
          • The flow captures the contact’s step count and passes it to the expression set action.
          • The expression set action is configured to use a contact’s record ID as the context in which the flow and the expression set run.
          • The expression set action returns the discounted membership fees to the flow.
          • The flow then updates the contact record with the discounted fees.
          To launch the flow for a contact, add the flow action to the contact record detail page.
          • The company’s customer service representatives can launch the flow for a contact, and enter the contact’s step count for the previous week.
          • The flow runs in the background and updates the Gym Membership Fees field for the contact record.
          View the action log for the flow. The customer service associates can see the Decision Explainer Log History on the contact’s record detail page to check how the gym membership fees for the contact were calculated.
           
          Loading
          Salesforce Help | Article