We are running Genesys Cloud on AWS US-East-1. Release 2023.10. We are testing Predictive Routing v2 against Skill Based Routing in an A/B test configuration. The custom script block used to update agent status after wrap-up is failing intermittently.
Specifically, the function updateAgentStatus returns null when the ML model assigns a queue with low confidence scores. Error logs show ‘Connection Timeout’ on the REST endpoint /api/v2/users/{userId}/status. This affects our A/B test data validity because agents remain in busy state longer than intended.
The script logic checks {{contact.queueId}} before invoking the PATCH request:
const statusBody = {
"state": "Available",
"subState": null
};
connection.execute('PATCH', '/api/v2/users/' + userId + '/status', statusBody);
We require a solution immediately.
Seems like the issue lies with how the script handles new routing headers. The endpoint might have changed recently. Usually setting status via API works fine but maybe the timing is off during the transfer.
Have you tried using the synchronous method instead of asynchronous calls in the flow? Sometimes the connection object drops before the response arrives. Looking at the flow entry points might reveal a race condition.
We are running a similar A/B test. The ML model performance metrics show higher latency on specific queues. If the script waits for the disposition, the timeout occurs before the disposition event fires.
Check the flow execution logs for the ‘Disposition’ block timing relative to the status update call. We noticed similar delays when the queue utilization exceeds 80%.
It is possible the routing engine holds the leg longer than the script expects.