You are here:
Get the Status of Async Processes
Get the status of Async Engine processes.
This API allows you to get the current status of a process. You can use this call to report the progress of the process to users. Ensure that an interval of at least one minute is specified between status calls to ensure that the server isn't overloaded with requests. You can also call the API from the last FinishProcess to implement a callback or send a notification to the user.
Note that when using the reference ID as input, the call can return the status of several Async processes which can cause it to hit governor limits. You can use the query parameters to reduce the size of the response.
VIP or Apex
Method Name or Action: getAsyncJobStatus
Payload: Map<String, Object>
Use the String to specify either the Async process ID or reference ID
Request Parameters
Parameter | Description |
|---|---|
verbose |
(Optional) Specifies whether to provide the detailed status of each step. If you specify false, the itemsProcessed section is not returned. Default: true. |
itemsList |
(Optional) Specifies whether to return the list of items that were successful or that failed. When you set this parameter to false, the itemsProcessed.successfully and itemsProcessed.failed are not returned. Default: true. |
failMessage |
(Optional) Specifies whether to return the error message for each failed item. If set to false, the itemsProcessed.failed[index].statusMessage are not returned. Default: true. |
Example
Gets the status of an Async Process with reference ID 12324.
GET /v1/asyncprocesses/12324 Response body:
{
"code": 200,
"statusMessage": "Success",
"technicalMessage": null, // Mandatory - null or error technical detail
"AsyncProcessStatus": [
// if getting status using reference ID then more than 1 record can be returned
// if getting status using async process ID then only 1 record will be returned
{
"referenceId": "12324",
"asyncProcessName": "Bulk CPQ",
"asyncProcessId": "9876543",
// Overall status
"status": "InProgess",
"message": "Step 1 had errors",
"stepName": "Price",
"currentStepNumber": 1,
"totalNumberOfSteps": 2,
// Status detail for each step
"itemsProcessed": [
{
"stepNumber": 0,
"stepName": "Validate",
"status": "Failed",
"currentNumberOfItemsProccessed": 6,
"totalNumberOfItemsToBeProccessed": 6,
"message": "Completed with errors",
"successfully": ["Id", "Value"],
"failed": [
{ "items": [{ "key": "value" }, "AnyItem"], "code": 5001, "statusMessage": "Invalid status" },
{ "items": ["NewValueAdded", { "AnotherValueAdded": "AnotherValue" }], "statusCode": 5004, "statusMessage": "Missing data" }
]
},
{
"stepNumber": 1,
"stepName": "Price",
"status": "InProgress",
"currentNumberOfItemsProccessed": 3,
"totalNumberOfItemsToBeProccessed": 6,
"message": "In progress",
"successfully": ["Id", "Value", { "key": "value" }],
"failed": []
}
],
"additionalData": { "NewKey2": ["NewValue2", "NewValue3"], "NewData": { "NewKey4": "NewValue4" }, "anotherNewInfo": "newInfo" }
},
{
"referenceId": "12324",
"asyncProcessName": "Bulk CPQ",
"asyncProcessId": "64221481",
"status": "Success",
"message": "Completed",
"stepName": "Price",
"currentStepNumber": 1,
"totalNumberOfSteps": 2,
"itemsProcessed": [
{
"stepNumber": 0,
"stepName": "Validate",
"status": "Success",
"currentNumberOfItemsProccessed": 6,
"totalNumberOfItemsToBeProccessed": 6,
"message": "Completed",
"successfully": ["Id", "Value", { "key": "value" }, "AnyItem", "NewValueAdded", { "AnotherValueAdded": "AnotherValue" }],
"failed": []
},
{
"stepNumber": 1,
"stepName": "Price",
"status": "Success",
"currentNumberOfItemsProccessed": 6,
"totalNumberOfItemsToBeProccessed": 6,
"message": "Completed",
"successfully": ["Id", "Value", { "key": "value" }, "AnyItem", "NewValueAdded", { "AnotherValueAdded": "AnotherValue" }],
"failed": []
}
],
"additionalData": { "NewKey2": ["NewValue2", "NewValue3"], "NewData": { "NewKey4": "NewValue4" }, "anotherNewInfo": "newInfo" }
}
]
}

