Loading
Business Rules Engine
Process Multiple Decision Table Outputs Without a Context Definition

Process Multiple Decision Table Outputs Without a Context Definition

Use a decision table that returns multiple outputs for a single set of input values in any expression set, even if the expression set isn't associated with a context definition. When you turn on Process Multiple Decision Table Outputs while mapping a Lookup Table step's variables, Expression Set Builder automatically creates and maps the local list variables you need to use every matching result in later calculation or logic steps.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Unlimited, and Developer Editions for clouds that have Business Rules Engine enabled
Note
Note Before you can process multiple outputs in a Lookup Table step, set the decision table's Filter Result By to Output Order. See How Result Filters Work.

Unlike the context-tag mapping used in context-aware expression sets, this option doesn't require a context definition. Expression Set Builder creates a local list node variable to represent the set of matching rows, and a local list attribute variable for each output column, then automatically maps them to the decision table's output columns. You can then use these local list variables in later Calculation, List Group, or List Filter steps, or with list functions such as LISTSUM, LISTSIZE, and LISTAVG.

Example: Plan Add-ons Case Study
Example: Plan Add-ons Case Study

Miguel, a rule designer at a telecommunications company, wants an expression set that returns every add-on available for a customer's plan type, along with each add-on's price. He creates the Plan_Addons decision table with the input column Plan_Type and the output columns Addon_Name and Addon_Price, and sets Filter Result By to Output Order so the table returns every matching row. Miguel's expression set isn't associated with a context definition. Here's how he configures the expression set version:

  • Adds a Lookup Table step and selects the Plan_Addons decision table.
  • Clicks Map Variables, and turns on Process Multiple Decision Table Outputs.
  • Expression Set Builder creates a local list node variable, Plan_Addons_Results, and two local list attribute variables, Addon_Name and Addon_Price, and maps them to the decision table's output columns automatically.
  • Adds a Calculation step that uses LISTSUM on Addon_Price to calculate the combined cost of all available add-ons.

To test the configuration, Miguel simulates the expression set version using the Advanced input mode.

{
  "Plan_Type": "Family Unlimited"
}

Because Plan_Type matches three rows in Plan_Addons, the simulation returns all three matching add-ons in the Plan_Addons_Results list, and the Calculation step returns the sum of their prices.

 
正在載入
Salesforce Help | Article