Promotion purchase condition model

This topic discusses how to define and evaluate a single promotion. In particular, it discusses how to define the purchase conditions of a promotion.

Conceptually, a promotion has conditions and rewards. When the conditions of the promotion are satisfied, the corresponding rewards are calculated and applied to an order. A promotion has many types of conditions associated with it.

Primarily, there are 5 different types:

When all of the conditions are satisfied, the rewards are calculated and applied.

The first four types can be considered pre-conditions. They are the constraints a customer must satisfy before the purchase condition is even evaluated. They generally have a simple model and are easy to implement. This document focuses on how to properly model the last type of condition: the purchase condition, and how to calculate rewards in a promotion. It uses mathematical expressions to describe a purchase condition in a promotion and the associated rewards. It also defines the algorithm to evaluate a purchase condition and to calculate the associated rewards.

 

Observations

These are based on some typical promotions, defined below. While these promotions may not be applicable to your store, they represent common patterns:

  1. Buy one to three bottles of water and get 10% off, buy four to six bottles and get 20% off, buy seven or more and get 30%.

  2. Get 10% off the first three bottles of water, 20% off the next three, and 30% of any additional water bottles purchased.

  3. Buy three bottles of water for $20.

  4. Buy a water cooler and one bottle of water for $129.

  5. Buy a water cooler, and then buy up to four bottles of water at 50% off.

  6. Buy three three-gallon or five-gallon water bottles and get 10% off.

  7. Buy three water bottles of the same size (either three-gallon or five- gallon), and get 10% off.

  8. Buy a water cooler and a five gallon water bottle, and get 10% off the water cooler and get the water bottle for $1.

  9. Buy a water cooler and a water bottle for $129 or free shipping.

  10. Buy a water cooler and a water bottle for $129 and free shipping.

  11. Buy a water cooler and a water bottle valued at $150 or more, and get free shipping.

  12. Spend $100-$200 on water bottles, and get 10% off; $200 to $300, and get 20%; spend $300, and get 30% off.

First, determine how to determine whether a promotion is applicable. Consider promotions 1 and 2:

This is usually what a cashier would do at the check-out counter:

  1. Find all water bottles in an order.

  2. Based on the quantity determine which range the quantity falls in.

  3. Applied the adjustments associated with that range to the water bottles.

A more abstract description of the preceding process:

  1. Identify purchase patterns targeted by promotion (one single water bottle is a purchase pattern targeted by the promotion; this pattern may occur multiple times in an order).

  2. Based on the number of times a pattern occurs, determine the distribution (one-three, four-six, or seven or more).

  3. Based on the distribution, calculate the rewards associated with that range (10%, 20%, or 30%).

Observation 1: The evaluation of a promotion may be done through a three-step process of pattern recognition, quantity distribution, and reward calculation.

This three-step process is used to determine whether a promotion is applicable.

Observation 2: A purchase pattern is usually defined by specifying some selection criteria, such as "any water bottle".

The difference between the two promotions lies in the way that the quantity distribution is handled. If you buy X number of water bottles, depending on where X falls, in promotion 1, each of the water bottles is discounted the same way, whereas in promotion 2, they will be divided into tiers and discounted differently. We call the first type of distribution a volume based distribution, and the second type, a tiered distribution.

Observation 3: The quantity distribution is either volume based or tiered.

In the previous samples, the purchase pattern is made up of one single item, that is, a bottle of water. This may not be the case. For example, in promotion 3: "Buy three bottles of water for $20", each unit of three bottles of water is the targeted purchase pattern.

Observation 4: There is usually a quantity requirement associated with the selection criteria. If a match of a purchase pattern is to be present in an order, both the selection criteria and the quantity requirement need to be satisfied.

In promotions 1-3, the promotion always targets a single type of item in the patterns, namely, a water bottle. In promotion 4: "Buy a water cooler and one bottle of water for $129", the targeted pattern is a combination of a water cooler and a water bottle. This leads to the next observation.

Observation 5: If each combination of a selection criteria and a quantity requirement is considered as a single constraint of a purchase pattern, a purchase pattern may be defined through multiple such constraints.

Consider promotion 5: "Buy a water cooler, take up to four bottles of water at 50%". In this case, if a customer buys one water cooler and one bottle of water, the purchase pattern is a match. If a customer buys one water cooler and two bottles of water, the purchase pattern is also a match; in fact if the customer buys one water cooler and anywhere between one and four bottles of water, the pattern is always a match.

Observation 6: The quantity requirement contained in the definition of a purchase pattern can be either a single value or a range.

Promotions 6 and 7 are defined as:

While both promotions target three and five-gallon water bottles, and the quantity requirement is the same (three), promotion 7 requires that all of the water bottles must be of the same size (homogeneous), promotion 6 does not (heterogeneous). Two three-gallon water bottles and one five-gallon water bottle would have satisfied promotion 6, but not promotion 7. Another way to look at this difference is to distinguish these two by the level at which the selection criteria are joined by a logical "or". In promotion 6, the "or" is at a lower level: three (three or five) gallon water bottles, while in promotion 7, the "or" is at a higher level: three three-gallon or three five-gallon water bottles.

Observation 7: When the selection criteria conveys a logical "or" semantic, and the quantity requirement indicates that a list is expected, the list may be either homogeneous or heterogeneous.

