Author Topic: Stat SDK 7.6 : How to get agent state  (Read 4098 times)

Matt

  • Guest
Stat SDK 7.6 : How to get agent state
« 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

Marked as best answer by on Today at 11:25:58 PM

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Stat SDK 7.6 : How to get agent state
« Reply #1 on: July 08, 2009, 07:48:24 PM »
  • Undo Best Answer
  • 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.