Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: xember on November 27, 2015, 11:17:24 PM

Title: PlaceStatus
Post by: xember on November 27, 2015, 11:17:24 PM
Hi All,

I trying to get the CurrentAgentSate from an agent with PSDK. So I get a EventInfo and I am able to get the place status. The code below returns an 8. My Agent is in not ready state. My question is ... how can I get from the int 8 to a string representation like NotReadyForNextCall.... ? Thanks in advance!

[code]      EventInfo eventinfo = (EventInfo)message;   
     
      AgentStatus agent = (AgentStatus) eventinfo.getStateValue();
      PlaceStatus place = agent.getPlace();
      System.out.println(place.getStatus());[/code]
Title: Re: PlaceStatus
Post by: cavagnaro on November 28, 2015, 02:32:06 AM
Many times the SDK return num types which you have later to map.
For example Inbound and Outbound calls are 2 and 3 int values
However when you use PSDK queries you can ask something like calltype.callinbound or calltype.calloutbound
So if you want the current status probably will have to build a map of equivalents
Title: Re: PlaceStatus
Post by: xember on November 28, 2015, 08:04:24 AM
Yep thats clear..... but how to call the type in this case?
Title: Re: PlaceStatus
Post by: cavagnaro on November 29, 2015, 09:57:55 AM
As said, build a map. There is no tostring function
Title: Re: PlaceStatus
Post by: PeteHoyle on November 30, 2015, 09:26:06 AM
For the definition of each possible value have a look at the API Docs:

Genesyslab.Platform.Reporting.Protocols.StatServer.DnActions.

Start at zero than then count down, for example
NonMonitored = 0
Monitored = 1
LoggedIn=2
...
NotReadyForNextCall=8
Title: Re: PlaceStatus
Post by: daniel_san on December 01, 2015, 08:59:10 AM
As PeteHoyle said, look at DNActions. There must be around 200 posible states, but for me the most importants:

4:"Ready";
8:"Not Ready"; In that case you can have Not Ready with reason... Normally the reason will be on  Key Value Collection ["ReasonCode"]
9:"AfterCallWork";
6:21:7:20:  Dialing, Interaction, Consult....

Regards.
           
Title: Re: PlaceStatus
Post by: xember on December 04, 2015, 09:30:33 PM
Clear! Thanks pitty that there is no enum :-(