PureEngage On-Premises

 View Only

Sign Up

  • 1.  How do I get the NotReady ReasonCode for an Agent using StatServer SDK

    Posted 08-23-2016 23:38
    I have a requirement to display the NotReady ReasonCode.  But, I cannot find any code examples (preferably C#, but can translate) that show how to do this.  There are code samples for retreiving the CurrentAgentState, but all you get is "NotReadyForNextCall".  I need the 'why'.  I've tried to dig into CCPulse to find this information, but even using the AgentPerformanceView -> CurrentState -> ReasonCode: doesn't display the actual reason string.  I have ActionCodes added in CME.  I've logged into the Genesys Support Phone and submitted the ReasonCode.
    From the Test Phone
    2016-08-23@16:07:05.982->[14] TAgentNotReady(,9938039,0,DATA,NULL)
    Reasons:
    (Str) REASON LUNCH
    2016-08-23@16:07:06.32
    Event:EventAgentNotReady
    Server:65201
    ReferenceID:14
    AgentID:Z999283
    ThisDN:9938039
    Reasons:
    (Str) REASON LUNCH
    Extensions:
    (Str) AgentSessionID B6055VE9O90UPD9PO3POK1KAD400043S
    Seconds:1471993624
    USeconds:658000
    Server Time:2016-08-23@16:07:04.658

    My questions is, how do I build a StatisticSubject, StatisticObject, StatisticMetricEx, and StatisticCategory to get the ReasonCode.
    Note: this is a monitoring application looking at multiple agents.

    TIA


  • 2.  RE: How do I get the NotReady ReasonCode for an Agent using StatServer SDK

    Posted 11-28-2016 13:30
    Use this statistic for reasons + time output

    [CurrentStateReasons]
    Category=CurrentStateReasons
    MainMask=*
    Objects=Agent
    ReasonStartOverridesStatusStart=yes
    Subject=DNAction


  • 3.  RE: How do I get the NotReady ReasonCode for an Agent using StatServer SDK

    Posted 12-07-2016 22:22
    Thanks Hayley.  I'm confused on where to set "ReasonStartOverridesStatusStart=yes" in the StatServer SDK.  Based on your input, I have this code:
     
    StatisticObject statisticObject = StatisticObject.Create();
                    statisticObject.ObjectId = "AgentID";
                    statisticObject.ObjectType = StatisticObjectType.Agent;
                    statisticObject.TenantName = "Resources";
    
                    DnActionsMask mainMask = new DnActionsMask();
                    mainMask.SetAll();
    
                    DnActionsMask relMask = new DnActionsMask();
    
                    //  Create Statistic Metric
                    StatisticMetricEx statisticMetric = StatisticMetricEx.Create(
                        StatisticCategory.CurrentStateReasons,
                        mainMask,
                        relMask,
                        StatisticSubject.DNAction );
    
                    //  Create Get Statistic request
                    RequestGetStatisticEx request = RequestGetStatisticEx.Create();
                    request.StatisticObject = statisticObject;
                    request.StatisticMetricEx = statisticMetric;
    
                    //  Request asynchronously
                    statServerProtocol.Send( request );

    I didn't see any options for setting: "ReasonStartOverridesStatusStart=yes"

    Thanks for the reply and information