Cancel an order. Calling this API creates a supplemental order and submits it to Order Management (XOM). After XOM processes the supplemental order, the original order is updated to canceled status.
<!-- Jared July 2020: Should this include PUT /cpq/carts/{cartid}/cancel, which is in Swagger as Send Updates on Cancellations?-->POST /v2/cpq/carts/{cart_ID}/cancel
The Cancel Order API uses the Supplemental and Cancel Order interface implementations that predate the CME Winter '20 release, including SupplementalOrderService and XOMSupplementalOrderLifeCycle. See In-Flight Order Cancellation (or the instructions for your pre-CME Winter '20 release). This API does not use Order Management Integration Layer features.
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
cancelCart
REST Handler
APICancelCartsCPQV2
Apex Remote Service
CpqAppHandler
Apex Remote Input Map
{"methodName":"cancelCart", "cartId":"80146000000iwCx"}
Package
Communication (vlocity_cmt)
API Parameters and Response Format
For API parameter names and descriptions, see Cart-Based API Swagger Reference.
Resource Information
| Response Format | JSON |
|---|---|
| Resource URL | /services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}/cancel |
Example Request
POST /services/apexrest/v2/cpq/carts/{cart_ID}/cancel
{}
Example Request Body
{
"totalSize": 1,
"messages": [
{
"code": "305",
"severity": "INFO",
"message": "Your order has been cancelled."
}
],
"records": [
{
"displaySequence": -1,
"vlocity_cmt__OrderStatus__c": "Cancelled",
"vlocity_cmt__IsChangesAllowed__c": false
}
]
}