AcceptCustomerPO()

Accepts a Customer Purchase Order in Draft status. Changes the status of the Customer Purchase Order and Purchase Order Items to Accepted.

API Details

Parameters
NameTypeDescription
requestApttus_Config2.CPQStruct.AcceptCustomerPORequestDOThe request data object.


Request Data Object - 

Apttus_Config2.CPQStruct.AcceptCustomerPORequestDO

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


API Response

Response Data Object - CPQStruct.AcceptCustomerPOResponseDO
FieldTypeDescription
CustomerPurchaseOrderSOStandard ObjectThe response data object.
Response Data Object - CustomerPurchaseOrderSO
FieldTypeDescription
IsSuccessbooleanSpecifies whether the order is finalized successfully.

Code Sample

The following enables you to accept an order for a valid customer purchase order with an Order ID.

// accept the order
CPQStruct.AcceptCustomerPORequestDO request = new CPQStruct.AcceptCustomerPORequestDO();
request.CustomerPOId = customerPO.Id;

CPQStruct.AcceptCustomerPOResponseDO result = CustomerPOWebService.acceptOrder(request);
system.debug(result.CustomerPurchaseOrderSO)
CODE