Retrieving Agent’s Sign-in Information in RGS

Animated by a recent comment I decided to give some more insight into the Agent Sign-in logic of the Response Group Service of Office Communications Server 2007 R2.

We keep the sign-in states of agents in formal agent groups in a dedicated table called ‘AgentGroupSignInStates’ in the backend database (called ‘acddyn’) for each pool. The table is kept very simple. It consists only of three fields:

  • AgentId (uniqueidentifier)
  • GroupId (uniqueidentifier)
  • State (tinyint)

The first two fields, AgentId and GroupId, make up the primary key for the table, so they have to be unique. In other words, an agent can only have one sign-in state for every group he’s a member of. The State field indicates the current sign-in state for the agent with the given AgentId in the group with the given GroupId. A value of 0 means that the agent is not signed in, 1 means that the agent is signed in. If a record does not exist for an agent in a formal group, then the agent has never signed in yet (so he’s signed out). The AgentId and GroupId values should match the values of existing agents and groups in the RGS system (in WMI), though this is not enforced.

You should not modify records in the ‘AgentGroupSignInStates’ table, because the table is only kept as a reference in case of data-loss in the MatchMaking component of the Response Group Service. However, MatchMaking always keeps this table up-to-date, so reading from it should give you the most recent view on the sign-in states of the agents.