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 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: Bearertoken

Inputs

Input Details
MemberId
Type
ID
Description
Required. 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.
PromotionRecords
Type
sObject
Description
Promotion records to filter the promotions that are applicable to the member's market segment.

Outputs

Output Details
PromotionRecords
Type
sObject
Description
Promotion 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} ]