04-07-2025 10:25 PM
Hi All,
Is there an API available that allows us to retrieve the agent idle time along with their idle status codes?
Specifically, we are looking for details such as:
How long an agent was idle
The specific idle status code during that time
Duration spent in each idle status
Solved! Go to Solution.
04-11-2025 12:47 AM
Hi @yogendra-gupta,
Thanks for the background!
Yes, so have you tried this one from the sample - https://github.com/WebexSamples/webex-contact-center-api-samples/blob/main/reporting-samples/graphql-sample/agentSession/Performing%20Aggregations/Aggregation%20global%20filter%20query.graphql
I think this should be working as per your requirement since it'd try to fetch the agentSession details for a specific Agent ID.
Let us know how it goes with this sample I shared here.
Regards!
Sandip
04-09-2025 01:40 AM
Hi @yogendra-gupta,
Thanks for your patience so far!
So, this is something I don't think you can calculate from the API Response parameters directly.
Rather what you can do is, you can setup Webhook on "agent:state_change" event to finally get these details.
You can find the documentation from here - https://developer.webex-cx.com/documentation/agents/v1/agent-state-change
And from the Webhook notification, finally you can calculate the duration of agent's status changes logically.
Otherwise, you can also give it a try to this samples which should help you to make an aggregation on the preferred parameters -
https://github.com/WebexSamples/webex-contact-center-api-samples/blob/main/reporting-samples/graphql-sample/agentSession/Performing%20Aggregations/Group%20by%20query.graphql
or,
https://github.com/WebexSamples/webex-contact-center-api-samples/blob/main/reporting-samples/graphql-sample/agentSession/Performing%20Aggregations/Aggregation%20query.graphql
Let us know if this helps or, in case you've any further queries on this.
Regards!
Sandip
04-10-2025 03:45 AM
Hi All,
Thanks @sandiban for your suggestion.
We are able to find the idle count and average value of idle time based on channel type, but we need agent wise separation so that we can produce a report based on agent.
It will be helpful if you can suggest something for this.
Thanks!
04-11-2025 12:47 AM
Hi @yogendra-gupta,
Thanks for the background!
Yes, so have you tried this one from the sample - https://github.com/WebexSamples/webex-contact-center-api-samples/blob/main/reporting-samples/graphql-sample/agentSession/Performing%20Aggregations/Aggregation%20global%20filter%20query.graphql
I think this should be working as per your requirement since it'd try to fetch the agentSession details for a specific Agent ID.
Let us know how it goes with this sample I shared here.
Regards!
Sandip
04-11-2025 05:29 AM
Hi Team,
Thanks for your support we have executed the APIs and got the required result.
Regards
Yogendra Gupta
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide