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.
Loyalty Engine Input
- Root XML tag
- <loyaltyEngineInput>
- JSON example
- Here's a sample request to pass loyalty engine runtime details.
1{ 2 "shouldCheckCouponUsageLimit": true, 3 "transactionJournals": [ 4 { 5 "ActivityDate": "2022-01-04T12:45:19Z", 6 "JournalDate": "2022-01-04T00:45:19Z", 7 "Brand": "", 8 "Establishment": "Apple", 9 "ExternalTransactionNumber": "P1-981950", 10 "JournalTypeId": "0lET10000004CQp", 11 "LoyaltyProgramId": "0lpT10000004CdN", 12 "MemberId": "0lMT10000004CfA", 13 "TransactionAmount": "117", 14 "TransactionLocation": "HitechCity", 15 "VoucherCode": "", 16 "Origin": "asdf", 17 "Distance": "5", 18 "Destination": "Hyderabad", 19 "FlightNumber": "SF-Ran-001", 20 "Status": "Pending" 21 } 22 ], 23 "runSetting": { 24 "isSimulation": true 25 } 26} -
Using the transaction journal ID:
1{ 2 "transactionJournals": [ 3 { 4 "Id": "0lVxx00000000cj" 5 } 6 ], 7 "runSetting": { 8 "isSimulation": true 9 } 10} -
Sample payload to retrieve rewards assigned to accounts.
1{ 2 "transactionJournals": [ 3 { 4 "ActivityDate": "2024-11-27T12:45:19Z", 5 "JournalTypeId": "0lERM00000001Bb2AI", 6 "LoyaltyProgramId": "0lpRM00000002YTYAY", 7 "ReferredPartyId": "001xx000003H3NnAAK", 8 "Status": "Pending", 9 "ProductId": "01txx0000006i44AAA", 10 "ProductCategoryId": "0ZGxx0000000001GAA", 11 "Quantity": "1", 12 "TransactionAmount": "42", 13 "appliedPromotions": [ 14 { 15 "promotionId": "0c8xx00000000mPAAQ", 16 "rewards": [ 17 { 18 "rewardType": "Discount", 19 "discountAmount": 5 20 }, 21 { 22 "rewardType": "Discount", 23 "discountAmount": 10 24 }, 25 { 26 "rewardType": "Voucher", 27 "voucherDefinitionName": "Voucher2", 28 "voucherExpirationDate": "2025-08-07", 29 "voucherEffectiveDate": "2024-08-08", 30 }, 31 { 32 "rewardType": "Game", 33 "gameDefinitionName": "TestPostFacto", 34 }, 35 ] 36 } 37 ] 38 } 39 ] 40 } - Properties
-
Name Type Description Required or Optional Available Version shouldCheckCouponUsageLimit Boolean Indicates whether the coupon usage limit check is enabled. Required 62.0 transactionJournals Loyalty Engine Input Map Represents the transaction journals records to process. Required 54.0 runSetting Loyalty Engine Run Settings Input Loyalty runtime setting to run the simulation on the transaction journals. Required for simulation, otherwise optional 55.0