Optimizing Analytics User Detail Queries for Large Organizations

I am currently working on a performance audit of the Analytics User Detail Query. We are a large organization with over five thousand agents, and I am finding that querying for the ‘Presence History’ of all agents for a single day takes more than twenty seconds to return. Is there a way to optimize this query, or is there a bulk export job for user details that is more efficient than the real-time query endpoint?

I deal with the voice quality for our remote agents. I have seen these slow queries impact our monitoring dashboards. You should never query for five thousand agents in a single request. The analytics engine has to aggregate data from many shards and it will always be slow. You should break your query into smaller ‘Division’ or ‘Group’ filters and run them in parallel. This will significantly reduce the response time for each individual request.

I have been using the ‘Analytics Jobs’ API for our large-scale data exports. Har40, you should look at the /api/v2/analytics/users/details/jobs endpoint. It allows you to submit a bulk request that runs in the background and then you can download the results as a compressed JSON file. It is designed for exactly this use case and it does not have the same latency issues as the real-time query endpoint.

Hello again! To follow up on Roh14, the Analytics Jobs API is a total life-saver for big organizations! Just make sure you are not submitting too many jobs at once, as there is a concurrency limit of five jobs per organization. We use it every night to pull our presence data into our external WFM system and it works like a charm!