---
schema_version: "1"
id: fc3408155387789a8655f76cd5b0a1df9ee1e8fbb7c6e5437e72e46107b45bed
title: Get Promotions for Cart Invocable Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_invocable_action_get_promotions_for_cart.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_invocable_action_get_promotions_for_cart.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 70dbee70fd4723d21a8f3978b5323f06d63b56ba2eaacc92aab9645521fdc164
description: Use this action to get a list of promotions that are eligible for a quote or an order in a cart based on specified inputs. For example, a sales rep can use this action to retrieve all the promotions applicable for internet packages for a customer.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# Get Promotions for Cart Invocable Action

Use this action to get a list of promotions that are eligible for a quote or an order in a cart based on specified inputs. For example, a sales rep can use this action to retrieve all the promotions applicable for internet packages for a customer.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

## Industries CPQ API Used to Invoke Get Promotions for Cart Invocable Action

- getCartsPromotions

## Input Values

| Parameter | description | data type |
| --- | --- | --- |
| cartId | The ID of the quote or order record for which promotions must be retrieved. | String |
| includeIneligible | Optional: A Boolean value that indicates whether to include ineligible promotions. The default value is true. | Boolean |
| pagesize | Optional: The number of promotions to retrieve for a page. The default value is 10. | Integer |
| lastRecordId | Optional: The ID of the promotion that is displayed last in the previous response. | String |
| offsetSize | Optional: The offset from which you want to start reading promotions for pagination. The default value is 0. | Integer |
| price | Optional: A Boolean value that indicates whether to include the cart price. The default value is true. | Boolean |
| searchBy | Optional: The API name of the Promotion field for which promotion records must be searched. The default value is Name. | String |
| queryTerms | Optional: The text that is provided as a search phrase to filter the promotions. | String |
| fieldList | Optional: The comma-delimited list of fields to retrieve for a promotion. | String |
| noFilteredResponse | Optional: A Boolean value that indicates whether to retrieve a filtered list of promotions. The default value is false. | String |

## Output Values

| Parameter | description | data type |
| --- | --- | --- |
| error | An error due to which the promotions weren't retrieved. | String |
| records | A JSON string that includes the details of the promotions that were retrieved. | List of String |
| messages | A JSON string that includes the messages containing the details of the output. | List of String |
| totalSize | The number of promotions that were retrieved for a quote or an order. | Integer |

## Example

JSON Request

```json
cartId = (801Dn000000vRSOIA2)
   
```

JSON Response Body

```json
totalSize (3)
records ([{"displaySequence":0,"category":"Qualified","vlocity_arvk__effectivestartdate__c":"2021-02-01T00:00:00.000+0000","vlocity_arvk__DurationUnitOfMeasure__c":"Month","vlocity_arvk__AppliesToAllItems__c":false,"vlocity_arvk__Code__c":"VPL_INSTALLATION_FREE","vlocity_arvk__Description__c":"Get Installation Free when buying Business Internet Pro with Static IP","RecordTypeId":"012Dn000000lpmXIAQ","Name":"Installation Free for Business Internet Pro","Id":"a3XDn000000dE4JMAU"}, {"displaySequence":1,"category":"Qualified","vlocity_arvk__effectivestartdate__c":"2020-07-01T03:00:00.000+0000","vlocity_arvk__DurationUnitOfMeasure__c":"Month","vlocity_arvk__AppliesToAllItems__c":false,"vlocity_arvk__Code__c":"VPL_PROMO_INTERNET","vlocity_arvk__Description__c":"50% Discount 6 months on Firewall when buying Business Internet Pro","RecordTypeId":"012Dn000000lpmXIAQ","Name":"Internet Premium - Firewall 50% Discount 6 months","Id":"a3XDn000000dE4DMAU"}, {"displaySequence":2,"category":"Qualified","vlocity_arvk__effectivestartdate__c":"2021-02-01T00:00:00.000+0000","vlocity_arvk__DurationUnitOfMeasure__c":"Month","vlocity_arvk__AppliesToAllItems__c":false,"vlocity_arvk__Code__c":"VPL_MOTHERDAY","vlocity_arvk__Description__c":"Mother Day Promotion - Get 500 Minutes & 500 Texts 30 Days for free when buying Business Postpaid Pro Plan","RecordTypeId":"012Dn000000lpmXIAQ","Name":"Mother Day Promotion - Get 500 Minutes & 500 Texts 30 Days for free","Id":"a3XDn000000dE4NMAU"}])
messages ([])
error (null)
```