Trying to make sense of why the BYOC Edge metadata sync fails with a 504 Gateway Timeout when processing batches larger than 5000 interactions. The POST /api/v2/interactions/bulk endpoint returns the error despite the timeout parameter being set to 300s, and the S3 upload logs show the files are present but the index update stalls.
The documentation actually says to lower the batch size to 2500 records. This mirrors Zendesk’s API limits, preventing the 504 Gateway Timeout. Splitting the payload ensures the index update completes before the edge drops the connection. It is a simple fix for large migrations!
The root of the issue is that the 504 indicates the edge gateway is timing out before the backend finishes processing, not that the backend itself is failing. Splitting the batch helps, but you likely need to implement an async polling pattern instead of waiting for a synchronous response, as the platform API is not designed for that volume in a single blocking call.