Executing Order Workflow
This API executes an Order Workflow Ruleset (Composite API).
API Details
|
API |
Signature |
|---|---|
|
execOrderWorkflow |
|
|
Parameters |
||
|---|---|---|
|
Name |
Type |
Description |
|
request |
|
The request data object. |
|
Request Data Object - Apttus_Config2.CPQStruct.ExecOrderWorkflowRequestDO |
|||
|---|---|---|---|
|
Field |
Type |
Required? |
Description |
|
OrderId |
|
Yes |
Reference to the order. Order iD can be any one of the following:
|
API Response
|
Response Data Object - Apttus_Config2.CPQStruct.ExecOrderWorkflowResponseDO |
||
|---|---|---|
|
Field |
Type |
Description |
|
IsSuccess |
|
Workflow is a success true/false |
|
JobId |
|
Id 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);
