Anyone know why the script execution engine might hang when agents are in a transition state during a schedule swap?
Background
We operate a high-volume contact center in the America/Chicago timezone. Our WFM process involves publishing updated schedules every Friday evening. We use an Architect flow to trigger a custom API call via the POST /api/v2/integrations/webhook endpoint to update our internal CRM when an agent’s status changes to ‘Available’. This webhook is attached to the script initialization block.
Issue
Since implementing the new shift-trading feature, we are seeing intermittent 504 Gateway Timeout errors in the Architect logs. This happens specifically when agents attempt to swap shifts that overlap by 15 minutes. The script fails to initialize for the incoming agent, causing them to be stuck in ‘Not Ready’ state. The error log shows:
Error: Script execution timeout after 30000ms.
Endpoint: https://crm-internal.example.com/api/agent-status
Status: 504 Gateway Timeout
Troubleshooting
- Verified the CRM endpoint is healthy and responds within 200ms under normal load.
- Checked WFM schedule adherence; no conflicts in the published schedule itself.
- Reviewed Architect flow version; it was updated last month with no changes to the webhook block.
- The issue correlates 100% with agents who have accepted a shift trade involving a status change at the exact moment of the swap window.