Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 668
 
Chapter 4      Building Your Application
Building Supervisor Applications
4-98
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1) 
OnMonitoredAgentStateChange Events
OnMonitoredAgentStateChange events are sent when an agent in the supervisor’s 
team changes state.  Supervisor applications, like the CTIOS Toolkit Combo 
Desktop use this event to update structures that store the supervisor’s team (the 
agent team grid).  This event is processed similar to OnNewAgentTeamMember.  
However, there is one subtle difference.  Instead of using the Arguments object 
carried with the event, the application should use the arguments associated with 
the agent object cached by the CIL.  This is done to correctly handle skill group 
membership changes related to dynamic reskilling.  The CIL contains logic that 
processes the OnMonitoredAgentStateChange and determines whether or not an 
agent has been added or removed from a skill group.  The changes in the agent’s 
skill group membership are reflected in the agent object’s properties.
OnMonitoredAgentInfo Event
This event can be used to populate the following agent information.
  •
AgentID
  •
AgentFirstName
  •
AgentLastName
  •
LoginName
Time in State
If your application needs to track an agent’s time in state, it can be done as 
follows.  The algorithm is contained in AgentSelectGridHelper.cs.  The first part 
of the algorithm resides in the AgentData.UpdateData() method.  This method 
decides if the agent’s state duration is known or unknown.  An agent’s state 
duration is unknown if the agent has just been added to the grid or if the agent’s 
state has not changed since being added to the grid.  If a state change is detected 
after the agent has been added to the grid, the time of the state change is marked.
Second, there is a timer callback that the AgentSelectGridHelper class starts when 
the grid is initialized.  The timer callback fires every ten seconds.  When the 
callback fires, the method AgentSelectGridHelper.m_durationTimer_Tick() 
cycles through all of the rows in the grid.  Each row who’s Time in State column 
is not unknown, has its value set to the time the agent changed state minus the 
current time.