A promotion's PromotionType object describes the discount it gives and the conditions for applying it. Its Type field names the promotion type, and which other fields are populated depends on that type.
Each type has a bit in the proBits capability bitmask. For how each type is applied to a cart, see Applying promotions.
Naming
Each type's name is made of two parts: the kind of promotion, then the kind of discount it gives. For example, CheapestMatchedForDollar is a CheapestMatchedFor promotion with a Dollar discount.
| Promotion type | Kind of promotion | Discount |
|---|
CheapestMatchedForDollar | CheapestMatchedFor | Dollar |
CheapestMatchedForDollarOff | CheapestMatchedFor | DollarOff |
CheapestMatchedForPercentOff | CheapestMatchedFor | PercentOff |
MatchThenCheapestOtherForDollar | MatchThenCheapestOtherFor | Dollar |
MatchThenCheapestOtherForDollarOff | MatchThenCheapestOtherFor | DollarOff |
MatchThenCheapestOtherForPercentOff | MatchThenCheapestOtherFor | PercentOff |
BundleForTotalDollarDistributed | BundleFor | TotalDollarDistributed |
BundleForTotalDollarOffDistributed | BundleFor | TotalDollarOffDistributed |
BundleForPercentOff | BundleFor | PercentOff |
EachMatchedDollarOff | EachMatched | DollarOff |
EachMatchedPercentOff | EachMatched | PercentOff |
All percentages are decimals between 0.0 and 1.0: 0.3 means 30% off.
All fields
Every field a PromotionType can have, and the promotion types that use it. Fields a promotion's type doesn't use are null. The sections below describe each type's fields.
BundleMatch
One element of a BundleFor promotion's bundle.
| Name | Type | Description |
|---|
ProductCondition | ProductCondition | The condition tree that determines which products can be considered as this element of the bundle. |
QuantityToMatch | decimal | The quantity of products matching ProductCondition required to make up this element of the bundle. GramsPerMatchUnit converts gram-based quantities into each-based ones. |
CheapestMatchedFor
Once enough products match ItemsToMatch, the cheapest of them gets the discount. See how to apply them.
CheapestMatchedForDollar
| Name | Type | Description |
|---|
Type | string | CheapestMatchedForDollar |
DollarValueOfCheapest | decimal | The dollar amount to charge for the cheapest product applicable to this promotion. |
ItemsToMatch | ProductCondition | The condition tree that determines which products apply to this promotion. |
NumberToMatch | int32 | The number of items that must pass the ItemsToMatch filter for this promotion to apply. |
GramsPerMatchUnit | decimal | The number of grams that count as a single unit for NumberToMatch. |
MaxApplicationCount | int32? | The maximum number of times this promotion can be applied to a single cart. Null means no limit. |
CheapestMatchedForDollarOff
| Name | Type | Description |
|---|
Type | string | CheapestMatchedForDollarOff |
DollarOffOfCheapest | decimal | The dollar amount to take off the cheapest product applicable to this promotion. |
ItemsToMatch | ProductCondition | The condition tree that determines which products apply to this promotion. |
NumberToMatch | int32 | The number of items that must pass the ItemsToMatch filter for this promotion to apply. |
GramsPerMatchUnit | decimal | The number of grams that count as a single unit for NumberToMatch. |
MaxApplicationCount | int32? | The maximum number of times this promotion can be applied to a single cart. Null means no limit. |
CheapestMatchedForPercentOff
| Name | Type | Description |
|---|
Type | string | CheapestMatchedForPercentOff |
PercentOffOfCheapest | decimal | The percentage discount to apply to the cheapest product applicable to this promotion. |
ItemsToMatch | ProductCondition | The condition tree that determines which products apply to this promotion. |
NumberToMatch | int32 | The number of items that must pass the ItemsToMatch filter for this promotion to apply. |
GramsPerMatchUnit | decimal | The number of grams that count as a single unit for NumberToMatch. |
MaxApplicationCount | int32? | The maximum number of times this promotion can be applied to a single cart. Null means no limit. |
MatchThenCheapestOtherFor
Once enough products match MatchConditions, the cheapest other product matching OtherItemConditions gets the discount. See how to apply them.
MatchThenCheapestOtherForDollar
| Name | Type | Description |
|---|
Type | string | MatchThenCheapestOtherForDollar |
DollarValueOfOther | decimal | The dollar amount to charge for the cheapest item passing the OtherItemConditions filter. |
OtherItemConditions | ProductCondition | The condition tree that determines which products can receive the discount. |
MatchConditions | ProductCondition | The condition tree that determines which products apply to this promotion. |
NumberToMatch | int32 | The number of items that must pass the MatchConditions filter for this promotion to apply. |
GramsPerMatchUnit | decimal | The number of grams that count as a single unit for NumberToMatch. |
MaxApplicationCount | int32? | The maximum number of times this promotion can be applied to a single cart. Null means no limit. |
MatchThenCheapestOtherForDollarOff
| Name | Type | Description |
|---|
Type | string | MatchThenCheapestOtherForDollarOff |
DollarOffOfOther | decimal | The dollar amount to take off the cheapest item passing the OtherItemConditions filter. |
OtherItemConditions | ProductCondition | The condition tree that determines which products can receive the discount. |
MatchConditions | ProductCondition | The condition tree that determines which products apply to this promotion. |
NumberToMatch | int32 | The number of items that must pass the MatchConditions filter for this promotion to apply. |
GramsPerMatchUnit | decimal | The number of grams that count as a single unit for NumberToMatch. |
MaxApplicationCount | int32? | The maximum number of times this promotion can be applied to a single cart. Null means no limit. |
MatchThenCheapestOtherForPercentOff
| Name | Type | Description |
|---|
Type | string | MatchThenCheapestOtherForPercentOff |
PercentOffOfOther | decimal | The percentage discount to apply to the cheapest item passing the OtherItemConditions filter. |
OtherItemConditions | ProductCondition | The condition tree that determines which products can receive the discount. |
MatchConditions | ProductCondition | The condition tree that determines which products apply to this promotion. |
NumberToMatch | int32 | The number of items that must pass the MatchConditions filter for this promotion to apply. |
GramsPerMatchUnit | decimal | The number of grams that count as a single unit for NumberToMatch. |
MaxApplicationCount | int32? | The maximum number of times this promotion can be applied to a single cart. Null means no limit. |
BundleFor
Once the cart has enough of each element in BundleItemsToMatch, every item in the bundle is discounted. See how to apply them.
BundleForTotalDollarDistributed
| Name | Type | Description |
|---|
Type | string | BundleForTotalDollarDistributed |
DollarValueOfAll | decimal | The total dollar amount to charge for all the items in the bundle. |
BundleItemsToMatch | BundleMatch[] | The elements of this bundle. An element can be more than a single quantity. |
GramsPerMatchUnit | decimal | The number of grams that count as a single unit for QuantityToMatch. |
BundleForTotalDollarOffDistributed
| Name | Type | Description |
|---|
Type | string | BundleForTotalDollarOffDistributed |
DollarOffOfAll | decimal | The total dollar amount to take off all the items in the bundle. |
BundleItemsToMatch | BundleMatch[] | The elements of this bundle. An element can be more than a single quantity. |
GramsPerMatchUnit | decimal | The number of grams that count as a single unit for QuantityToMatch. |
BundleForPercentOff
| Name | Type | Description |
|---|
Type | string | BundleForPercentOff |
PercentOffOfAll | decimal | The percentage discount to apply to every item in the bundle. |
BundleItemsToMatch | BundleMatch[] | The elements of this bundle. An element can be more than a single quantity. |
GramsPerMatchUnit | decimal | The number of grams that count as a single unit for QuantityToMatch. |
EachMatched
Every product matching ItemsToMatch gets the discount, with no quantity requirement. See how to apply them.
EachMatchedDollarOff
| Name | Type | Description |
|---|
Type | string | EachMatchedDollarOff |
DollarOffOfEach | decimal | The dollar amount to take off each item passing the ItemsToMatch filter. |
ItemsToMatch | ProductCondition | The condition tree that determines which products receive the discount. |
GramsPerMatchUnit | decimal | The number of grams that count as a single unit when applying the DollarOffOfEach discount. |
EachMatchedPercentOff
| Name | Type | Description |
|---|
Type | string | EachMatchedPercentOff |
PercentOffOfEach | decimal | The percentage discount to apply to every item passing the ItemsToMatch filter. |
ItemsToMatch | ProductCondition | The condition tree that determines which products receive the discount. |