Cancels an order. The status of the order and its line items changes to Pending Cancellation and a new version is created. The status of the previous order is set to Being Cancelled. Please note the following:

  • If you decide to revert (undo) the cancelled order, the new order version is deleted and the previous order version shows Pending status.
  • If you decide to cancel the order, you must accept the cancellation of the order. After accepting cancellation, a new version is created showing with Cancelled status for the order as well as its line items. In this case, the previous version shows Superseded status for the order and its line items. 
For more information on how an order and its line items are affected when you cancel an order, refer to the Order Management on Salesforce User Guide.

API Details



The request data object.

Request Data Object - Apttus_Config2.CPQStruct.CancelOrderRequestDO
orderIdIDYesUnique identifier of the order to be cancelled.

API Response

Response Data Object - CPQStruct.CancelOrderResponseDO
cancelOrderSOStandard Data Object The fields of the Cancel Order Object.

Code Sample

The following code sample allows you to cancel an order.

ID Orderid = 'a2n4C0000007NFpQAM';
Apttus_Config2.CPQStruct.CancelOrderRequestDO CancelRequest = new Apttus_Config2.CPQStruct. CancelOrderRequestDO(); 
Apttus_Config2.CPQStruct.CancelOrderResponseDO Cancel_Response = Apttus_Config2.OrderWebService.cancelOrder(CancelRequest); 
system.debug('OrderID_New_Version - '; /**This ID should be passed While Processing Undo Cancel request **/