Cancel a Manual Strategy Execution Task
Jane wants to cancel a manual strategy
execution task when it is in the Open status. To do this, she must search for the task ID and update the
task status.
Here are the steps to cancel
a manual strategy execution task using the Tasks child resource of
the Collections Strategies REST API:
- Retrieve the task ID using the GET action.
- Cancel the task using the PATCH action.
Step 1: Retrieve the Task ID
Provide the strategy ID to get the execution task details.
Example URL
Here's an example of the resource URL:
GET
/fscmRestApi/resources/11.13.18.05/collectionStrategies/300100180949928/child/strategyExecutionTasks?onlyData=true&orderBy=WorkOrder
Example Response
Here's an example of the response body in JSON format:
{
"items": [
{
"WorkItemId": 100100115828105,
"WorkOrder": 100,
"StrategyTaskTemplate": "Soft Customer Call",
"ScheduleStart": "2019-10-16",
"ScheduleEnd": "2019-10-16",
"ExecutionStart": "2019-10-16",
"ExecutionEnd": "2019-10-16",
"PostWaitEndTime": null,
"TaskType": "Manual",
"AssignedTo": "Jamie Jones",
"CreatedBy": "COLLECTIONS_MGR_OPERATIONS",
"CreationDate": "2019-10-16T06:25:21+00:00",
"LastUpdateDate": "2019-10-16T06:41:45+00:00",
"LastUpdatedBy": "COLLECTIONS_MGR_OPERATIONS",
"TaskStatus": "Complete"
},
{
"WorkItemId": 100100115828134,
"WorkOrder": 300,
"StrategyTaskTemplate": "Moderate Customer Call",
"ScheduleStart": "2019-10-16",
"ScheduleEnd": "2019-10-16",
"ExecutionStart": "2019-10-16",
"ExecutionEnd": "2019-10-16",
"PostWaitEndTime": "2019-10-16",
"TaskType": "Manual",
"AssignedTo": "Jamie Jones",
"CreatedBy": "COLLECTIONS_MGR_OPERATIONS",
"CreationDate": "2019-10-16T06:41:45+00:00",
"LastUpdateDate": "2019-10-16T06:43:18+00:00",
"LastUpdatedBy": "COLLECTIONS_MGR_OPERATIONS",
"TaskStatus": "Complete"
},
{
"WorkItemId": 100100115828137,
"WorkOrder": 400,
"StrategyTaskTemplate": "Moderate Customer Visit",
"ScheduleStart": "2019-10-16",
"ScheduleEnd": "2019-10-16",
"ExecutionStart": "2019-10-16",
"ExecutionEnd": null,
"PostWaitEndTime": null,
"TaskType": "Manual",
"AssignedTo": "Jamie Jones",
"CreatedBy": "COLLECTIONS_MGR_OPERATIONS",
"CreationDate": "2019-10-16T06:43:18+00:00",
"LastUpdateDate": "2019-10-16T06:43:18+00:00",
"LastUpdatedBy": "COLLECTIONS_MGR_OPERATIONS",
"TaskStatus": "Open"
}
],
"count": 3,
"hasMore": false,
"limit": 25,
"offset": 0,
"links": [
{
"rel": "self",
"href": "https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/collectionStrategies/300100180949928/child/strategyExecutionTasks",
"name": "strategyExecutionTasks",
"kind": "collection"
}
]
}
Step 2: Cancel the Task
Using the task ID (WorkItemId) from the response in Step 1, update the task status to Canceled.
Example URL
Here's an example of the resource URL:
PATCH
fscmRestApi/resources/11.13.18.05/collectionStrategies/300100180949928/child/strategyExecutionTasks/100100115828137
Example Request
Here's an example of the request body in JSON format:
{
"TaskStatus":"Canceled"
}
Example Response
Here's an example of the response body in JSON format:
{
"WorkItemId": 100100115828137,
"WorkOrder": 400,
"StrategyTaskTemplate": "Moderate Customer Visit",
"ScheduleStart": "2019-10-16",
"ScheduleEnd": "2019-10-16",
"ExecutionStart": "2019-10-16",
"ExecutionEnd": null,
"PostWaitEndTime": null,
"TaskType": "Manual",
"AssignedTo": "Jamie Jones",
"CreatedBy": "COLLECTIONS_MGR_OPERATIONS",
"CreationDate": "2019-10-16T06:43:18+00:00",
"LastUpdateDate": "2019-10-16T06:45:16+00:00",
"LastUpdatedBy": "COLLECTIONS_MGR_OPERATIONS",
"TaskStatus": "Canceled",
"links": [
{
"rel": "self",
"href": "https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/collectionStrategies/300100180949928/child/strategyExecutionTasks/100100115828137",
"name": "strategyExecutionTasks",
"kind": "item",
"properties": {
"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
}
},
{
"rel": "canonical",
"href": "https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/collectionStrategies/300100180949928/child/strategyExecutionTasks/100100115828137",
"name": "strategyExecutionTasks",
"kind": "item"
},
{
"rel": "parent",
"href": "https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/collectionStrategies/300100180949928",
"name": "collectionStrategies",
"kind": "item"
},
{
"rel": "lov",
"href": "https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/collectionStrategies/300100180949928/child/strategyExecutionTasks/100100115828137/lov/strategyTaskTemplates",
"name": "strategyTaskTemplates",
"kind": "collection"
},
{
"rel": "lov",
"href": "https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/collectionStrategies/300100180949928/child/strategyExecutionTasks/100100115828137/lov/collectors",
"name": "collectors",
"kind": "collection"
}
]
}