You are here:
Determine the Discount for Orders (Example)
This example shows how an admin can set up a decision table to automate order discount decision process.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, and Unlimited Editions with Loyalty Management or Rebate Management |
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.
A company wants to provide discounts on orders based on the order quantity or the product purchased. The company uses the Order standard object in its Salesforce org to store all its orders. It uses the Product standard object to store all the products. The company adds two fields to the Order object based on its unique requirements: Order Quantity and Discount.
The company’s sales team gives the admin these rules to determine the discount percentage for orders.
| Discount | Rule |
|---|---|
| 5% | Order Quantity: 20–49 OR Product: Running Shoes |
| 10% | Order Quantity: 50–100 OR Product: Athletic Shorts |
To set up and run the decision table, the admin:
- Creates a custom object that contains the discount rules.
- Creates a decision table that reads the discount rules.
- Creates a dataset link and maps the Order and Product object fields with the decision table’s input fields.
- Sets up a flow to run the decision table weekly.
- Custom Object with Product Discount Rules (Example)
You can use standard or custom objects to store decision table rules. In this example, an admin creates a custom object to store discount rules for orders. A decision table uses these rules to determine order discounts. - Create a Decision Table to Determine Order Discount Percentage (Example)
After you create the custom object that contains the business rules, you can create the decision table. In this example, you use a decision table to determine order discount percentages. - Create a Dataset Link to Map Order Fields (Example)
In this example, a decision table is already created to determine the discount percentage for orders. Next, create a dataset link to map the Order and Product object fields with the decision table input fields. The mapping informs the decision table of the Order and Product field values that must be evaluated to decide the discounts. - Design a Flow to Update Order Discounts (Example)
Design a flow that allows the decision table to evaluate all the Order records that don’t have a discount. The flow also updates the evaluated Order records with the discount percentage determined by the decision table.
Did this article solve your issue?
Let us know so we can improve!

