cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
229
Views
2
Helpful
4
Replies

Webex CC - API to get the agent idle time with their idle code

yogendra-gupta
Level 1
Level 1

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

1 Accepted Solution

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

View solution in original post

4 Replies 4

sandiban
Cisco Employee
Cisco Employee

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

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!

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

Hi Team,

Thanks for your support we have executed the APIs and got the required result.

Regards 

Yogendra Gupta