Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Promotion Rule Configuration Templates

Use promotion rule configuration templates to define event and reward structures for each rule. This reference explains each supported template and includes JSON examples for each variant.

Supported Promotion Templates Reference

Template Name Category Event Configuration Supported Reward Types
SimpleCartRewards Spend-based spendRange (minimum, maximum) ProvideDiscount, IssueVoucher, AssignBadge, CreditFixedPoints
SimpleLineLevelRewards Spend-based spendRange (minimum, maximum) ProvideDiscount (discountLevel: LineItem)
SimpleUnitPriceRewards Spend-based spendRange (minimum, maximum) ProvideDiscount (with discountedItems)
SimpleComboRewards Spend-based spendRange (minimum, maximum) ProvideDiscountedCombo
BuyXToGetRewards Purchase-based allOf -> anyOf (purchaseType, applicablePurchaseList, purchaseCriteria) ProvideDiscount, IssueVoucher
BuyXToGetDiscountOnY Purchase-based allOf -> anyOf (purchaseType, applicablePurchaseList, purchaseCriteria) ProvideDiscount (with discountedItems), GiveFreeProduct
BuyXToGetUnitPriceDiscount Purchase-based allOf -> anyOf (purchaseType, applicablePurchaseList, purchaseCriteria) ProvideDiscount (PriceOverride), GiveFreeProduct
BuyXToGetY Purchase-based allOf -> anyOf (purchaseType, applicablePurchaseList, purchaseCriteria) ProvideDiscountedCombo, IssueVoucher, CreditFixedPoints, CreditMultiplierPoints, AssignBadge, AssignGame
CustomPromotion Custom criteriaList (conditionList with contextTagName, operator, valueList) + aggregationConfiguration ProvideDiscount (with subType)
GetRewardsBasedOnSellingModel Selling Model allOf -> anyOf (with sellingModelType) ProvideDiscount
AccrualPromotion Loyalty spendRange (minimum) or criterionType-based CreditFixedPoints, CreditMultiplierPoints, Vouchers, Badges

SimpleCartRewards

Use the SimpleCartRewards template to provide cart-level rewards such as discounts, vouchers, badges, or loyalty points when the customer cart total falls within a configured spend range.

  • Category: Spend-based
  • Event Configuration: spendRange with minimum (required) and maximum (optional)
  • Supported Reward Types: ProvideDiscount, IssueVoucher, AssignBadge, CreditFixedPoints
JSON example

Percentage discount on cart spend range

1{
2  "rules": [
3    {
4      "templateName": "SimpleCartRewards",
5      "ruleName": "SampleRule",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "spendRange": {
10            "minimum": 50,
11            "maximum": 1000
12          }
13        }
14      ],
15      "rewardConfiguration": [
16        {
17          "type": "ProvideDiscount",
18          "rewardDetails": {
19            "discountValue": 10,
20            "discountType": "PercentageOff"
21          },
22          "targetAudience": {
23            "audienceType": "AllMembers"
24          }
25        }
26      ]
27    }
28  ]
29}
JSON example

Voucher reward with journal type targeted at loyalty members

1{
2  "rules": [
3    {
4      "templateName": "SimpleCartRewards",
5      "journalType": "Customer Purchase",
6      "priority": 1,
7      "ruleName": "Rule1",
8      "eventConfiguration": [
9        {
10          "spendRange": {
11            "minimum": 10
12          }
13        }
14      ],
15      "rewardConfiguration": [
16        {
17          "isPrimaryReward": true,
18          "type": "ProvideDiscount",
19          "rewardDetails": {
20            "discountValue": 5,
21            "discountType": "PercentageOff"
22          },
23          "targetAudience": {
24            "audienceType": "AllMembers"
25          }
26        },
27        {
28          "type": "IssueVoucher",
29          "rewardDetails": {
30            "voucherDefinition": {
31              "name": "TestVDef1"
32            }
33          },
34          "targetAudience": {
35            "audienceType": "AllMembers"
36          }
37        }
38      ]
39    }
40  ]
41}

SimpleLineLevelRewards

