The agent idle time is calculated by getting the difference between the login time and the pause and the talk time.
Here are the MySQL instructions in order to create a simple view to collect the agent idle time.
You need to identify a queue as a reference in order to calculate the total PAUSE and LOGIN time. That queue must be assigned to all agents.
Create a queue called "internal" and assign all agents to it. We'll use the "internal" queue in the MySQL view creation.
- The agents must use always the PAUSE status for all queues. If they use the partial pause, the IDLE time calculation could not be accurate.
- The outbound calls are not included in the total talk time. The agents must be paused (e.g. pause type "Outbound") while they are in outbound call conversation.
Add the MySQL views
Since the IDLE time is calculated using a combination of 3 different views, it could be heavy and could impact on the database performance. Please limit the time range and run it only on the REPLICA DB.
Run the following MySQL queries:
remember to replace the queue 'internal' with the queue name you are using as a reference.
and now we add the view to get the IDLE time
Get the IDLE time
SELECT * from agent_timing where agent="john.doe"