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.

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
Name Type Description Required or Optional Available Version
event​Configuration Map<String, Object>[] List of criteria that decides when customers are eligible for the rewards of the promotion rule. Required 60.0
journalSubType String ID of the journal sub type. Required when journalType is used 60.0
journalSub​TypeName String Name of the journal sub type. Required when journalType is used 64.0
journalType String Name of the journal sub type. Required for loyalty accrual or redemption templates 60.0
priority Integer Priority number of the rule in the promotion. Required 60.0
promotionLimit Integer Milestone limit of the promotion. Optional 63.0
reward​Configuration Map<String, Object>[] List of rewards that members get when their activity meets the rule's eligibility criteria. Required 60.0
ruleName String Name of the promotion rule. Required 60.0
templateName String Name of the promotion template used in a promotion rule. For supported templates, see Rule Configuration Templates. Required 60.0