Loading
Salesforce now sends email only from verified domains. Read More
Decision Table
Understand How Outcome Sorting Works

Understand How Outcome Sorting Works

When creating a decision table, you can specify a sort order for the outcomes based on the values of either an input or an output sort by field. Outcomes are finally sorted based on the value of the sort by field in the outcome’s record and the sort order.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, and Unlimited Editions with Loyalty Management or Rebate Management
Note
Note Decision tables are also available as part of Business Rules Engine. If your org has Business Rules Engine enabled, see Decision Tables for Business Rules Engine.

You can use these sort orders to sort outcomes:

Sort Order Description Example
Ascending with Blank Value First The decision table checks the values of the selected sort by field in the outcome records and provides the outcomes in the ascending order. The outcome that doesn’t contain a value for the sort by field in one of the outcome records is provided first.
  • Numerical: 5, 2.5, 10, 15, 20
  • Text: Delhi, Adelaide, California, London, Naples

The records that provided 5 and Delhi as the outcomes don’t contain a value for the sort by field.

Ascending with Blank Value Last The decision table checks the values of the selected sort by field in the outcome records and provides the outcomes in the ascending order. If the field doesn’t have a value in any one of the outcome records, then that outcome is provided last.
  • Numerical: 2.5, 10, 15, 20, 5
  • Text: Adelaide, California, London, Naples, Delhi

The records that provided 5 and Delhi as the outcomes don’t contain a value for the sort by field.

Descending with Blank Value First The decision table checks the values of the selected sort by field in the outcome records and provides the outcomes in the ascending order. If the field doesn’t have a value in any one of the outcome records, then that outcome is provided last.
  • Numerical: 5, 20, 15, 10, 5, 2.5
  • Text: Delhi, Naples, London, California, Adelaide

The records that provided 15 and Delhi as the outcomes don’t contain a value for the sort by field.

Descending with Blank Value Last The decision table checks the values of the selected sort by field in the outcome records and provides the outcomes in the ascending order. If the field doesn’t have a value in any one of the outcome records, then that outcome is provided last.
  • Numerical: 20, 15, 10, 5, 2.5, 5
  • Text: Naples, London, California, Adelaide, Delhi

The records that provided 5 and Delhi as the outcomes don’t contain a value for the sort by field.

Note
Note Outputs can’t be sorted based on picklist and multi-select picklist fields.
 
Loading
Salesforce Help | Article