Make In-Flight order changes. Use this API to make the following changes to Order Line Items (OLI):

  • Change the start date or end date of subscription on one or more order line items that are in "Pending", "In Fulfillment", or "Partially Fulfilled" status. 
  • Make subscription date changes on the standalone item, bundles, and multiple charge line items.
  • Cancel order line items in "Pending," "In Fulfillment," or "Partially Fulfilled" status. This changes their status to "Pending Cancellation."
  • Override the "Base Price" field.
  • Change the Quantity.
  • Change the Selling Term, Selling Frequency, and/or Selling Unit-of-Measure (Selling Uom).
  • Modify Contract Numbers
  • Change the Adjustment Type/Adjustment Amount.

The following changes to an order occur after it has been amended:

  • The change in subscription start and/or end date recalculates the price for the line item or bundle after the changes are applied.
  • The changes to the order line items are also reflected in the corresponding assets.
  • Assets are only created on activation of the order line item.
  • Creates a new version of the order to make and track changes and has reference to the previous version. The previous version of the order and order line items are "Superseded", once the work-in-progress (In Amendment) changes are confirmed on "Accept" of the "In Amendment" order.
  • Cancelled order line items are assigned the "Pending Cancellation" status. The order must be accepted to confirm cancellation.
  • Order line items that are added from catalog (line status = "New") or created through ABO actions (line status In "Amended", "Cancelled", "Renewed", "Upgraded") can be amended.
  • Any order configured directly or generated from quote or eCommerce can be amended. 

For more information on amending an order, refer to the topic "Managing In-Flight Changes and Cancellation" in the Order Management for Users.

API Details

amendOrderwebService static Conga_Config2.CPQStruct.AmendOrderResponseDO amendOrder(Apttus_Config2.CPQStruct.AmendOrderRequestDO)









The request data object.

Request Data Object - Apttus_Config2.CPQStruct.AmendOrderRequestDO








Reference to the order. Order Id can be any one of the following:

  • Order in "Pending, In Fulfillment, Partially Fulfilled" status that requires amendment.
  • Order in "In Amendment" status for which additional line item changes are required.



NoList of order line items and changes to make:
  • Order line item id: Reference to the order line item
  • Start Date: New Start date for the order line item. Not needed for the order line item if the termination date for existing subscription needs to be changed. 
  • End Date: New end date for the order line item. If the termination date needs to be changed on existing subscription then just specify the new end date. 
  • Contract Numbers: If the termination date needs to be changed on existing subscription then set this value to null or same as End Date.
  • Base Price: New base price for the order line item.
  • Quantity: New quantity for the order line item (see sample below).
  • Selling Term / Selling Frequency: The new Selling Term or Selling Frequency for an order line item. 
  • Selling Unit-of-Measure: The new Selling Uom for an order line item.
  • Adjustment Type / Adjustment Amount: The new price Adjustment Type and/or Adjustment amount for the order line item.

API Response

Response Data Object - CPQStruct.AmendOrderResponeDO






List of amended order items


Standard Data Object 


The fields of the AmendOrder Object.

Code Sample

The following code sample enables you to amend an order for a valid order with an Order Id.

Id orderId = 'a2n6C000000Dj0r';
List<Apttus_Config2__OrderLineItem__c> orderLinesToAmend = new List<Apttus_Config2__OrderLineItem__c>();
Apttus_Config2.CPQStruct.AmendOrderRequestDO request = new Apttus_Config2.CPQStruct.AmendOrderRequestDO();

for(Apttus_Config2__OrderLineItem__c orderLineSO : [SELECT Id 
                                                    FROM Apttus_Config2__OrderLineItem__c 
                                                    WHERE Apttus_Config2__OrderId__c = :orderId]) {
	Apttus_Config2__OrderLineItem__c amendedOrderLine = new Apttus_Config2__OrderLineItem__c(Id = orderLineSO.Id,
                                                                                            Apttus_Config2__Quantity__c = 4);

request.OrderId = orderId;
request.OrderItems = orderLinesToAmend;

Apttus_Config2.CPQStruct.AmendOrderResponseDO  response = Apttus_Config2.OrderWebService.amendOrder(request);
if(response != null) {
    system.debug('Amended Order Details:'+response.AmendOrderSO);
    system.debug('Amended Order LineItems:'+response.AmendedOrderItems);