Loading
Intermittent Errors with Salesforce Trial Org Registration 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
          Compare Expression Set Runs with Decision Explainer

          Compare Expression Set Runs with Decision Explainer

          To analyze why an expression set generated different outputs for each run, enable Decision Explainer for expression set versions, and then use the Compare option on the Decision Explainer Log History component. Decision Explainer logs are generated in the context of object records that an expression set is run for. To use the Compare option, the Decision Explainer Log History component must be enabled on the record page of the object within whose context 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
          User Permissions Needed
          To create an expression set: Rule Engine Designer
          To create Decision Explainer object records: Decision Explainer Service Access
          To create a flow to run the expression set:

          Manage Flows

          AND

          Rule Engine Runtime

          1. To run the expression set using Flows, use the runExpressionSet action in a flow.
          2. Debug or run the flow.
          3. Open the record detail page of the object in whose context the expression set was run.
          4. Locate the Decision Explainer Log History component on the page.
            Decision explainer log history component

            Here, the Decision Explainer Log History component is added to the expression set object’s record detail page.

          5. To compare the results of the expression set’s runs, select at least two runs of the expression set, and click Compare.

          Here, you see the reasoning behind why the same expression set generated two different outputs based on the different inputs.

          Side-by-side comparison of two runs of the same expression set

          Example
          Example

          You created an expression set named Maintenance Charge Calculation to calculate the maintenance charges for an apartment based on the apartment’s size in square feet. You enabled Decision Explainer for the version. Then, you created these resources to store the values required to calculate the maintenance charges.

          Resource Name Type Data Type
          Base_Charge Constant (with the value $100) Currency
          Apt_Size_Sq_Feet Variable Number
          Maintenance_Charges Variable Currency

          You configured a calculation step in the version that takes the apartment’s size as input, and returns the maintenance charges.

          To make the message in the template more meaningful to the users, you mapped the message tokens to resources from the version. You then activated the version.

          You created a flow and added the expression set action to run the expression set.

          Flow configuration for expression set action
          • For __actionContextCode, you entered the record ID of the expression set.

            This is the context that you used to capture the Decision Explainer logs. You had also added the Decision Explainer Log History component to the expression set record detail page.

          • For __explainabilitySpecName, you entered the name of the explainability action definition.
            Note
            Note Ensure that the explainability action definition you enter has an active explainability action version associated with it.
          • For Apt_Size_Sq_Feet, which is the expression set version’s resource, you created a local flow variable to pass the apartment size to the expression set from the flow.

          You then saved the flow and tested it with a few sample apartment size values.

          You opened the record detail page of the expression set, and compared the results of the expression set runs with different input values from Decision Explainer Log History.

          Side-by-side comparison of two runs of the same expression set
           
          Loading
          Salesforce Help | Article