Performance considerations for the best deal feature

The best deal feature provides a way to ensure that our customers get the best deal possible when their order qualifies for multiple promotions in the same promotion group with the same priority. There is, however, a performance cost for the feature because the promotion engine must evaluate a potentially large number of sequence combinations to determine the best deal. To manage performance impacts, we can raise or lower the default upper limit for the number of sequence evaluations per order.


Determining an appropriate sequence combination limit for the store

By default, the best deal feature is configured to allow 50 sequence combinations per order. When this limit is reached, the promotion engine stops evaluating sequence combinations and selects the best deal from among the sequence combinations that are evaluated. If the limit is set too low for the store, then certain orders might not get the best possible deal. If the limit is set too high, then the store might experience performance problems.

Estimate how many sequence combinations the promotion engine might need to evaluate to apply the best deal feature to a customer’s order on the storefront. We can then set an appropriate sequence combination limit that is based on your estimate to minimize performance impacts of the feature.

Use the following worksheet to gather the relevant data from the Marketing Manager for the store. Then, plug the data into the following formula to estimate the potential number of sequence combinations for our store.

Worksheet to gather best deal promotion data from Marketing Manager
Question for Marketing Manager Answer
How many promotion sets does the store typically have active on the storefront at the same time?

Definition of a promotion set: two or more promotions within the same promotion group assigned the same priority.

Number of sets: _____

For each set, how many promotions are in the set?

Set 1: _____ (S1)

Set 2: _____ (S2)

Set 3: _____ (S3)

Set 4: _____ (S4)

Set 5: _____ (S5)

Set n: _____ (Sn)

To estimate the potential number of sequence combinations for the store, plug the data from the worksheet into the following formula:

Example: Consider a store that has two promotion sets:

The completed worksheet can look like the following table:

Question for Promotions Manager Answer
How many promotion sets does the store typically have active on the storefront at the same time?

Definition of a promotion set: two or more promotions within the same promotion group assigned the same priority.

Number of sets: 2

For each set, how many promotions are in the set?

Set 1: 2

Set 2: 4

Use the formula, the estimated potential number of sequence combinations for the store is: 2! x 4! = 2 x 24 = 48 possible sequence combinations. Based on this example, an appropriate sequence combination limit might be 48.


Restricting promotion groups and promotions for promotion groups

We can improve the performance of the Promotion Engine when it is evaluating the best deal logic by restricting which promotion groups are processed with the best deal logic. The Promotion Engine can also be configured to restrict the number of promotions that are processed for each promotion group with the best deal logic. Restricting the number of promotions to be considered for each promotion group can improve the performance of processing with the best deal logic. If you do not configure the best deal logic to restrict the number of promotions per promotion group and the number of promotions, all promotions per promotion group and all promotion groups use the best deal logic. We can restrict these promotions and promotion groups by changing the following configuration flags in the WCSPromotionEngineConfig.xml file:

Consider the following guidelines when you configure the best deal support.

The following code in bold demonstrates how to change the configuration of these flags to restrict the maximum number of promotions per group to 3 promotions, and restrict the number of promotion groups to include only order level promotions: