Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Dynamics Retail Discount Concepts: Discount Deal Estimate

Please read marginal value ranking algorithm first, as Discount Deal Estimate is a core ingredient of the algorithm.

In short, average marginal value = (total discount with overlapped – total without) / overlapped quantity.

In addition to its identity: offerId, we need three basic properties for discount deal estimate (DiscountDealEstimate): totalDiscountAmountWithOverlapped, totalDiscountAmountWithoutOverlapped, itemGroupIndexToQuantityNeededFromOverlappedLookup of type Dictionary.

You may wonder why we cannot have overlappedQuantityNeeded for the last one. In pricing zone concurrency model, multiple compounded discounts of the same priority can be compounded together. As such, we compound all compounded discounts into one estimate, comparing it to best-price discounts. Having the details of overlapped quantities avoids double counting when we compound estimates. Speaking of compound, the estimate needs canCompound.

For compete within priority and compound across concurrency model, compound does not apply because compound discounts compete against each other within the same priority.

public DiscountDealEstimate(
bool canCompound,
string offerId,
decimal totalDiscountAmountWithOverlapped,
decimal totalDiscountAmountWithoutOverlapped,
Dictionary itemGroupIndexToQuantityNeededFromOverlappedLookup)

Lastly, internally, it can take optional maxOverlappedQuantityNeeded. For mix and match with fixed quantity setup, itemGroupIndexToQuantityNeededFromOverlappedLookup can be over-estimated.

Related: Retail Discount Knapsack – Marginal Value Ranking Algorithm I

Share the post

Dynamics Retail Discount Concepts: Discount Deal Estimate

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×