What you’ll build
A pricing decision that:- Applies tiered discounts based on customer loyalty level
- Adds volume discounts for large orders
- Stacks promotional codes
- Calculates final price with all adjustments
Want to skip ahead? Download the completed decision and import it directly.
Decision flow
Example input
Step 1: Customer tier discounts
Create a decision table for base discounts by customer tier:Inputs
Outputs
- Platinum customers always get 20%
- Gold customers get 15% after 3 years, 12% before
- Silver customers get 10% after 2 years, 8% before
- Everyone else gets 5%
Step 2: Volume discounts
Add another decision table for quantity-based discounts:Inputs
Outputs
Step 3: Promotional codes
Handle promo codes with another table:Inputs
Outputs
Step 4: Calculate final price
Use an expression node to combine all discounts:
Key logic:
- Calculate savings from each discount type
- Cap total discount at 40% to protect margins
- Round to 2 decimal places
Testing scenarios
| Scenario | Expected result |
|---|---|
| Gold customer, 3+ years, 12 items, no promo | 15% tier + 5% volume = 20% off |
| New customer, 5 items, NEWUSER code | 5% tier + 15% promo = 20% off |
| Platinum, 50 items, SUMMER20 | Capped at 40% (would be 50%) |
Output structure
Variations
Time-based pricing
Add date conditions for seasonal pricing:Inputs
Outputs
Geographic pricing
Adjust by region:Inputs
Outputs