You are here:
Eligible Promotions API
Use the Eligible Promotions API to provide customers with a list of promotions that are eligible for customer carts. The API can get the list of eligible promotions for contacts, accounts, and loyalty program members.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions with Real-Time Offer Management |
Provide your customers a list of promotions that are eligible for their cart. The API takes a customer’s cart details as the request and provides the details of the eligible active promotions for the cart as the response. When looking for eligible promotions for an item, the API scans 5 levels of the product’s category hierarchy.
If a cart contains a product that doesn't exist in the Salesforce catalog, the API ignores the unsynced products while evaluating line-level and cross line level promotions and shows eligible promotions for the cart.
If an org has multiple Global Promotion Management type rule libraries, system integrators must specify which rule library that the API executes. They also must confirm that the API’s request contains values that the rule library’s context definition requires to evaluate carts.
The API response provides these promotion details.
- Promotion’s primary details such as start and end dates
- Promotion’s custom field values
- Promotion’s limits
- Promotion’s rules that are eligible for the customer’s cart
- Promotion's custom field values that are mapped in the promotion context definition.
To provide customers their eligible promotions in real time, integrate the Eligible Promotions API with external systems that manage customer carts. See Eligible Promotions.
After a promotion’s usage meets the promotion’s limit for a particular cart, the Eligible Promotions API doesn’t provide the reward in the API output for any customer. After a customer’s usage of a reward meets the promotion’s customer-level limit, the Eligible Promotions API no longer offers the reward to the customer.
Here’s how the Eligible Promotion API’s request looks like when the API is executed from Cloud Kicks’ online shopping site.
{
"cart":{
"Accessory":[
{
"activityStartDate":"2023-06-14T12:45:19Z",
"contactId":"003xx000004WjzAAAS",
"transactionAmount":85,
"currencyISOCode":"INR",
"cartLineDetails":[
{
"CartLineProductCategory":"Sneaker Shields",
"cartLineProductCatalogId:"0ZSSB0000002d8X4AQ"",
"AttributeKey:"Premium"
}
]
}
]
}
}Eligible Promotions API for Promotions with Coupons
When coupons are added to a promotion, the Eligible Promotions API takes a customer’s cart details as the request and responds with the details of the active coupons for the promotions eligible for the customer’s cart. The customer can use the coupon of the promotion that they want to apply to their cart.
For eligible promotions that include a coupon, the API’s response includes these coupon details.
- Coupon code
- Start and end dates
- Status
The API only returns promotions that have at least one active and valid coupon for the customer's activity date. Though a promotion can consist of multiple coupons, the API doesn’t show the coupon code in these scenarios.
- If there are multiple active coupons eligible for the activity date
- If no coupon is active for the activity date
- If the eligible active coupon has reached its usage limit

