This API finalizes a draft order on customer confirmation. Accepting an order performs the following functions:

  • IF Auto Activate Order = False
    • Order and Order Line Item status is set to “Pending”.
    • Asset Line Items are created in “Pending” status.
    • If “Ready for Billing Date” is set, the billing schedule generation is initiated.
  • IF Auto Activate Order = True
    • Order and Order Line Item status is set to “Activated”.
    • Asset Line Items are created in “Activated” status.
    • If “Ready for Billing Date” is set, the billing schedule generation is initiated.

API Details

APISignature
acceptOrderwebService static Apttus_Config2.CPQStruct.AcceptOrderResponseDO acceptOrder(Apttus_Config2.CPQStruct.AcceptOrderRequestDO)

Parameters
NameTypeDescription
RequestApttus_Config2.CPQStruct.AcceptOrderRequestDOThe request data object.



Request Data Object - 

Apttus_Config2.CPQStruct.AcceptOrderRequestDO

FieldTypeRequired?Description
OrderIdIDYesThe Id of the Order to be finalized.


API Response

Response Data Object - CPQStruct.AcceptOrderResponeDO
FieldTypeDescription
IsSuccessbooleanSpecifies whether the order is finalized successfully.
AssetLineItems

List<Apttus_Config2__AssetLineItem__c>

List of Asset Line Items


Code Sample

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

public void acceptOrder() {
    
        Apttus_Config2.CPQStruct.AcceptOrderRequestDO request = new Apttus_Config2.CPQStruct.AcceptOrderRequestDO();
        
        request.OrderId = orderId;
        
        Apttus_Config2.CPQStruct.AcceptOrderResponseDO response = Apttus_Config2.OrderWebService.acceptOrder(request);
        
        ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, 'acceptOrder :' + response.IsSuccess));
        ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, 'List of Assets :' + response.AssetItems));
        
    }
CODE

Integration Details

Use the following information in your integrations with Apttus CPQ Web Services API. Refer to Integrating Apttus with External Systems for information on how to get started.

Request and Response XML

Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ord="http://soap.sforce.com/schemas/class/Apttus_Config2/OrderWebService" xmlns:cpq="http://soap.sforce.com/schemas/class/Apttus_Config2/CPQStruct">
   <soapenv:Header>
      <ord:SessionHeader>
         <ord:sessionId>00D7A0000009QII!ARUAQFmpeBOmsYS2JcADxYc4PxWoOkAHJP1JiNo5vtvnDBCEvfnWWWmO7pqbEXY7WadiCmm_Vib6MjhmgUbR8321tIO1NQRg</ord:sessionId>
      </ord:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ord:acceptOrder>
         <ord:request>
            <cpq:OrderId>a2n7A0000002tviQAA</cpq:OrderId>
         </ord:request>
      </ord:acceptOrder>
   </soapenv:Body>
</soapenv:Envelope>
XML

Example Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://soap.sforce.com/schemas/class/Apttus_Config2/OrderWebService" xmlns:AcceptOrderResponseDO="http://soap.sforce.com/schemas/class/Apttus_Config2/CPQStruct" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <acceptOrderResponse>
         <result>
            <AcceptOrderResponseDO:AssetItems xsi:nil="true"/>
            <AcceptOrderResponseDO:IsSuccess>true</AcceptOrderResponseDO:IsSuccess>
         </result>
      </acceptOrderResponse>
   </soapenv:Body>
</soapenv:Envelope>
XML