Data Action timeout when mapping BYOC trunk metadata to WEM exports

What’s the best way to configure a Data Action to enrich WEM export files with real-time trunk utilization metrics without triggering timeout errors?

We are attempting to correlate call quality data from our 15 BYOC trunks in AP-Southeast-1 with WEM wrap-up codes. The current setup uses a Data Action that triggers on every wrap-up event. This action queries the Telephony Providers Edge API to fetch the last known status of the trunk associated with the call leg. The goal is to append carrier-specific latency and jitter metrics to the final CSV export for downstream analytics.

The issue arises when the WEM export process initiates. The Data Action fails to complete within the allowed execution window, resulting in missing columns in the export file. The Platform API logs show HTTP 504 Gateway Timeout errors when the Data Action attempts to poll the /api/v2/telephony/providers/edges endpoint for more than three concurrent requests. This suggests a bottleneck in how the Data Action handles asynchronous calls to the telephony provider endpoints.

Environment details:

  • Platform: Genesys Cloud (AP-Southeast-1)
  • Trunks: 15 BYOC with custom SBCs
  • SDK Version: 2.0.14
  • Architect Flow: v14.2.1
  • WEM Version: 2023.4.1
  • Data Action Type: Custom JavaScript

The JavaScript code within the Data Action uses the Genesys Cloud SDK to make authenticated requests. The timeout occurs specifically when the request queue exceeds five pending operations. We have verified that the API credentials have the necessary permissions for telephony:providers:edges:read. The SBCs are responding correctly to direct HTTP requests, so the issue seems isolated to the Data Action execution environment.

Is there a recommended pattern for batching these API requests within a Data Action? Or should we be using a different integration method to pull this data into WEM exports? We need a reliable solution that does not degrade the performance of the wrap-up process for agents. Any insights on optimizing the Data Action configuration or alternative data enrichment strategies would be appreciated.