Stuck on a problem and need help troubleshooting a Data Action failure during our weekly schedule publish process. We are trying to automate the validation and execution of agent shift swaps via an Architect flow that triggers a custom Data Action. The goal is to ensure that when agents swap shifts in the WFM self-service portal, the downstream routing configuration updates immediately without manual intervention. However, the flow is consistently failing at the Data Action node with a generic INTERNAL_ERROR status, and the debug logs show a 500 Internal Server Error when the action attempts to call the /api/v2/wfm/scheduling/schedules endpoint.
Here is the sequence of events leading to the failure:
- An agent initiates a shift swap in the WFM Agent Desktop for the upcoming week in the
America/Chicagotimezone. - The Architect flow detects the change via a webhook and retrieves the swap details using the
wfmSchedulinglookup. - The flow passes the new schedule data to a custom Data Action named
ValidateAndPublishSwap. - The Data Action constructs a JSON payload matching the
Scheduleschema and sends aPOSTrequest to the publish endpoint. - The request fails with a
500error, and the schedule remains in aPENDINGstate, causing adherence reporting discrepancies.
We have verified that the service account has the wfm:schedule:manage permission, and manual API calls using Postman with the same payload succeed without issue. The error seems specific to the Data Action execution context. Is there a known limitation with bulk updates or specific header requirements when invoking WFM scheduling endpoints from within an Architect Data Action? We are currently on the 2024-02 Release. Any insights into why the context might be rejecting valid schedule objects would be appreciated.