Use the SimpleLineLevelRewards template to provide line-item discounts on specific products when the customer cart total falls within a configured spend range.

  • Category: Spend-based
  • Event Configuration: spendRange with minimum (required) and maximum (optional)
  • Supported Reward Types: ProvideDiscount (with discountLevel: "LineItem")
JSON example

Line-item discount on specific products

1{
2  "rules": [
3    {
4      "templateName": "SimpleLineLevelRewards",
5      "ruleName": "testRule",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "spendRange": {
10            "minimum": 200,
11            "maximum": 500
12          }
13        }
14      ],
15      "rewardConfiguration": [
16        {
17          "type": "ProvideDiscount",
18          "rewardDetails": {
19            "discountValue": 100,
20            "discountType": "PercentageOff",
21            "discountLevel": "LineItem",
22            "discountedItems": [
23              {
24                "discountedItemType": "Product",
25                "discountedItemList": [
26                  {
27                    "name": "insertProductName"
28                  }
29                ]
30              }
31            ]
32          },
33          "targetAudience": {
34            "audienceType": "AllMembers"
35          }
36        }
37      ]
38    }
39  ]
40}

SimpleUnitPriceRewards

Use the SimpleUnitPriceRewards template to provide unit-price or amount-off discounts on specific products when the customer cart total falls within a configured spend range.

  • Category: Spend-based
  • Event Configuration: spendRange with minimum (required) and maximum (optional)
  • Supported Reward Types: ProvideDiscount (with discountedItems)
JSON example

Amount-off discount on specific products

1{
2  "rules": [
3    {
4      "templateName": "SimpleUnitPriceRewards",
5      "ruleName": "testRule",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "spendRange": {
10            "minimum": 200,
11            "maximum": 500
12          }
13        }
14      ],
15      "rewardConfiguration": [
16        {
17          "type": "ProvideDiscount",
18          "rewardDetails": {
19            "discountValue": 100,
20            "discountType": "AmountOff",
21            "discountedItems": [
22              {
23                "discountedItemType": "Product",
24                "discountedItemList": [
25                  {
26                    "name": "insertProductName"
27                  }
28                ]
29              }
30            ]
31          },
32          "targetAudience": {
33            "audienceType": "AllMembers"
34          }
35        }
36      ]
37    }
38  ]
39}

SimpleComboRewards

Use the SimpleComboRewards template to provide discounted combo or bundle offers on qualifying products when the customer cart total falls within a configured spend range.

  • Category: Spend-based
  • Event Configuration: spendRange with minimum (required) and maximum (optional)
  • Supported Reward Types: ProvideDiscountedCombo
JSON example

Discounted combo offer on products

1{
2  "rules": [
3    {
4      "templateName": "SimpleComboRewards",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "spendRange": {
10            "minimum": 200,
11            "maximum": 500
12          }
13        }
14      ],
15      "rewardConfiguration": [
16        {
17          "type": "ProvideDiscountedCombo",
18          "rewardDetails": {
19            "discountValue": 10,
20            "discountedItems": [
21              {
22                "discountedItemType": "Product",
23                "discountedItemList": [
24                  {
25                    "name": "insertProductName"
26                  }
27                ],
28                "discountDetails": {
29                  "type": "Quantity",
30                  "value": 10
31                }
32              }
33            ]
34          },
35          "targetAudience": {
36            "audienceType": "AllMembers"
37          }
38        }
39      ]
40    }
41  ]
42}
JSON example

Discounted combo targeted at loyalty tier members

1{
2  "rules": [
3    {
4      "templateName": "SimpleComboRewards",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "spendRange": {
10            "minimum": 200,
11            "maximum": 500
12          }
13        }
14      ],
15      "rewardConfiguration": [
16        {
17          "type": "ProvideDiscountedCombo",
18          "rewardDetails": {
19            "discountValue": 10,
20            "discountedItems": [
21              {
22                "discountedItemType": "Product",
23                "discountedItemList": [
24                  {
25                    "name": "insertProductName"
26                  }
27                ],
28                "discountDetails": {
29                  "type": "Quantity",
30                  "value": 10
31                }
32              }
33            ]
34          },
35          "targetAudience": {
36            "audienceType": "LoyaltyTierMembers",
37            "audienceDetails": {
38              "tierGroup": {
39                "name": "insertTierGroupName"
40              },
41              "tier": {
42                "name": "insertTierName"
43              }
44            }
45          }
46        }
47      ]
48    }
49  ]
50}

