Checkout Items in a Cart

Overview 

The Checkout API finalizes a CPQ cart by performing all mandatory validations, pricing recalculations, asset‑generation steps and transaction commits required to create a ready‑to‑bill Order.
It is the logical culmination of the add → configure → price → validate → checkout pattern common to digital‑commerce and assisted‑selling flows.

Based on the header object, submit the object to create the quote, order, or assets.

  • If the header object is Opportunity, submit the opportunity to create a quote.

  • If the header object is Quote, submit the quote to create an order.

  • If the header object is Order, submit the order to create assets.

These APIs replace the following methods in OmniCPQServiceWrapper:

  • Submit Opportunity replaces OmniCPQServceWrapper submitOpportunity.

  • Submit Order replaces OmniCPQServiceWrapper submitOrder.

  • Submit Quote replaces OmniCPQServiceWrapper submitQuote.

Odin Bifurcation 

The call path depends on the OdinAPIHandler interface chosen at runtime:

  • OdinAPIAutoAssetizeHandler – routes directly to Java core classes (CheckoutAction, CheckoutServiceImpl) for high‑volume assetisation use‑cases.
  • Any other implementation – executes entirely in Apex inside the managed package, allowing org‑specific extensions before/after core logic.
1POST /v2/cpq/carts/{cart_Id}/items/checkout

For more information, see OmniCPQServiceWrapper.

This API supports the guest user enhancements that Salesforce introduced with the Winter ‘21 release. To encrypt and decrypt data for guest users, use the UserSecurity class with this API. See Guest User Technical Details.

For additional information, ​see UserSecurity Class and CPQ and Digital Commerce Changes for Guest Users.

Rest Handler 

1APICheckoutItemsCartsCPQV2

Rest Method 

1checkoutItems

Remote Service 

1CpqAppHandler

Remote Method 

1checkout

Apex Remote Input Map 

1Map<String, Object> inputMap = new Map<String, Object>{
2    'cartId' => '{CART_ID}'
3};
4Map<String, Object> outputMap = new Map<String, Object>();
5Map<String, Object> optionsMap = new Map<String, Object>();
6CpqAppHandler handler = new CpqAppHandler();
7handler.invokeMethod('checkout', inputMap, outputMap, optionsMap);

ContextId is required for the Checkout Items in Cart remote action, which is used in the Guided Selling OmniScript.

Package 

Communication (vlocity_cmt)

API Parameters and Response Format 

For API parameter names and descriptions, see Cart-Based API Swagger Reference.

Resource Information 

Response FormatJSON
Resource URL/services/apexrest/{namespace}/v2/cpq/carts/{cart_Id}/items/checkout

Example Request 

1POST
2/v2/cpq/carts/{cart_Id}/items/checkout
3
4{
5   "validate": true,
6   "assetizeFullBundlePerRoot": false,
7   "validateSubmittedXLI": false
8}

Example Responses 

1{
2  "totalSize": 1,
3  "messages": [
4    {
5      "code": "SUBMIT-1008",
6      "severity": "INFO",
7      "message": "Order 801xx000003H0JTAA0 was assetized and activated."
8    }
9  ],
10  "records": [
11    {
12      "messages": [
13
14      ],
15      "displaySequence": -1,
16      "clonedObjectIds": "["02ixx0000004N2AAAU"]",
17      "id": "001xx000003H0HrAAK",
18      "objectType": "Account"
19    }
20  ]
21}

‘objectType’ conveys the type of the object that was created by the Checkout process.
For Eg: If Checkout is performed from an Opportunity, the objectType will be Quote.

Note