In the concurrency control model of best price and compound within priority and no compound across, we can have multiple compounded discounts of the same priority, so which one to discount first?
We could have a new property on the discount that indicates the ordering, but we have never had it. Instead, we rely on the discount method for ordering. To be specific, we first process discounts with deal price or unit price as discount method, then those with amount off, and lastly those with percentage off.
For some discounts, like quantity discounts, it is either unit price or percentage off for the whole discount, i.e. we have a uniform discount method for the discount. However, some discounts may cover multiple discount methods in one discount. For example, a simple discount (a.k.a. discount offer) covers the keyboard category for 10% off, and a specific ergo keyboard for $5 off.
When we consider a specific discount application, we often know exactly the discount method. For example, the discount method for $5 off ergo keyboard is amount off.
In some cases, like in marginal value ranking algorithm, we may have to consider a discount as a whole. In this case, we take the highest if it has multiple discount methods. In the aforementioned keyboard discount example, it would be amount off.
In addition, we have three main categories of discount types: for best deal discount, post best deal discount and threshold discount. How we process three main categories of discount types is the top tier, while the effective discount method for compound ordering takes into effect with multiple discounts of the same discount category.
And just to be clear, the concept does not apply in the concurrency control model of best price with priority and compound across, as compounding order is already dictated by priority.