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

Available in: Lightning Experience
Available in: Enterprise, Unlimited, and Developer Editions

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

cartId = (801Dn000000vRSOIA2)
   

JSON Response Body

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)