I'm trying to make a reschedule of the schedule using this API /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/reschedule
I have this kind of output
{
"status": "Processing",
"operationId": "885e304c-40f3-47ff-842c-ab3b578c12fc"
}
But I have no change on my schedule, I see also there is another API for check the result of a rescheduling
/api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs/{runId}/result
but don't know where I can find the runId parameter.
A reschedule does not automatically update or re-publish the schedule. If you run a reschedule from the UI using the schedule editor, you'll see that you have to manually review and apply any recommended changes, then upload the updated schedule following these instructions: https://developer.genesys.cloud/api/rest/v2/workforcemanagement/upload-update_schedule
Note that the current method for updating schedules is planned to be deprecated in the coming months as there is currently in development an updated and simpler method for uploading the updated schedule.
That's correct. Then you fetch the result for the run, and review the suggested changes and apply them to the schedule object before uploading the changes via the update instructions provided
The operations can be scripted. As I mentioned in my previous reply on your original topic, the process is far from trivial which is why it's not recommended, but it can be done. The reschedule result has to be downloaded, along with the agent schedules for all affected management units. Then you have to apply the reschedule results to that schedule, serialize back to json and upload as explained in the doc for updating a schedule
Just for clarification, the above workflow to accomplish what you're wanting to do will be the same as it is currently. It's just the specific update schedule step will be easier to do via the SDK and better documented