Hello,
Currently to update a WFM schedule with a specific activity code in a particular timeframe we use these API :
1/Create the timeoff request with a specific status (pending approved) POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeoffrequests
2/Update time off request. PATCH/api/v2/workforcemanagement/managementunits/{managementUnitId}/users/{userId}/timeoffrequests/{timeOffRequestId}
The only way to update existing WFM schedule is to create an activity code as a timeoff?
This will help to re-optimize the schedule taking the time off requests into account, but you still have to apply the suggested changes to the schedule via the update process mentioned above. Note: you can only have one un-applied reschedule per business unit at any given time. Once you're done with the reschedule result (whether you accept or decline the changes) you need to call this route to clear it: PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs/{runId}
Basically the principle is there is no automated process to forcibly update a schedule once created. All operations allow the customer to review changes before they're applied.
Thanks for your details explanation!
I can reuse this code below for update the schedule with a activityCodeId different to the timeoff activitycodeID (for example 3 for the meeting) and follow the steps described in the help.
Hello,
I have followed the guideline : https://developer.genesys.cloud/useragentman/workforcemanagement/upload-update-schedule
It work perfectly if I want update one day in a schedule (for exemple Monday) but if I want update another day (ex : Wednesday) and redo the same procedure for the same week, it doesn't work.
Is there limitation with this procedure to only one update for one schedule or is there something to change for the second update?
thanks
jeremy
Can you expand on what you mean by "it doesn't work"? Do you get an error message? Just taking a stab at a possible "gotcha", note that each time you save an edit to an agent's schedule you have to pull the "version" off of the response and populate it in the next update. Alternately, you can change everything you want to change in a single request
From the API output, I have no errors when I run the API (but there is no modification in the WFM schedule). Just taking a stab at a possible "gotcha", note that each time you save an edit to an agent's schedule you have to pull the "version" off of the response and populate it in the next update. => I have done a simple test, the only modifications are reported is the json file with new change in the week day, is there another API (not mention in the guideline) to use for pull the "version" off the response?
I cannot update everything in one time because the shift change can happen twice a day/week.
The error would come via the metadata from the operation completion notification (note I believe there are two ways to subscribe to events via the sdk, one of which returns notification metadata and the other does not. For debugging schedule issues you'll need the one that returns the metadata). The errors that are delivered via that notification should help you debug.
you mean this notification topic v2.workforcemanagement.businessunits.{id}.schedules
I retrieve this log when it fails, this can be help for debug with operationId?
that's the correct notification, but looks like it's the non-metadata version. I'm not super familiar with the SDK, but take a look at your notification listener. Whenever you get the event, in addition to getting the event body there should be a method to get the event metadata. The error information will be present on the metadata.