BuyXToGetRewards

Use the BuyXToGetRewards template to provide discounts, vouchers, or other rewards when customers purchase qualifying products or product categories.

  • Category: Purchase-based
  • Event Configuration: allOf array containing anyOf objects with purchaseType, applicablePurchaseList, and purchaseCriteria. Supports buyNoPreCondition, buyFromAnyProduct, and eventExclusionInfo.
  • Supported Reward Types: ProvideDiscount, IssueVoucher
JSON example

Discount when specific products are purchased

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetRewards",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                }
22              }
23            }
24          ]
25        }
26      ],
27      "rewardConfiguration": [
28        {
29          "type": "ProvideDiscount",
30          "rewardDetails": {
31            "discountValue": 100,
32            "discountType": "PercentageOff"
33          },
34          "targetAudience": {
35            "audienceType": "LoyaltyTierMembers",
36            "audienceDetails": {
37              "tierGroup": {
38                "id": "insertTierGroupId"
39              },
40              "tier": {
41                "id": "insertTierId"
42              }
43            }
44          }
45        }
46      ]
47    }
48  ]
49}
JSON example

No purchase pre-condition

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetRewards",
5      "ruleName": "Abcde",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "buyNoPreCondition": true
10        }
11      ],
12      "rewardConfiguration": [
13        {
14          "type": "ProvideDiscount",
15          "rewardDetails": {
16            "discountValue": 10,
17            "discountType": "PercentageOff"
18          },
19          "targetAudience": {
20            "audienceType": "AllMembers"
21          }
22        }
23      ]
24    }
25  ]
26}
JSON example

With product exclusions

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetRewards",
5      "ruleName": "Rule1",
6      "priority": 1,
7      "journalType": "Customer Purchase",
8      "eventConfiguration": [
9        {
10          "buyFromAnyProduct": true,
11          "allOf": [
12            {
13              "anyOf": {
14                "purchaseType": "Product",
15                "purchaseCriteria": {
16                  "type": "Quantity",
17                  "value": 2
18                }
19              }
20            }
21          ],
22          "eventExclusionInfo": [
23            {
24              "exclusionType": "Product",
25              "exclusionList": [
26                {
27                  "name": "insertProductName"
28                }
29              ]
30            }
31          ]
32        }
33      ],
34      "rewardConfiguration": [
35        {
36          "type": "ProvideDiscount",
37          "rewardDetails": {
38            "discountValue": 10.0,
39            "discountType": "PercentageOff"
40          },
41          "targetAudience": {
42            "audienceType": "AllMembers"
43          }
44        }
45      ]
46    }
47  ]
48}

BuyXToGetDiscountOnY

Use the BuyXToGetDiscountOnY template to provide discounts or free-product rewards on target products when customers purchase qualifying products.

  • Category: Purchase-based
  • Event Configuration: allOf array containing anyOf objects with purchaseType, applicablePurchaseList, and purchaseCriteria
  • Supported Reward Types: ProvideDiscount (with discountedItems), GiveFreeProduct
JSON example

Discount on product Y when product X is purchased

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetDiscountOnY",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName1"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                }
22              }
23            }
24          ]
25        }
26      ],
27      "rewardConfiguration": [
28        {
29          "type": "ProvideDiscount",
30          "rewardDetails": {
31            "discountValue": 100,
32            "discountType": "PercentageOff",
33            "discountLevel": "CombinedLineItemPrice",
34            "discountedItems": [
35              {
36                "discountedItemType": "Product",
37                "discountedItemList": [
38                  {
39                    "name": "insertProductName2"
40                  }
41                ]
42              }
43            ]
44          },
45          "targetAudience": {
46            "audienceType": "AllLoyaltyMembers"
47          }
48        }
49      ]
50    }
51  ]
52}
JSON example

