Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: Matt on July 08, 2009, 03:10:40 AM

Title: Stat SDK 7.6 : How to get agent state
Post by: Matt on July 08, 2009, 03:10:40 AM
Hello,

I have written a java program to retrieve the current agent state using stat SDK,
However i need more detailed states in terms of AUX reason code. Currently i can retrieve states like 'Availbale' 'NotReadyForCall',Logged Out etc.. However i am more interested in finding the reason codes for current NotReady state

Any help would be appreciated

Thanks,
Matt
Title: Re: Stat SDK 7.6 : How to get agent state
Post by: René on July 08, 2009, 07:48:24 PM
Hi Matt,

I did quick test and found a way how to get it :)

- Subscribe a statistic with following definition
    Category: CurrentState
    Subject  : DNAction
    Object Type: Agents

- Once you get statistic info (part of EventPackageInfo) you have proceed with following steps:
  - Cast Statistic.ObjectValue to AgentStatus class
  - Get PlaceStatus (AgentStatus.getPlace)
  - Iterate through DnStatuses collection (getDnStatuses)
      - Iterate through Actions collection (getActions)
        - find Action of type "SDNANotReadyForNextCall" (getAction == 8)
          - check UserData property (getUserDate) - you should find there ReasonCode key with value

Sorry for a bit confusing description but I have my code written in C# not Java

R.