Newer Version Available

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

Get Promotions Based on Member's Market Segement

Retrieve which promotions are eligible for a member based on the member's 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 for users in orgs where either B2C - Loyalty, B2C - Loyalty Plus, Loyalty Management - Growth, or Loyalty Management - Advanced license and Salesforce CDP are enabled.

Supported REST HTTP Methods

URI
/services/data/vXX.X/actions/standard/getLoyaltyPromotionBasedOnSalesforceCDP
Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: Bearer token

Inputs

Input Details
MemberId
Type
ID
Description
Required. ID of the loyalty program member for whom promotions must be filtered. Ensure that the member is part of a Salesforce Customer Data Platform (CDP) 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

Sample Request

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

Sample Response

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} ]