409 Conflict on /api/v2/wfm/schedules/publish with Overlapping Shift Swaps

Does anyone know why the WFM schedule publish endpoint is throwing a 409 Conflict error specifically when shift swaps involve agents with differing availability rules?

We are running our weekly schedule generation for the Chicago timezone (America/Chicago). The process usually completes without issue, but last week it failed during the final validation phase. The error payload from /api/v2/wfm/schedules/publish indicates a constraint violation on agent availability, but the specific agents involved had already approved their shift trades via the self-service portal.

The conflict arises when Agent A (standard 9-5 availability) swaps a morning shift with Agent B (flexible evening availability). The API seems to be validating the swap against Agent B’s original scheduled time rather than the swapped time slot. This results in a false positive for an availability mismatch. We are using the Genesys Cloud REST API v2 with Python 3.9 SDK. The request headers include the standard authorization and the specific schedule ID for the upcoming work week.

We have verified that both agents have the correct permissions for shift trades and that the swap request was fully accepted by both parties before the publish trigger. The error message is generic, citing “Invalid agent assignment for time slot,” which doesn’t help narrow down if this is a data sync issue or a logic bug in the publish engine.

Has anyone encountered this specific behavior with overlapping availability rules during swap validation? We need to ensure the publish job respects the final state of the swap rather than the initial schedule state. Any insights on how to force a refresh of the availability context before the publish call, or if there is a known workaround for this constraint check?

Thanks for the help.