Free product reward

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetDiscountOnY",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName1"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                }
22              }
23            }
24          ]
25        }
26      ],
27      "rewardConfiguration": [
28        {
29          "type": "GiveFreeProduct",
30          "rewardDetails": {
31            "discountedItems": [
32              {
33                "discountedItemType": "Product",
34                "discountedItemList": [
35                  {
36                    "name": "insertProductName2"
37                  }
38                ],
39                "discountDetails": {
40                  "type": "Quantity",
41                  "value": 1
42                }
43              }
44            ]
45          },
46          "targetAudience": {
47            "audienceType": "AllMembers"
48          }
49        }
50      ]
51    }
52  ]
53}

BuyXToGetUnitPriceDiscount

Use the BuyXToGetUnitPriceDiscount template to provide unit-price discounts or price overrides on products when customers purchase qualifying products or quantities.

  • Category: Purchase-based
  • Event Configuration: allOf array containing anyOf objects with purchaseType, applicablePurchaseList, and purchaseCriteria
  • Supported Reward Types: ProvideDiscount (PriceOverride), GiveFreeProduct
JSON example

Price override reward on multiple products

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetUnitPriceDiscount",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName1"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                }
22              }
23            },
24            {
25              "anyOf": {
26                "purchaseType": "Product",
27                "applicablePurchaseList": [
28                  {
29                    "name": "insertProductName2"
30                  }
31                ],
32                "purchaseCriteria": {
33                  "type": "Quantity",
34                  "value": 10
35                }
36              }
37            }
38          ]
39        }
40      ],
41      "rewardConfiguration": [
42        {
43          "type": "ProvideDiscount",
44          "rewardDetails": {
45            "discountValue": 100,
46            "discountType": "PriceOverride",
47            "discountedItems": [
48              {
49                "discountedItemType": "Product",
50                "discountedItemList": [
51                  {
52                    "name": "insertProductName2"
53                  }
54                ]
55              }
56            ]
57          },
58          "targetAudience": {
59            "audienceType": "AllMembers"
60          }
61        }
62      ]
63    }
64  ]
65}
JSON example

"For every X" quantity criteria

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetUnitPriceDiscount",
5      "ruleName": "ForEveryXGetDiscountOnY",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName1"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "QuantityForEvery",
20                  "value": 2
21                }
22              }
23            }
24          ]
25        }
26      ],
27      "rewardConfiguration": [
28        {
29          "type": "ProvideDiscount",
30          "rewardDetails": {
31            "discountValue": 100,
32            "discountType": "PercentageOff",
33            "discountedItems": [
34              {
35                "discountedItemType": "Product",
36                "discountedItemList": [
37                  {
38                    "name": "insertProductName2"
39                  }
40                ],
41                "discountDetails": {
42                  "type": "Quantity",
43                  "value": 1
44                }
45              }
46            ]
47          },
48          "targetAudience": {
49            "audienceType": "AllMembers"
50          }
51        }
52      ]
53    }
54  ]
55}

BuyXToGetY

Use the BuyXToGetY template to provide combo discounts, vouchers, loyalty rewards, badges, games, or other incentives when customers purchase qualifying products or product categories.

  • Category: Purchase-based
  • Event Configuration: allOf array containing anyOf objects with purchaseType, applicablePurchaseList, and purchaseCriteria
  • Supported Reward Types: ProvideDiscountedCombo, IssueVoucher, CreditFixedPoints, CreditMultiplierPoints, AssignBadge, AssignGame
JSON example

Discounted combo when purchasing specific products

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetY",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                }
22              }
23            }
24          ]
25        }
26      ],
27      "rewardConfiguration": [
28        {
29          "type": "ProvideDiscountedCombo",
30          "rewardDetails": {
31            "discountValue": 10,
32            "discountedItems": [
33              {
34                "discountedItemType": "Product",
35                "discountedItemList": [
36                  {
37                    "name": "insertProductName"
38                  }
39                ],
40                "discountDetails": {
41                  "type": "Quantity",
42                  "value": 10
43                }
44              }
45            ]
46          },
47          "targetAudience": {
48            "audienceType": "AllMembers"
49          }
50        }
51      ]
52    }
53  ]
54}
JSON example

