Can anyone clarify the exact behavior of the /api/v2/wfm/schedules POST endpoint when agents have active shift trade requests? We are using the Genesys Cloud Python SDK (v15.2.0) to automate weekly schedule publications for our Chicago-based team. The process usually runs smoothly, but recently we started hitting HTTP 409 Conflict errors specifically when agents have pending swap approvals in the system. The error payload indicates a version mismatch, but it seems tied to the state of the shift trade rather than a simple document revision issue. We need the schedule to publish with the current accepted trades, but the API rejects the entire batch if any trade is in a ‘pending’ state.
This is disrupting our weekly workflow significantly since we publish schedules every Monday morning. We want to ensure that only approved swaps are reflected, but the API seems to lock the schedule object entirely. Is there a specific query parameter or a pre-publish step we are missing to resolve these conflicts? We have tried filtering agents with pending trades, but that leaves gaps in coverage. Looking for a programmatic way to handle this without manual intervention in the WFM UI.