" /> How to get not ready reason code from stat server - Genesys CTI User Forum

Author Topic: How to get not ready reason code from stat server  (Read 2337 times)

Offline LearnerGuy

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
How to get not ready reason code from stat server
« on: April 13, 2017, 08:19:07 PM »
Advertisement
Hello, everybody, this is my very first post in this Forum,

I have been reading a lot of the topics in this forum but unfortunately, I have not found the best solution for my doubt,
I need to get the selected not ready reason code, I can see it when the app sends the request in the EventAgentNotReady,
but I'm not sure how to get it from stat-server which I think so is where it is stored,

Could somebody help me to figure out how can I complete this task?
My app is coded in C# so I'd like an example for this specific language.

Currently, we get only the user status, for instance, NotReadyForNextCall.

Attributes I add in my statistic object:

[b]Object:[/b] Agent
[b]Category :[/b] CurrentStateReasons or CurrentState
[b]Subject: [/b]AgentStatus or DNAction

I also have a class which is called AgentStatus with some variables that will store the retrieved values, so I'm not also sure if I have to add some extra variables in order to get the other information provided when CurrentStateReasons is set.

class agentStatus
    {
        public string agentId;
        public dnStatus[] dns;
        public string loginId;
        public string placeId;
        public string status;
        public long tmStart;
    }

Please let me know any doubt you may have.

Regards.
« Last Edit: April 13, 2017, 08:27:29 PM by LearnerGuy »

Offline n3vek7

  • Full Member
  • ***
  • Posts: 137
  • Karma: 3
    • ITKB
Re: How to get not ready reason code from stat server
« Reply #1 on: April 17, 2017, 03:01:52 PM »
Hello,

You'll need to apply a filter on that stat.
Search for KB 24933 (How to configure filters for Reason Codes in Stat Server?) on Genesys support.

How to setup filter depends on how TEvent are sent by TServer/Ixn Server.

In response to ;
"Currently, we get only the user status, for instance, NotReadyForNextCall."
You should also have AttributeReason or AttributeExtensions attached to the status.

Offline LearnerGuy

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: How to get not ready reason code from stat server
« Reply #2 on: April 19, 2017, 04:08:31 PM »
Hello,

I already created the option in stat-server tab, but I'm not sure if that's all I need to do, below are the options I set for that;

[b]Category[/b]- CurrentStateReasons
[b]Subject[/b]-  DNAction
[b]Object[/b]-    Agent
[b]MainMask[/b]- * ~LoggedOut, ~NotMonitored    // If I need to monitor the status, is it correct to set loggedout instead
                                                                                      NotReadyForNextCall?

In c# code, should I add some extra variables to store the reason code received from stat-server?
I think so this is what is missing in my code but I'm not sure how should I name the variables.

Another question I have, Does somebody know what the CurrentStateReasons category or metric returns?


Regards.

« Last Edit: April 19, 2017, 04:13:05 PM by LearnerGuy »

Offline kny

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
Re: How to get not ready reason code from stat server
« Reply #3 on: April 21, 2017, 09:49:32 AM »
Hi,
Actually I use this c# code below to get the CurrentStateReason for Agent :

string statusandreason = ((DnActions)((AgentReasons)info.StateValue).Status).ToString();


Hope it can help you