Newer Version Available

This content describes an older version of this product. View Latest

Promotion Reward Application (POST)

Create and process transaction journals for customer orders, and apply the relevant promotions for the orders.
Resource
1/global-promotions-management/promotion-reward
Resource example
1https://yourInstance.salesforce.com/services/data/v67.0/global-promotions-management/promotion-reward
Available version
65.0
HTTP methods
POST
Request body for POST
JSON example

This example shows a sample request when journalCreationMode is CreateTransactionJournal.

1{
2  "shouldCheckCouponUsageLimit": true,
3  "journalCreationMode": "CreateTransactionJournal",
4  "transactionJournalList": [
5    {
6      "ActivityDate": "2025-10-08T12:45:19Z",
7      "JournalTypeId": "0lET10000004CQp",
8      "ReferredPartyId": "003SB00000U84F0YAJ",
9      "Quantity": "1",
10      "TransactionAmount": "5000",
11      "CurrencyIsoCode": "USD",
12      "Status": "Processed",
13      "appliedPromotions": [
14        {
15          "promotionId": "0c8SB000000HASnYAO",
16          "promotionCode": "GET10OFF",
17          "couponCode": "COUPON100",
18          "rewards": [
19            {
20              "rewardType": "ProvideDiscount",
21              "discountAmount": 15
22            },
23            {
24              "rewardType": "IssueVoucher",
25              "voucherDefinitionName": "$100 off",
26              "voucherCode": "SALE-4F8G-RT2P",
27              "voucherEffectiveDate": "2025-10-09",
28              "voucherExpirationDate": "2025-10-10",
29              "notes": "discount voucher"
30            },
31            {
32              "rewardType": "AssignGame",
33              "gameDefinitionName": "SpintheWheelGame",
34              "gameExpirationDate": "2025-10-10"
35            }
36          ]
37        }
38      ]
39    }
40  ]
41}
JSON example

This example shows a sample request when journalCreationMode is DoNotCreate.

1{
2  "shouldCheckCouponUsageLimit": true,
3  "journalCreationMode": "DoNotCreate",
4  "transactionJournalList": [
5    {
6      "ExternalTransactionNumber": "P1-981950",
7      "ActivityDate": "2025-10-08T12:45:19Z",
8      "JournalTypeId": "0lET10000004CQp",
9      "ReferredPartyId": "003SB00000U84F0YAJ",
10      "Quantity": "1",
11      "TransactionAmount": "5000",
12      "CurrencyIsoCode": "USD",
13      "Status": "Processed",
14      "appliedPromotions": [
15        {
16          "promotionId": "0c8SB000000HASnYAO",
17          "promotionCode": "GET10OFF",
18          "couponCode": "COUPON100",
19          "rewards": [
20            {
21              "rewardType": "ProvideDiscount",
22              "discountAmount": 15
23            },
24            {
25              "rewardType": "IssueVoucher",
26              "voucherDefinitionName": "$100 off",
27              "voucherCode": "SALE-4F8G-RT2P",
28              "voucherEffectiveDate": "2025-10-09",
29              "voucherExpirationDate": "2025-10-10",
30              "notes": "discount voucher"
31            },
32            {
33              "rewardType": "AssignGame",
34              "gameDefinitionName": "SpintheWheelGame",
35              "gameExpirationDate": "2025-10-10"
36            }
37          ]
38        }
39      ]
40    }
41  ]
42}
Properties
Name Type Description Required or Optional Available Version
journal​CreationMode String Specifies whether to create a transaction journal record and, if so, where to store the data. Possible values are:
  • CreateTransactionJournal—Creates a transaction journal record for each entry and uses that record's ID as the transaction reference to apply rewards and track coupon redemption. This value is applicable only when you have Loyalty Management enabled in your org.
  • DoNotCreate—Does not create a transaction journal record. You must provide ExternalTransactionNumber in each transactionJournalList entry, which is then used as the transaction reference.
Required 66.0
shouldCheck​CouponUsage​Limit Boolean Indicates whether the API must execute the Coupon Usage Increase API to verify the coupon usage count and increase the redemption usage count of the specified coupon code (true) or not (false). Optional 65.0
transaction​JournalList List<Map<String, Object>> The list of transaction inputs to process for promotion evaluation and reward application. Required 65.0
Response body for POST
Promotion Reward Application