What a pricing engine does
The final price is rarely just the list price. A pricing engine layers base price, customer segment, quantity breaks, promotions, coupons, and taxes into one final number, consistently and explainably.
Ordering matters
- Promotions and discounts must apply in a defined order so results are deterministic.
- Decide whether discounts stack or whether only the best one applies.
- Resolve conflicts with explicit priority so two rules do not silently fight.
Correctness concerns
- Round at the right step to avoid penny drift.
- Produce a price breakdown so support and the buyer can see why the total is what it is.
- Cache stable parts but recompute promotion eligibility per cart.
Key idea
A pricing engine layers base price, segment, promotions, coupons, and tax in a defined order with explicit stacking rules, producing a deterministic and explainable final total.