Loading
Feature Degradation | Agentforce Voice Read More
Decision Table
Business Rules

Business Rules

Decision tables provide outcomes based on business rules. Rules are defined as records in a standard object, custom object, or a custom metadata type. A decision table can read up to 100,000 rules.

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.

The object or the custom metadata type contains fields that are used as inputs and outputs in the decision table. Input fields use values from the business rules to evaluate field values or user-specified values, and provide outcomes.

When values match a particular rule, the decision table provides the value of the output field of the matched rule as the outcome. If a value matches multiple rules, the decision table provides a list of outcomes.

Important
Important If a rule doesn't have values for specific input fields, the decision table ignores the blank fields when evaluating a value. The decision table then can provide multiple outcomes. An outcome results when the specified values match with a rule based on the input fields condition of the decision table. Outcomes result when rules that don't have values for one or more input fields and the values of the remaining input fields match based on the input fields condition.

Group your business rules with a frequently used input field and run up to 1,000,000 calls in an hour.

Note
Note You can't use these standard objects as the source for your rules:
  • Account
  • Contact
  • Lead
  • Opportunity
  • Case
Example
Example A company has three business rules. The first rule is that a product that's categorized as a shoe and is priced at US$500 or less is discounted by 5%. The second rule is that shoes priced between US$500 and US$1,500 are discounted by 10%. The third rule is that all products up to US$2,000 are discounted by 8%. The custom object that contains the rules is named Product Discount Rules. The object contains four fields: Category, Lowest Price Point, Highest Price Point, and Discount. The object contains three rules, each containing the details of one rule.

The first record contains these values:

  • Category: Shoe
  • Lowest Price Point: US$0
  • Highest Price Point: US$500
  • Discount: 5%

The second record contains these values:

  • Category: Shoe
  • Lowest Price Point: US$501
  • Highest Price Point: US$1,500
  • Discount: 10%

The third record contains these values:

  • Category: —
  • Lowest Price Point: US$0
  • Highest Price Point: US$2,000
  • Discount: 8%

Category, Lowest Price Point, and Highest Price Point are inputs in the decision table and Discount is the output. A shoe worth US$400 is evaluated by the decision table. It checks the rules and provides 5% as the outcome because the shoe matches the first rule. When the decision table evaluates another shoe priced at US$750, it provides two outcomes: 10% and 8% because the product matches the second and third rules. It matches the third rule because an input field (Category) in the rule doesn't have a value, and the shoe isn't evaluated against that input field. So, based on the price alone, the shoe also matches the third rule.

  • Business Rule Grouping
    Group your business rules with a frequently used input field to reduce the number of rows to process. Grouping splits your business rules into multiple groups and evaluates only the required group.
 
Loading
Salesforce Help | Article