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.
Get Promotions Based on Transaction Journal
For more information about how the getLoyaltyPromotion action filters eligible promotions, see Get a List of Promotions Applicable for a Transaction in Salesforce Help.
This action is available in API version 53.0 and later.
Special Access Rules
This action is available in orgs where either B2C - Loyalty, B2C - Loyalty Plus, Loyalty Management - Growth, or Loyalty Management - Advanced license is enabled.
Supported REST HTTP Methods
- URI
- /services/data/v68.0/actions/standard/getLoyaltyPromotion
- Formats
- JSON, XML
- HTTP Methods
- POST
- Authentication
- Authorization: Bearertoken
Inputs
| Input | Details |
|---|---|
| JournalId |
|
Outputs
| Output | Details |
|---|---|
| PromotionRecords |
|
Example
- POST
-
Here's a sample request for the Get Promotions Based on Transaction Journal action.
1{ 2 "inputs": [ { 3 "JournalId":"0lVxx000000016GMAQ" 4 } ] 5} -
Here's a sample response for the Get Promotions Based on Transaction Journal action.
1[ { 2 "actionName" : "getLoyaltyPromotion", 3 "errors" : null, 4 "isSuccess" : true, 5 "outputValues" : { 6 "PromotionRecords" : [ { 7 "attributes" : { 8 "type" : "Promotion", 9 "url" : "/services/data/v53.0/sobjects/Promotion/0c8T10000004CBEIA2" 10 }, 11 "Id" : "0c8xx0000004CBEIA2", 12 "OwnerId" : "005xx000000HwDoIAK", 13 "IsDeleted" : false, 14 "Name" : "Sample Promotion", 15 "CreatedDate" : "2021-07-21T04:13:15.000+0000", 16 "CreatedById" : "005xx000000HwDoIAK", 17 "LastModifiedDate" : "2021-07-21T04:13:15.000+0000", 18 "LastModifiedById" : "005xx000000HwDoIAK", 19 "SystemModstamp" : "2021-07-21T04:13:15.000+0000", 20 "LastViewedDate" : "2021-07-21T04:15:21.000+0000", 21 "LastReferencedDate" : "2021-07-21T04:15:21.000+0000", 22 "StartDate" : "2021-07-20", 23 "IsActive" : true, 24 "LoyaltyPromotionType" : "Cumulative", 25 "IsEnrollmentRequired" : false, 26 "CumulativeUsageTarget" : 100, 27 "FulfillmentAction" : "CreditPoints", 28 "LoyaltyProgramId" : "0lpxx00000000HWIAY", 29 "TotalRewardPoints" : 100, 30 "LoyaltyProgramCurrencyId" : "0lcxx00000000XeIAI", 31 "TransactionJournalType" : "Accrual", 32 "IsPointsWithFactor" : false 33 } ] 34 } 35} ]