# Best deal support for promotions

When a customer's order qualifies for more than one promotion in the same promotion group, you can enable a feature to ensure that the promotions are applied so that the customer gets the best possible deal. The promotion engine supports an optional best deal feature that automatically compares promotions that have the same priority and applies them in the sequence that offers the lowest overall purchase price.

The best deal feature runs only when:

• A customer's order qualifies for multiple promotions in the same promotion group. The three promotion groups are catalog-entry level promotions, order-level promotions, and shipping promotions.
• The multiple promotions have the same priority.

Even after you enable the best deal feature, you should still aim to control which promotions are applied first to a customer's order by assigning those promotions a higher priority. When you cannot predict the best deal in advance, assign the conflicting promotions the same priority and let the best deal feature do the math.

## How the best deal feature works: comparing promotion evaluation sequences

The best deal feature works by comparing different promotion evaluation sequences for promotions in the same group with the same priority. The best deal feature determines which sequence offers the lowest overall purchase price and then applies the best deal to the order on the storefront.

Consider an order that qualifies for three catalog-entry-level promotions, all with the same priority:

• Promotion X (priority 10)
• Promotion Y (priority 10)
• Promotion Z (priority 10)

Because the promotions have the same priority, the promotion engine could evaluate the promotions in any of the following sequences:

• Promotion X, Promotion Y, Promotion Z
• Promotion X, Promotion Z, Promotion Y
• Promotion Y, Promotion Z, Promotion X
• Promotion Y, Promotion X, Promotion Z
• Promotion Z, Promotion Y, Promotion X
• Promotion Z, Promotion X, Promotion Y

When the best deal feature is enabled, it compares the resulting overall purchase price for all six sequences, and then applies the sequence that offers the best deal.

Note: By default, the best deal logic only compares the discounted product price of an order with different promotion sequences. Discount on shipping charges, value of free gifts, or other types of adjustments, such as loyalty points, are not considered. Customization is required if a store needs to have its own comparison logic.

## Why the promotion evaluation sequence matters

The sequence in which promotions are evaluated can affect the overall purchase price of an order. During the promotion evaluation process, promotions are evaluated one by one, according to the sequence rules defined in the promotion engine, and then according to the priority assigned to the promotion. When a promotion qualifies, its adjustment is applied to the order. The next promotion in the sequence is affected in the following ways:
• The order might not qualify for the next promotion; for example, if the previous promotion is exclusive within its promotion group and the next promotion is in the same group, then the next promotion cannot be applied to the order.
• The adjustment for the next promotion in the sequence might result in a different discount amount than if it is evaluated first; this difference is because in most cases, adjustments are calculated on the discounted price rather than the original price.

## Example of how the best deal feature works

Your store is offering the following two catalog-entry-level promotions:

• Promotion 1: Get 10% off all Furniture
• Promotion 2: Get \$20 off all Desks (note that "Desks" is a subcategory of the "Furniture" category)

You realize that you cannot predict which of these promotions gives customers the best deal when their order qualifies for both promotions. The price range of desks is wide, which makes it hard to tell which promotion offers a better discount without knowing exactly what the customer has in the order. Therefore, you assign the same priority to both promotions so that the best deal feature calculates the lowest overall purchase price for each qualifying order.

Compare the results for two different orders:

Order 1:
• a \$50 desk
• \$100 spent on other furniture
Promotion sequences to compare Discount amount Total order purchase price Result
Sequence A:

Promotion 1, then Promotion 2

\$15 (Promotion 1)* \$150-\$15=\$135
Sequence B:

Promotion 2, then Promotion 1

\$20 (Promotion 2) + \$10 (Promotion 1) \$150-\$20-\$10=\$120 The promotion engine applies Sequence B to the customer's order because it offers the BEST DEAL!
* Only Promotion 1 is applied in Sequence A because each item in an order can participate in only one catalog-entry-level promotion according to the default promotion policies. When Promotion 1 is evaluated first and applied to the desk, Promotion 2 cannot be applied to the desk. (Both promotions are catalog-entry-level promotions.)
Order 2:
• A \$300 desk
• \$100 spent on other furniture
Promotion sequences to compare Discount amount Total order purchase price Result
Sequence A:

Promotion 1, then Promotion 2

\$40 (Promotion 1)* \$400-\$40=\$360 The promotion engine applies Sequence A to the customer's order because it offers the BEST DEAL!
Sequence B:

Promotion 2, then Promotion 1

\$20 (Promotion 2) + \$10 (Promotion 1) \$400-\$20-\$10=\$370
* Only Promotion 1 is applied in Sequence A because each item in an order can participate in only one catalog-entry-level promotion according to the default promotion policies. When Promotion 1 is evaluated first and applied to the desk, Promotion 2 cannot be applied to the desk. (Both promotions are catalog-entry-level promotions.)

For Order 1, Sequence B resulted in the best deal; for Order 2, Sequence A resulted in the best deal.

## Performance considerations for the best deal feature

The best deal feature can impact store performance because the feature requires the promotion engine to evaluate multiple sequences to determine the best deal. To reduce performance impact:

• Think carefully before you assigning the same priority to multiple promotions in the same group; do so only when you cannot determine ahead of time which promotion offers the best deal to customers. If it is clear that one promotion always results in a better deal for customers, then assign it a higher priority so that it is evaluated and applied first. For example, consider the following two promotions that are similar to the previous example, except that the Desk promotion is now 20% off instead of 20\$ off:
• Promotion 1: Get 10% off all Furniture
• Promotion 2: Get 20% off all Desks (note that "Desks" is a subcategory of the "Furniture" category)

Promotion 2 always offers customers a better deal if they purchase a desk, so assign Promotion 2 a higher priority to ensure that it is evaluated before Promotion 1.

• Ask a Site Administrator to set an upper limit for the number of sequences to evaluate on an order. The default value is 50 sequences, but this value can be reduced to limit performance impacts. For more information about sequence limits and other performance considerations, see Performance considerations for the best deal feature