Get Offers for a Party Invocable Action

Use this action to get a list of offers for a party based on the party’s context and search criteria. Offers are modeled as products in Salesforce. By default, if the price list isn't assigned, then you must provide the priceListId. For example, a sales rep can use this action to retrieve internet packages for a customer based on the size of the customer's business.

Required Editions

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

Industries CPQ API Used to Invoke Get Offers for Party Invocable Action

  • getOffersByCatalogCode
  • updateCarts
  • getCartsProducts

Input Values

Parameter description data type
catalogcode The code of the catalog that the offers are a part of. String
cartId Optional. The ID of the quote or order record that you need to retrieve offers for. String
context The party's context decides which offers to retrieve. String
isloggedIn A Boolean value that indicates whether the party is logged in. The default value is true. Boolean
fields Optional. The list of fields that you want to retrieve, separated by commas. String
query Optional. The text that's provided as ‌ search input by the party. String
pagesize Optional. The number of offers to retrieve. Integer
offsetSize Optional. The number of offers to show on a page. Integer
lastRecordId Optional. The ID of the offer that appears last on the previous search. String
maxProdListHierarchy Optional. The number of product hierarchy levels to retrieve. Integer
attributes Optional. A comma-delimited string of the attributes to filter offers by. String
filters Optional. A comma-delimited list of filters that determines which offers to retrieve. String
includeAttachment Optional. A Boolean value that indicates whether to retrieve the offer attachments. Boolean
includeAttributes Optional. A Boolean value that indicates whether to return a list of attributes and their values. Boolean
priceListId The ID of a price list record to retrieve for the offer. String
noFilteredResponse Optional. A Boolean value that indicates whether to retrieve a filter list of offers for the party.. The default value is false. String

Output Values

Parameter description data type
cartId The ID of the quote, or order record for which offers are retrieved. String
contextKey The context key of the party that's used to decide which offers to retrieve. String
offers A JSON string that includes the details of the offers retrieved for the party. List of String
messages The messages returned from the CPQ API response. List of String
nextOffersAction The definition of a subsequent API call to fetch the next set of offers for the party. String
error An error that's encountered during the execution of the action. String

Example

JSON Request

cartId = (0Q0DX0000001mfU0AQ)
pagesize = (2.00)

JSON Response Body

offers ([{"hasChildren":true,"ProductCode":{"value":"VPL_OFFERING_2_GB_30_DAYS"},"IsActive":{"value":true},
"Id":{"label":"Price Book Entry ID","value":"01uDX000000Z5kLYAS"},"defaultQuantity":1.0,
"UnitPrice":{"label":"List Price","value":0.0},"Product2":{"Description":"Add On 2 GB 30 Days",
"Name":"2 GB 30 Days","Id":"01tDX000000FDooYAG"}}, {"hasChildren":true,"ProductCode":{"value":"VPL_iPhone12"},
"IsActive":{"value":true},"Id":{"label":"Price Book Entry ID","value":"01uDX000000Z5kMYAS"},"defaultQuantity":1.0,
"UnitPrice":{"label":"List Price","value":"980"},"Product2":{"Description":"Splash, Water, 
and Dust Resistant 3 Rated IP68 (maximum depth of 6 meters up to 30 minutes) under IEC standard 60529.
\nChip. A14 Bionic chip.\nCamera. Dual 12MP camera system: Ultra Wide and Wide cameras.
\nVideo Recording. HDR video recording with Dolby Vision up to 30 fps.\nTrueDepth Camera.
\nFace ID.\nApple Pay. \nApple Card.","Name":"iPhone 12","Id":"01tDX000000FDoLYAW"}}])
    contextKey (null)
    cartId (0Q0DX0000001mfU0AQ)
    messages ([])
    error (null)
    nextOffersAction ({"nextproducts":{"rest":{"params":{},"link":null,"method":null},
"remote":{"params":{"offsetSize":null,"lastRecordId":"01uDX000000Z5kMYAS","includeAttachment":false,
"cartId":"0Q0DX0000001mfU0AQ","query":null,"pagesize":2,"methodName":"getCartsProducts",
"attributes":null,"includeIneligible":false,"fields":null}},"client":{"params":{}}}})