You are here:
Invoke an Expression Set That Uses Decision Explainer from a Flow
After an expression set version that has decision explanations enabled is activated, call the expression set that the version belongs to from a flow. To capture action logs for the expression set runs, specify values for the autogenerated __actionContextCode and __specName parameters in the flow.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions for clouds that have Business Rules Engine enabled |
| User Permissions Needed | |
|---|---|
| To create explainability message templates, explainability action definitions, and explainability action versions: | Decision Explainer Service Access |
| To enable Decision Explainer for an expression set version: | Rule Engine Designer |
| To invoke an expression set from Flow | Manage Flows |
To enable Decision Explainer for an expression set and add explainability message templates to a version, your Salesforce instance must have Decision Explainer enabled.
- From Setup, in the Quick Find box, enter Flows, and then select Flows.
- Click New Flow.
- Select a flow type, and then click Create.
-
Click
, and then select
Action.
- In the Action search bar, search for, and select the expression set you want to run.
- Enter a label for the expression set. The API name autopopulates from the label you enter.
- If needed, enter a description.
-
Set input values for the expression set:
- Include __actionContextCode and select the variable that captures the record ID of the object for which the expression set is run.
-
Include __explainabilitySpecName and enter the name of the
explainability action definition that defines
the purpose for which the expression set is run.
Important Ensure that the explainability action definition you specify has an associated, active explainability action version. - If needed, include other variables from the expression set and set their values.
Here, {!contactRecord.Id} is the local flow variable to capture the record ID of the contact for whom this flow is run. Example is the explainability action definition, and {ApplicantBirthdate} is the local flow variable that captures the user’s input.
- Save your changes.
-
To verify that the flow works as expected, run or debug the flow using sample values.
.

Here, the flow passes the contact record’s birthdate to the expression set, which uses the date to calculate the age. The expression set is configured to have $10,000 as the course fees. Based on the calculated age, the expression set returns the discounted fees of $7,000 to the flow.
-
Go to the record detail page of the object for which you entered the record ID in the
__actionContextCode field.
.
Important To see the decision explainer action logs, the record detail page of the object used as the actionContextCode must have the Decision Explainer Log History component added to the object’s record pageHere’s the record detail page of the sample contact specified while debugging the flow. The Decision Explainer Log History section captures each run of the expression set.

- To view step-wise details and output of the expression set version called from the flow, select a specific run, and click View.

