Get Loyalty Promotions Based on Member’s Data Cloud

Retrieve the promotions that are eligible for a member based on their market segment.

For more information about how the getLoyaltyPromotionBasedOnSalesforceCDP action filters eligible promotions, see Get a List of Promotions Applicable for a Member 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 and Data Cloud are enabled.

Supported REST HTTP Methods 

URI: /services/data/v68.0/actions/standard/getLoyaltyPromotionBasedOnSalesforceCDP

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer token

Inputs 

InputTypeDescription
MemberIdIDRequired. ID of the loyalty program member for whom promotions must be filtered. Make sure that the member is part of a Data Cloud market segment.
PromotionRecordssObjectPromotion records to filter the promotions that are applicable to the member’s market segment.

Outputs 

OutputTypeDescription
PromotionRecordssObjectPromotion records that the member is eligible for based on the member’s market segment.

Example 

POST

Here’s a sample request for the Get Promotions Based on Member’s Data Cloud Segment action.

1{
2   "inputs": [ {
3      "MemberId":"0lMxx0000000EYAMA2"
4   } ]
5}

Here’s a sample response for the Get Promotions Based on Member’s Data Cloud Segment action.

1[ {
2  "actionName" : "getLoyaltyPromotionBasedOnSalesforceCDP",
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} ]