Checkout Items in Cart

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.

1POST /v2/cpq/carts/{cart_ID}/items/checkout

These APIs replace the following methods in OmniCPQServiceWrapper:

  • Submit Opportunity replaces OmniCPQServceWrapper submitOpportunity.

  • Submit Order replaces OmniCPQServiceWrapper submitOrder.

  • Submit Quote replaces OmniCPQServiceWrapper submitQuote.

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.

Remote Method 

1checkout

REST Handler 

1APICheckoutItemsCartsCPQV2

Apex Remote Service 

1CpqAppHandler

Apex Remote Input Map 

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

1{
2  methodName:"checkout"
3  cartId:801360000008eNU
4  ContextId:801360000008eNU
5}

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

Example Responses 

Submit Opportunity

1{
2   "totalSize":1,
3   "messages":[],
4   "records":
5   [
6      {
7         "messages":[],
8         "displaySequence":-1,
9         "id":"0Q01I000000TvNmSAK",
10         "objectType":"Quote"
11      }
12   ]
13}

Note

Submit Order

1"records": [
2{
3   "messages": [],
4   "displaySequence": -1,
5   "id": "00146000004DeR9AAK",
6   "objectType": "Account"
7}
8]

Note

Submit Quote

1{
2   "totalSize":1,
3   "messages":[],
4   "records":
5   [
6      {
7         "messages":[],
8         "displaySequence":-1,
9         "id":"8011I000000KZW3QAO",
10         "objectType":"Order"
11      }
12   ]
13}

Note