Voucher reward for loyalty tier members

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetY",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                }
22              }
23            }
24          ]
25        }
26      ],
27      "rewardConfiguration": [
28        {
29          "type": "IssueVoucher",
30          "rewardDetails": {
31            "voucherDefinition": {
32              "name": "insertVoucherName"
33            },
34            "voucherExpirationDate": "2020-10-10"
35          },
36          "targetAudience": {
37            "audienceType": "LoyaltyTierMembers",
38            "audienceDetails": {
39              "tierGroup": {
40                "id": "insertTierGroupId"
41              },
42              "tier": {
43                "id": "insertTierId"
44              }
45            }
46          }
47        }
48      ]
49    }
50  ]
51}
JSON example

Loyalty points (CreditFixedPoints)

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetY",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                }
22              }
23            }
24          ]
25        }
26      ],
27      "rewardConfiguration": [
28        {
29          "type": "CreditFixedPoints",
30          "rewardDetails": {
31            "pointsToCredit": 100,
32            "loyaltyProgramCurrency": {
33              "name": "insertCurrencyName"
34            },
35            "pointsExpirationDate": "10-09-2023"
36          },
37          "targetAudience": {
38            "audienceType": "AllLoyaltyMembers"
39          }
40        }
41      ]
42    }
43  ]
44}
JSON example

Multiplier points

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetY",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                }
22              }
23            }
24          ]
25        }
26      ],
27      "rewardConfiguration": [
28        {
29          "type": "CreditMultiplierPoints",
30          "rewardDetails": {
31            "pointsMultiplier": 5,
32            "loyaltyProgramCurrency": {
33              "name": "insertCurrencyName"
34            },
35            "pointsExpirationDate": "10-09-2023",
36            "transactionJournalField": "TransactionJournal.TransactionAmount"
37          },
38          "targetAudience": {
39            "audienceType": "AllLoyaltyMembers"
40          }
41        }
42      ]
43    }
44  ]
45}
JSON example

Badge reward

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetY",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                }
22              }
23            }
24          ]
25        }
26      ],
27      "rewardConfiguration": [
28        {
29          "type": "AssignBadge",
30          "rewardDetails": {
31            "loyaltyProgramBadge": {
32              "name": "insertBadgeName"
33            },
34            "badgeExpirationDate": "2026-10-10"
35          },
36          "targetAudience": {
37            "audienceType": "AllLoyaltyMembers"
38          }
39        }
40      ]
41    }
42  ]
43}
JSON example

Game reward

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetY",
5      "ruleName": "Abcd",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                }
22              }
23            }
24          ]
25        }
26      ],
27      "rewardConfiguration": [
28        {
29          "type": "AssignGame",
30          "rewardDetails": {
31            "gameType": "SpinTheWheel",
32            "gameDefinition": {
33              "id": "insertGameDefinitionId"
34            }
35          },
36          "targetAudience": {
37            "audienceType": "AllLoyaltyMembers"
38          }
39        }
40      ]
41    }
42  ]
43}

CustomPromotion

Use the CustomPromotion template to define promotions using advanced criteria, custom logic, aggregation rules, and runtime context evaluation.

  • Category: Custom
  • Event Configuration: criteriaList with conditionList entries specifying contextTagName, operator, valueList, dataType, and sequenceNumber. Optionally includes aggregationConfiguration. Criteria types: AllConditionsMatch, AnyConditionMatches, and CustomLogicMatches.
  • Supported Reward Types: ProvideDiscount (with subType: DiscountOnCart, DiscountOnLineItem, or DiscountOnUnitPrice)
JSON example

AnyConditionMatches criteria with aggregation and cart discount

