Cart APIs
Industries CPQ's Cart-based APIs enable client application users to shop for and order products and services. The Cart-Based APIs and their remote methods provide a layer of abstraction between client application development and the configuration of the underlying CPQ logic.
For Cart-based REST API reference information, see Industries Configure, Price, Quote Web APIs v2 Documentation.
Running multiple APIs in a single transaction may result in governor limit, CPU limit, or inconsistent results.
-
Add Items to Cart (postCartsItems)
-
Add Promotion to Cart (postCartsPromoItems)
-
Apply Adjustment (applyAdjustment)
-
Cancel Order (cancelCart)
-
Checkout Items in Cart (checkout)
-
Check Status of the Cart (getCarts)
-
Clone Line Items in Cart (cloneItems)
-
Create Cart (createCart)
-
Create New Account for Current Site (newSite)
-
Create String Translations (createStringTranslations)
-
Create Supplemental Order (createSupplementalOrder)
-
Delete Adjustment (deleteAdjustment)
-
Delete Applied Promo Items (deletePromotionItems)
-
Delete String Translations (deleteStringTranslations)
-
Discard Supplemental Order (discardOrder)
-
Expand Items (getExpandedItems)
-
Freeze Order (preValidate)
-
Get Account Details (getAccounts)
-
Get Asset Pricing (getAssetPriceDetail)
-
Get Assets for Account (getAssetsByAccount)
-
Get Assets for Contract (getAssetsByContract)
-
Get Available Sites (getAvailableSites)
-
Get Cart Summary (getCarts)
-
Get Cart Promotions (getCartsPromotions)
-
Get Catalog Information (getCatalogHierarchy)
-
Get Contracts for Account (getContracts)
-
Get Filterable Attributes (getCartsAttributes)
-
Get Cart Items (getCartsItems)
-
Get Line Items by ID (getCartsItemsById)
-
Get Lists of Values (getListsOfValues)
-
Get Price Waterfall for Price (getPriceDetail)
-
Get Price Lists for Cart (getPriceLists)
-
Get List of Products (getCartsProducts)
-
Get Products by ID (getCartsProductsById)
-
Get Applied or Available Promotions for Cart (getPromotionList)
-
Get Promotions Applied to Cart (getPromotionsAppliedToCart)
-
Get Applied Promotions for Account (getAppliedPromotionsByAccount)
-
Get Details of Product (getRuleMessages)
-
Get String Translations (getStringTranslations)
-
Get String Translation Dictionary (getDictionary)
-
Post Cart Promotion Items (postCartsPromoItems)
-
Remove Items from Cart (deleteCartsItems)
-
Run Pricing for Items to Cart (priceCart)
-
Price Items in Cart (Query) (getCartLineItemPrices)
-
Submit a Cancel Order Request (submitCancelOrder)
-
Unfreeze Order (unfreezeOrder)
-
Update Item Attributes (putItemAttributes)
-
Update Items in Cart (putCartsItems)
-
Update String Translations (updateStringTranslations)
-
Validate Cart Action (runCartValidation)
All Cart-Based API requests use the following base URI:
https://{instance}.salesforce.com/services/apexrest/{namespace}
Where:
-
instance identifies the Salesforce instance that hosts your Salesforce organization (org)
-
namespace identifies the app package, such as vlocity_cmt
Standard cart APIs are the next-generation version of the cart-based APIs available in Summer'23. The standard cart APIs and their remote methods provide a layer of abstraction between client application development and the configuration of the underlying CPQ cart-based operation logic. Users can access and manipulate the quote, order, and cart data in the industries Configure, Price, Quote (CPQ).
Apex REST supports two authentication mechanisms: OAuth 2.0 or Session ID. Usually, you will use Session ID authentication only for testing purposes during development. OAuth 2.0 is recommended. For more information, see the following topics in the Force.com REST API Developer Guide:
To maintain optimum performance and ensure that the Force.com API is available to all customers, Salesforce imposes two types of API limits: concurrent API request limits and total API request limits. When a call exceeds a request limit, an error is returned. The actual limit depends on the type of Salesforce edition org you are using, the number of user licenses you have purchased, and the number of additional API calls you may have purchased.
Total API request limits govern the total API requests (or calls) per 24-hour period for an org. Vlocity Omnichannel Web APIs are designed to provide more functionality and data with each request to minimize the number of calls required per user per hour. However, the client application determines the number of API calls.
Concurrent API request limits govern the number of concurrent inbound requests (or calls) with a duration of 20 seconds or longer. Vlocity Omnichannel Web APIs are designed to complete calls much faster than 20 seconds, with the possible exception of a POST of bulk data to Salesforce using a Omnistudio Data Mapper API. Therefore, this limit does not usually apply.
For more information about API limits, see API Limits in the Salesforce Developer Limits Quick Reference.
Other limits apply. Vlocity Omnichannel Web APIs are based on Apex REST. Calls to these APIs count against the deploying company’s API governor limits. All standard Apex governor limits apply to Apex REST classes. For example, the maximum request or response size is 6 MB for synchronous Apex or 12 MB for asynchronous Apex. For more information, see Execution Governors and Limits in the Force.com Apex Code Developer Guide.
Apex REST APIs return the standard HTTP response status codes. For more information, see Apex Rest Methods, “Response Status Codes,” in the Force.com Apex Code Developer Guide.
Ensure that API input expressions containing non-alphanumeric characters are preceded with var:
. For example, to use an input expression of "DIMENSION-33269"
, specify var:"DIMENSION-33269"
instead.