You are here:
Create a Decision Table
Create a decision table and select the object or the custom metadata type that contains the business rules. Select the input fields from the business rules object or the custom metadata type for the decision table to read. Select one or more output fields that contain the values that are used to calculate outcomes.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, and Unlimited Editions with Loyalty Management or Rebate Management |
| User Permissions Needed | |
|---|---|
| To create, edit, and activate a decision table: | System Administrator profile |
To determine when a decision table provides outcomes, always select one of these input field conditions.
| Condition | How it Works | Business Rules (Example) | Evaluated Values (Example) | Output (Example) |
|---|---|---|---|---|
| All conditions are met (AND) | The decision table evaluates all the business rules against the values provided. If all the evaluated values match the corresponding input fields, the decision table provides the output field values of the matched business rules as the outcomes. | Three business rules contain three input fields and one output field. Rule 1:
Rule 2:
Rule 3:
The business rules are sorted based on the Discount field and the sort order is Ascending with Blank Value Last. |
The decision table provides outcomes for each of the three orders. Order 1:
Order 2:
Order 3:
|
|
| Any condition is met (OR) | The decision table evaluates all the business rules against the values provided. If any one of the evaluated values matches the corresponding input field, the decision table provides the output field values of the matched business rules as the outcomes. |
|
||
| Custom logic | The decision table evaluates all the business rules against the values provided. Based on the custom logic, if the values match, the decision table provides the output field values of the matched business rules as the outcomes. | Logic: (1 AND 2) OR 3
|
A decision table can contain up to 10 input columns and 5 output columns, and read up to 100,000 rules. If the object or the custom metadata type contains more than 100,000 rules, the decision table reads only the first 100,000 based on the creation date. To create a decision table:
- From Setup, in the Quick Find box, enter Decision Tables, and then select Decision Tables.
- Click New.
-
Provide these details.
Field Value Name Enter the name of the decision table. The API name is auto-populated based on the name you enter. Source Object Select the object that contains the business rules for the decision table to read. - Click Next.
-
Select the fields to be used as inputs, and select an operator for each.
The operator allows you to decide how a particular field from the business rule evaluates a record or a user-specified value. For example, for a picklist field that contains the brand names with product discounts, the operator is Equals. The operator allows the decision table to compare the brand names specified in the rules against the value in the record or the user-specified value being evaluated. The outcome is the output field of the rule that contains the brand name that equals the record field or the user input.
Note If you select a Picklist (Multi-Select) type input field, the decision table reads up to 512 characters. So the first set of picklist values that total 512 characters are considered. This limit includes semicolons used as value separators. A decision table can also read the first 15 digits in a number field. - To group your business rules, select a frequently used input value, and then assign the Equals operator.
-
Select the output fields.
A Picklist (Multi-Select) type field can't be selected as an output field.
-
To sort outcomes, select the sort order for the field based on whose values the outcomes
must be sorted.
Outputs can’t be sorted based on picklist and multi-select picklist fields.
- Select Don't Use for fields that you don’t want the decision table to consider.
- Click Next.
- Select the input fields condition.
-
If you select Custom Logic, specify the logic.
Tip The Number column indicates the sequence number of the fields. If you have three input fields and want to use a custom logic to ensure that outputs are provided when field 1 and 2 match or when field 3 matches, specify (1 AND 2) OR 3. -
If you want to group the business rules, select the input fields condition as
All conditions are met (AND), and then select a value for Group
By.
You can’t group business rules with OR or custom condition types.
- Save your changes.
- Supported Data Types and Operators
Decision tables support specific field types as inputs and outputs. A field’s data type determines the operators that are available for it. - 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.

