Author Topic: PlaceStatus  (Read 3935 times)

Offline xember

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
PlaceStatus
« 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]

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: PlaceStatus
« Reply #1 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

Offline xember

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: PlaceStatus
« Reply #2 on: November 28, 2015, 08:04:24 AM »
Yep thats clear..... but how to call the type in this case?

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: PlaceStatus
« Reply #3 on: November 29, 2015, 09:57:55 AM »
As said, build a map. There is no tostring function

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: PlaceStatus
« Reply #4 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

Offline daniel_san

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 1
Re: PlaceStatus
« Reply #5 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.
           

Offline xember

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: PlaceStatus
« Reply #6 on: December 04, 2015, 09:30:33 PM »
Clear! Thanks pitty that there is no enum :-(