This API 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 a composite API.

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

API Details

APISignature
undoAmendOrderwebService static Apttus_Config2.CPQStruct.UndoAmendOrderResponseDO undoAmendOrder(Apttus_Config2.CPQStruct.UndoAmendOrderRequestDO)
Parameters
NameTypeDescription
request

Apttus_Config2.CPQStruct.UndoAmendOrderResponseDO

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

API Response

Response Data Object - CPQStruct.UndoAmendOrderResponseDO
FieldTypeDescription
PreviousOrderSO

Standard Data Object 

<Apttus_Config2__Order__c>

The fields of the Previous Order Object.

Code Sample

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

Id orderId = 'a2n6C000000Dj0r';
Apttus_Config2.CPQStruct.UndoAmendOrderRequestDO request = newApttus_Config2. CPQStruct.UndoAmendOrderRequestDO();
request.OrderId = orderId;

Apttus_Config2.CPQStruct.UndoAmendOrderResponseDO result = OrderWebService.undoAmendOrder(request);

system.debug('order object with reverted changes'+result.PreviousOrderSO);
JS