Stuck on Architect flow timeout during WFM shift swap validation

Stuck on an intermittent 504 Gateway Timeout when our custom Architect flow attempts to validate agent availability via the WFM API during peak shift swap hours.

We have a script that checks real-time schedule adherence before routing high-priority calls. The flow hits the /api/v2/wfm/schedules/agents/{agentId}/availability endpoint. Normally, this returns in under 200ms. However, between 2 PM and 4 PM CT, when our team is actively trading shifts, the call fails with a 504.

The Architect flow is configured with a 10-second timeout, which should be plenty. We are on Genesys Cloud 2024.2.0 in US-East-1. The error log shows:

Error: Request timeout after 10000ms
Endpoint: /api/v2/wfm/schedules/agents/12345/availability
Status: 504

This only happens when the agent is currently in the middle of a shift swap transaction. If the swap is completed or cancelled, the API responds instantly. Is there a known lock on the schedule data during swap processing that blocks API reads? We need to ensure our routing logic doesn’t drop calls just because someone is swapping shifts.

Thanks for the help.