1{
2  "rules": [
3    {
4      "templateName": "CustomPromotion",
5      "ruleName": "SampleRule",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "criteriaList": [
10            {
11              "type": "AnyConditionMatches",
12              "name": "FilterCriteria",
13              "conditionList": [
14                {
15                  "contextTagName": "cartLineProduct",
16                  "operator": "Equals",
17                  "valueList": ["Pizza"],
18                  "dataType": "Text",
19                  "sequenceNumber": 1
20                },
21                {
22                  "contextTagName": "cartLineProductCategory",
23                  "operator": "Equals",
24                  "valueList": ["Food"],
25                  "dataType": "Text",
26                  "sequenceNumber": 2
27                }
28              ]
29            }
30          ],
31          "aggregationConfiguration": {
32            "aggregateBy": "cartLineProductCatalog",
33            "aggregateByDetails": ["Catalog1"],
34            "dataType": "Text",
35            "aggregateOn": "cartLineItemQuantity",
36            "operator": "GreaterThan",
37            "value": 1
38          }
39        }
40      ],
41      "rewardConfiguration": [
42        {
43          "type": "ProvideDiscount",
44          "subType": "DiscountOnCart",
45          "rewardDetails": {
46            "discountValue": 10,
47            "discountType": "PercentageOff"
48          },
49          "targetAudience": {
50            "audienceType": "AllMembers"
51          }
52        }
53      ]
54    }
55  ]
56}
JSON example

CustomLogicMatches criteria with cart discount

1{
2  "rules": [
3    {
4      "templateName": "CustomPromotion",
5      "ruleName": "SampleRule",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "criteriaList": [
10            {
11              "type": "CustomLogicMatches",
12              "customLogic": "1 AND (2 OR 3)",
13              "name": "FilterCriteria",
14              "conditionList": [
15                {
16                  "contextTagName": "activityStartDate",
17                  "operator": "GreaterThan",
18                  "valueList": ["2023-12-01T00:00:00.000Z"],
19                  "dataType": "DateTime",
20                  "sequenceNumber": 1
21                },
22                {
23                  "contextTagName": "currencyISOCode",
24                  "operator": "Equals",
25                  "valueList": ["INR"],
26                  "dataType": "Text",
27                  "sequenceNumber": 2
28                },
29                {
30                  "contextTagName": "transactionAmount",
31                  "operator": "GreaterThan",
32                  "valueList": ["200"],
33                  "dataType": "Currency",
34                  "sequenceNumber": 3
35                }
36              ]
37            }
38          ]
39        }
40      ],
41      "rewardConfiguration": [
42        {
43          "type": "ProvideDiscount",
44          "subType": "DiscountOnCart",
45          "rewardDetails": {
46            "discountValue": 10,
47            "discountType": "PercentageOff"
48          },
49          "targetAudience": {
50            "audienceType": "AllMembers"
51          }
52        }
53      ]
54    }
55  ]
56}
JSON example

Line-item reward on specific products

1{
2  "rules": [
3    {
4      "templateName": "CustomPromotion",
5      "ruleName": "SampleRule",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "criteriaList": [
10            {
11              "type": "AnyConditionMatches",
12              "name": "FilterCriteria",
13              "conditionList": [
14                {
15                  "contextTagName": "cartLineProduct",
16                  "operator": "Equals",
17                  "valueList": ["Pizza"],
18                  "dataType": "Text",
19                  "sequenceNumber": 1
20                }
21              ]
22            }
23          ],
24          "aggregationConfiguration": {
25            "aggregateBy": "cartLineProductCatalog",
26            "aggregateByDetails": ["Catalog1"],
27            "dataType": "Text",
28            "aggregateOn": "cartLineItemQuantity",
29            "operator": "GreaterThan",
30            "value": 1
31          }
32        }
33      ],
34      "rewardConfiguration": [
35        {
36          "type": "ProvideDiscount",
37          "subType": "DiscountOnLineItem",
38          "rewardDetails": {
39            "discountValue": 10,
40            "discountType": "PercentageOff",
41            "discountedItems": [
42              {
43                "discountedItemType": "Product",
44                "discountedItemList": [
45                  {
46                    "name": "Pizza"
47                  }
48                ]
49              }
50            ],
51            "discountLevel": "CombinedLineItemPrice"
52          },
53          "targetAudience": {
54            "audienceType": "AllMembers"
55          }
56        }
57      ]
58    }
59  ]
60}

AccrualPromotion

Use the AccrualPromotion template to provide loyalty points, vouchers, badges, or multiplier rewards based on transaction activity, purchase thresholds, or loyalty criteria.

  • Category: Loyalty
  • Event Configuration: Uses criterionType, minimumPurchaseAmountEnabled, minPurchaseAmount, minimumQuantityEnabled, minPurchaseQuantity, and isPromotionForCustomRules
  • Supported Reward Types: CreditFixedPoints, CreditMultiplierPoints, Vouchers, Badges
