List all events for an agent (fnc_agent_events_window)
In table agent_events we have
- agent login (i)/logoff (o)/pause (p)/return from pause (r) events with no duration
- conversation events with duration that includes information about connecting, connected/speaktime and wrap-up time (events copied from table call_events) .
Details about these events can be found here.
If you want to see the “timeline” for one agent, you can use the function fnc_agent_events_window (see Functions and Stored Procedures) to list all events for this agent, with start/duration and adjusted start/duration, chronologically.
If you use this function with mode=1;
- Login events are given adjusted duration until next log off (or period end)
- Logoff events are given adjusted duration until next logon (or period end if that happens first)
- Pause events are given adjusted duration until first Return from pause.
- Return from pause events are removed
- Answered (result k) and unanswered (result t, h, b…) Conversation events are listed
- Answered Conversation events with wrap-up time > 0 are divided into two:
- one Conversation event
- one Wrap-up event (event_type=w)*
- For the (ready) time between Conversation events we are generating Available events (event_type=a)*
- You can remove the Login events (which is implicit expressed by Available) from the result by adding “where event_type not in (‘i’)” to your query.
* Events with type Available (a) and Wrap-up (w) do not appear directly in the agent_events table.
Example query and result:
select * from [dbo].[fnc_agent_events_window]
(150674,'27-jun-2016 10:00','27-jun-2016 10:20',1, , )
order by dte_start
If you add “where event_type not in ('i')” to the query, row number 2 in the result (the login event with adjusted duration) will not be included.
The values in columns adj_dte_start and adj_duration_sec are used to make the next 2 illustrations, but the actual length of each event in the graph is not correct:
What if the agent clicks Pause while connected or Log off while connected?
- If the agent clicks Pause while connected (T1), the agent has status [Paused AND Connected] until call end (T2), and there will be no wrap-up.
- If the agent clicks Log Off while connected (T3), the agent has status [Logged off AND Connected] until call end (T4), and there will be no wrap-up.
New from DB v1.5 in these 2 cases:
- The Pause (Log Off) event’s adj_dte_start will be moved from T1 to T2 (from T3 to T4) and its adj_duration_sec will be reduced
- The Log In event’s adj_duration_sec will be increased (so that it ends at T4)
So, how do I find the time an agent has been “idle”?
Idle time might be defined as the time an agent is logged on and not in pause and not busy working with a request.
- For agents that only handle phone in Puzzel, one could say that the agent’s idle time is equal to the time the agent is in status Ready. This will be the time reported as Available plus the duration for Conversation events not answered, when using the function Get agent events
- For agents that handle Chat, Social and/or Email in Puzzel, this is more complex. Please see chapter about Chat. The short version is that you have to include the conversation events for chat, social and email that the main agent’s secondary agents receive, in order to calculate when the agent is actually idle. One agent might have overlapping chats/social/emails, so the idle time is not equal to total time minus sum “speaktime” for all the conversation events for the agent
- If your agents handle chat, social and/or email in addition to phone in Puzzel, the available events represent the time the agent is logged on and not in pause and not speaking (phone) and not in wrap-up, but possibly connected to a chat/email/social request.