Shift Swap API 409 on Valid Trades

Configuration is broken for some reason… The /api/v2/wfm/schedule/shiftswaps endpoint returns a 409 Conflict for valid agent-to-agent trades in the Chicago org, even though both agents have matching skills and no overlapping time-off.

Error: Schedule state mismatch. Expected state: ACTIVE, Current state: LOCKED.

This happens immediately after the weekly publish job completes. Is there a delay in state propagation?

you need to check if the schedule is actually unlocked before sending the swap request. the 409 error with “locked” state usually means the weekly publish job hasn’t fully cleared the write locks, or a manual edit is still pending. try polling the /api/v2/wfm/schedule/versions endpoint to confirm the status is PUBLISHED and not SCHEDULED or LOCKED. sometimes there is a slight delay in state propagation after the publish job, especially in larger orgs like chicago. if the state is correct, verify that the swap window allows for agent-initiated trades. also, ensure no other bulk export jobs are running concurrently that might lock the schedule metadata. i see this often when legal holds are active on the schedule data. wait 30 seconds after publish and retry. if it persists, check the audit trail for any conflicting updates.