JSON example

Fixed points accrual on spend threshold

1{
2  "rules": [
3    {
4      "templateName": "AccrualPromotion",
5      "ruleName": "AccrualRule",
6      "priority": 1,
7      "journalType": "Accrual",
8      "journalSubTypeName": "Member Enrollment",
9      "eventConfiguration": [
10        {
11          "isPromotionForCustomRules": false,
12          "minimumPurchaseAmountEnabled": true,
13          "minPurchaseAmount": 10,
14          "minimumQuantityEnabled": false,
15          "minPurchaseQuantity": null,
16          "criterionType": "Loyalty"
17        }
18      ],
19      "rewardConfiguration": [
20        {
21          "rewardType": "FixedPoints",
22          "tierBased": false,
23          "pointsRewards": [
24            {
25              "currency": "insertCurrency",
26              "points": 25
27            }
28          ]
29        }
30      ]
31    }
32  ]
33}
JSON example

Tier-based rewards with multiple reward types (points, vouchers, badges, multiplier)

1{
2  "rules": [
3    {
4      "templateName": "AccrualPromotion",
5      "journalType": "Accrual",
6      "promotionLimit": 1,
7      "journalSubTypeName": "Member Enrollment",
8      "eventConfiguration": [
9        {
10          "isPromotionForCustomRules": false,
11          "minimumPurchaseAmountEnabled": false,
12          "minPurchaseAmount": null,
13          "minimumQuantityEnabled": true,
14          "minPurchaseQuantity": 25,
15          "criterionType": "Loyalty"
16        }
17      ],
18      "rewardConfiguration": [
19        {
20          "rewardType": "FixedPoints",
21          "tierBased": true,
22          "pointsRewards": [
23            {
24              "tierGroup": "insertTierGroup",
25              "tier": "insertTier1",
26              "currency": "insertCurrency",
27              "points": 25
28            },
29            {
30              "tierGroup": "insertTierGroup",
31              "tier": "insertTier2",
32              "currency": "insertCurrency",
33              "points": 50
34            }
35          ]
36        },
37        {
38          "rewardType": "Vouchers",
39          "tierBased": false,
40          "voucherRewards": [
41            {
42              "voucherDefinition": "insertVoucher"
43            }
44          ]
45        },
46        {
47          "rewardType": "Badges",
48          "tierBased": false,
49          "badgeRewards": [
50            {
51              "badgeDefinition": "insertBadge"
52            }
53          ]
54        },
55        {
56          "rewardType": "MultiplierPoints",
57          "tierBased": true,
58          "isAdditionalReward": false,
59          "pointsRewards": [
60            {
61              "currency": "insertCurrency",
62              "multiplierType": "TransactionAmount",
63              "multiplier": 5,
64              "tierGroup": "insertTierGroup",
65              "tier": "insertTier1"
66            }
67          ]
68        }
69      ]
70    }
71  ]
72}

GetRewardsBasedOnSellingModel

Use the GetRewardsBasedOnSellingModel template to provide rewards or discounts based on the selling model associated with purchased products, such as subscription or term-based models.

  • Category: Selling Model
  • Event Configuration: allOf array containing anyOf objects with purchaseType, applicablePurchaseList, purchaseCriteria, and sellingModelType (for example, TermDefined)
  • Supported Reward Types: ProvideDiscount
JSON example

Subscription-based promotion with TermDefined selling model

1{
2  "rules": [
3    {
4      "templateName": "GetRewardsBasedOnSellingModel",
5      "ruleName": "PSMRule",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "insertProductName"
16                  }
17                ],
18                "purchaseCriteria": {
19                  "type": "Quantity",
20                  "value": 1
21                },
22                "sellingModelType": "TermDefined"
23              }
24            }
25          ]
26        }
27      ],
28      "rewardConfiguration": [
29        {
30          "type": "ProvideDiscount",
31          "rewardDetails": {
32            "discountValue": 20,
33            "discountType": "PercentageOff"
34          },
35          "targetAudience": {
36            "audienceType": "AllMembers"
37          }
38        }
39      ]
40    }
41  ]
42}