---
schema_version: "1"
id: 0c04b404b59dc7777d60e6060f6e86370af8d1f207c94a980db6d1be8004f2b7
title: Compare Expression Set Runs with Decision Explainer
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/bre_compare_expression_set_runs.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.bre_compare_expression_set_runs.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: eb8dcc48c03fcffcf52997685b9a7f2c773cde1edef340724866f2983a4de2a4
description: 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.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions for Industries clouds that have Business Rules Engine and Decision Explainer enabled</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d5052e69">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d5052e69 ">To create an expression set:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d5052e69 ">Rule Engine Designer</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d5052e69 ">To create Decision Explainer object records:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d5052e69 ">Decision Explainer Service Access </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d5052e69 ">To create a flow to run the expression set:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d5052e69 ">
              <p>Manage Flows</p>
              <p style="margin-bottom:0;">AND</p>
              <p style="margin-bottom:0;">Rule Engine Runtime</p>
            </td>

          </tr>
        </tbody>
      </table>

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-business_rules_engine-264-0-0-production-enus/b2d6dd5c-c231-428b-abbf-3dd2cd51a11f/business_rules_engine/images/compare_des_logs.png)
    
    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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-business_rules_engine-264-0-0-production-enus/b2d6dd5c-c231-428b-abbf-3dd2cd51a11f/business_rules_engine/images/compare_des_logs_results.png)

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-business_rules_engine-264-0-0-production-enus/b2d6dd5c-c231-428b-abbf-3dd2cd51a11f/images/icon_example.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-business_rules_engine-264-0-0-production-enus/b2d6dd5c-c231-428b-abbf-3dd2cd51a11f/business_rules_engine/images/des_enabled_es_in_flow.png)

- 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-business_rules_engine-264-0-0-production-enus/b2d6dd5c-c231-428b-abbf-3dd2cd51a11f/images/icon_note.png)
    
    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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-business_rules_engine-264-0-0-production-enus/b2d6dd5c-c231-428b-abbf-3dd2cd51a11f/business_rules_engine/images/compare_des_logs_results.png)

#### See Also

- [_Salesforce Help_: Show Rule Explanations to Users](https://help.salesforce.com/s/articleView?id=ind.use_decision_explainer_in_expression_sets.htm&release=264.0.0&type=5 "When Decision Explainer is available in your Salesforce org, you can show your users the explanations for expression set version step results. The explanations are stored in explainability message templates that your admin creates and maintains.")
- [_Salesforce Help_: Show Rule Explanations to Users (Example)](https://help.salesforce.com/s/articleView?id=ind.show_rule_explanations_to_external_users_example.htm&release=264.0.0&type=5 "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.")