UndoAmendOrder()

Enables you to revert an amendment to an order. For example, you can roll back the changed order date to the previous date. UndoAmendOrder is composite API.

For more information on how an order and its line items are affected when you revert an amendment to an order, refer to the Order Management on Salesforce User Guide.

API Details

Parameters
NameTypeDescription
request

Apttus_Config2.CPQStruct.UndoAmendOrderResponseDO

The request data object.
Request Data Object - Apttus_Config2.CPQStruct.UndoAmendOrderRequestDO
FieldTypeRequired?Description
orderIdIDYesUnique identifier of the amended order.

API Response

Response Data Object - CPQStruct.UndoAmendOrderResponseDO
FieldTypeDescription
PreviousOrderSOStandard Data Object The fields of the Previous Order Object.

Code Sample

Use the following code sample to revert an amendment to an order.

Apttus_Config2.CPQStruct.UndoAmendOrderRequestDO Undo_Amend_request = new Apttus_Config2.CPQStruct.UndoAmendOrderRequestDO();
Undo_Amend_request.orderid = 'a2n4C0000007NGJ'; /** This is the Id of the order whose status is 'In Amendment' **/
Apttus_Config2.CPQStruct.UndoAmendOrderResponseDO UndoAmend_response = Apttus_Config2.OrderWebService.undoAmendOrder(Undo_Amend_request);
system.debug('Order_OLD_Version - ' + UndoAmend_response.PreviousOrderSO.id); /** returns the OrderId of the previous version **/
JS