Unified Promotion Template Input

Input representation of the unified promotion template.

JSON example for POST and PUT 

1{
2  "rules": [
3    {
4      "templateName": "BuyXToGetRewards",
5      "ruleName": "123",
6      "priority": 1,
7      "eventConfiguration": [
8        {
9          "allOf": [
10            {
11              "anyOf": {
12                "purchaseType": "Product",
13                "applicablePurchaseList": [
14                  {
15                    "name": "Veg Burger"
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                "name": "Default"
39              },
40              "tier": {
41                "name": "Silver"
42              }
43            }
44          }
45        },
46        {
47          "type": "IssueVoucher",
48          "rewardDetails": {
49            "voucherDefinition": {
50              "name": "GET 10% OFF"
51            },
52            "voucherExpirationDate": "2020-10-10"
53          },
54          "targetAudience": {
55            "audienceType": "AllLoyaltyMembers"
56          }
57        }
58      ]
59    }
60  ]
61}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
event​ConfigurationMap<String, Object>[]List of criteria that decides when customers are eligible for the rewards of the promotion rule.Required60.0
journalSubTypeStringID of the journal sub type.Required when journalType is used60.0
journalSub​TypeNameStringName of the journal sub type.Required when journalType is used64.0
journalTypeStringName of the journal sub type.Required for loyalty accrual or redemption templates60.0
priorityIntegerPriority number of the rule in the promotion.Required60.0
promotionLimitIntegerMilestone limit of the promotion.Optional63.0
reward​ConfigurationMap<String, Object>[]List of rewards that members get when their activity meets the rule’s eligibility criteria.Required60.0
ruleNameStringName of the promotion rule.Required60.0
templateNameStringName of the promotion template used in a promotion rule.Required60.0