Promotion 8, "Buy a water cooler and a five-gallon water bottle, and get 10% off the water cooler and get the water bottle for $1", reveals that the targeted purchase pattern is a water cooler and a water bottle, while the rewards are different for the water cooler and the water bottle.

Observation 8: Rewards to different items in a target purchase pattern can be different.

Promotion 9, "Buy a water cooler and a water bottle for $129 or free shipping", presents a choice of either free shipping or a fixed price for the item.

Observation 9: Rewards for a purchase pattern can be presented as a choice of multiple options.

In promotion 10, "Buy a water cooler and a water bottle for $129 and free shipping", if the customer has purchased both a water cooler and a bottle of water, they get the package for $129 and the free shipping.

Observation 10: Multiple rewards can be applied to items in a purchase pattern.

Assume a customer has purchased two water coolers and two water bottles. One water cooler is an entry version priced at $69, and a water bottle priced at $10; the second is a deluxe water cooler priced at $169, and a water bottle priced at $20. If we apply promotion 11, "Buy a water cooler and a water bottle valued at $150 dollar or more get free shipping", to this order, two patterns of "1 cooler and 1 bottle" are identified. However, only the deluxe cooler and water bottle is eligible for the promotion.

Observation 11: A filter on matched purchase patterns is required in the some cases to narrow the matched purchase patterns to the ones targeted by a promotion.

Compare promotion 1 and 12:

Notice that they target the same pattern: a water bottle. Both promotions have three ranges and the same reward associated with each range. The difference is that in promotion 1, a range is defined based on the number of water bottles purchased, while in promotion 12, the range is defined based on spending thresholds. This leads to our last observation:

Observation 12: The quantity distribution as mentioned in the three-step promotion evaluation process could exceed the distribution of quantity, it could be based on either quantity (or to be more precise, the number of matches for a purchase pattern in the order) or spending. Similarly, a spending threshold distribution can be volume based or tiered.

Henceforth, the generic term, "distribution" refers to both a quantity distribution and a spending distribution.

 

The model

First, let's list all of the observations made in the previous section:

  1. The evaluation of promotion may be done through a three-step process of pattern recognition, quantity distribution and reward calculation.

  2. Purchase pattern usually is defined by specifying some selection criteria (any water bottle).

  3. The quantity distribution could be a volume based or tiered.

  4. Besides selection criteria, there usually is a quantity requirement associated with the selection criteria. If a match of a purchase pattern is to be present in an order, both the selection criteria and the quantity requirement need to be satisfied.

  5. If each selection criteria and quantity requirement combination could be called one constraint of a purchase pattern, a purchase pattern may be defined through multiple of these constraints.

  6. The quantity requirement that is part of the definition of a purchase pattern can be either a single value or a range.

  7. When the selection criteria convey an "or" semantic and the quantity requirement indicates a list is expected, in some cases the list is a homogeneous list, in other cases the list is a heterogeneous list.

  8. Rewards to different items in a target purchase pattern can be different.

  9. Rewards for a purchase pattern can be presented as a choice of multiple options.

  10. Multiple rewards can be applied to items in a purchase pattern.

  11. A filter on matched purchase patterns is needed in the some cases to narrow the matched purchase patterns to the ones targeted by a promotion.

  12. The quantity distribution as mentioned in the three-step promotion evaluation process could be more than the distribution of quantity, it can base on either quantity (or to be more precise, the number of matches for a purchase pattern in the order) or spending, similarly a spending threshold distribution can be volume based or tiered.

Based on these observations, you can define the model for promotion using mathematical expressions.

These mathematical expressions require some common notations:

  1. mn

  2. [quantity(L)/size(quantity(L),r)]*size(quantity(L),r) -> 0

  3. [quantity(L)/size(quantity(L),r)]*size(quantity(L),r) -0

The pattern filter concept is first mentioned in Observation 11.

Similarly, Dv and Dt can be calculated for the spending threshold based on the cost function of line item set. Refer to Observation 12.

If D(L)=, each pij is a line item set. It contains the line items in L that make up one match for the pattern; the content of Pi is determined by the distribution logic mentioned earlier in this document.

If for D(L)=(P1, P2,..., Pn)T and P1=P2=...= Pn={}, then the purchase condition is not satisfied, otherwise the purchase condition is satisfied.

In the preceding formula, d1, d2, ...,and dn as well as f1, f2, ..., fn can be viewed as the configuration of a and line item set L is the only parameter. The expression can be interpreted as the collective result of applying adjustment of di to a sub set of L as identified by filter fi.

the preceding definition reflects observation 8, where different items in the purchase pattern match can be rewarded differently. The filters fi determines the set of items in a purchase pattern match (L) that will be rewarded by applying di. to them.

Also, note that we did not specify that fi(L) 3 fj(L) has to be a empty set. When fi(L) 3 fj(L) is not empty, which means that certain items in L are rewarded by both di and dj, that is, multiple rewards can be applied to the same items. Refer to Observation 10.

the result is a set, not a matrix. It is expressed in a line by line format to illustrate that each line has a different reward associated with it.

If a choice of different rewards can be granted for patterns in a segment in the distributions (Refer to Observation 9), the reward can be rewritten as:


Where

where 1in, that is, a choice between a1(L), a2(L), ..., an(L).