More than a number
A pricing and promotions engine computes the final price a shopper pays. The base price is just the start; on top sit taxes, coupons, percentage discounts, bundles, and loyalty rewards.
Rules and ordering
Promotions are rules: conditions and effects. The order in which they apply matters, because a percentage off then a fixed amount off gives a different total than the reverse. The engine must define a deterministic evaluation order.
Stacking and conflicts
- Stacking decides whether multiple promotions can combine.
- Exclusivity marks promotions that cannot be used together.
- A best price strategy may evaluate several valid combinations and pick the cheapest for the shopper.
Design concerns
- Keep the engine deterministic and explainable so support can tell a shopper why they paid a price.
- Recompute at checkout, never trust a price the client sends, to prevent price tampering.
Key idea
Treat promotions as ordered, stackable rules evaluated deterministically and always recompute the final price server side.