execOrderWorkflow()

Executes an Order Workflow Ruleset (Composite API).

API Details

Parameters
NameTypeDescription
requestApttus_Config2.CPQStruct.ExecOrderWorkflowRequestDOThe request data object.
Request Data Object - Apttus_Config2.CPQStruct.ExecOrderWorkflowRequestDO
FieldTypeRequired?Description
OrderIdIDYes

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

API Response

Response Data Object - Apttus_Config2.CPQStruct.ExecOrderWorkflowResponseDO
FieldTypeDescription
IsSuccessBooleanWorkflow is a success true/false
JobIdIDId of asynchronous apex thread. The status of this job can be tracked as a Salesforce Apex Job

Code Sample

The following sample enables you to execute an order workflow.

// id of an order record where status is Pending or In Fulfillment or Partially Fulfilled
Id orderId = 'a2n2f0000008Swz'; 

// request  

Apttus_Config2.CPQStruct.ExecOrderWorkflowRequestDO request = new
Apttus_Config2.CPQStruct.ExecOrderWorkflowRequestDO(); 
request.OrderId = orderId; 
 
// response 

response =
Apttus_Config2.OrderWebService.execOrderWorkflow(request); 
system.debug('Success = '+response.IsSuccess); 
system.debug('Async Job Id = '+response.JobId); 
CODE