Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

IPCC HDS

Hello , i'me currently searching for a table contains historical data for IPCC DB per agent per log in period , not per half hour  or five minutes as existed .

the question  : Is there any table or join of tables contains historical data record for the agent for each login period(from the login to the logout date) , So i will get accurate data .? thanks,

1 REPLY

Re: IPCC HDS

Alaa,

You want the Agent State Detail table. Make a join based on two tables, one table which is the login, and one table which is the logout. Join the two based on agentID and any other conditions you require.

Example of login table:

SELECT agentID, eventDateTime AS loginTime, eventType

                FROM dbo.AgentStateDetail AS ASD1

                JOIN dbo.Resource AS r ON ASD1.agentID = r.resourceID

                WHERE eventType = 2 AND r.dateInactive >= @startDateTime

Example of logout table:

SELECT agentID, eventDateTime AS logoutTime, eventType

                FROM dbo.AgentStateDetail AS ASD2

                JOIN dbo.Resource AS r ON ASD2.agentID = r.resourceID

                WHERE eventType = 3 AND r.dateInactive >= @startDateTime

Join the two, do a date diff and you'll have the duration between the two states. In this example, ready/notready times. Change eventType to suit your needs.

Tanner Ezell www.ctilogic.com
489
Views
0
Helpful
1
Replies
CreatePlease to create content