Genesys Engage on-premises

 View Only

Discussion Thread View
  • 1.  Confusion Obtaining a Dynamic Statistic via Genesys PSDK

    Posted 05-06-2020 17:44

    I have a C# Solution i've been building to gather data using the PSDK for Genesys. I've recently done work to attempt to expand to be able to obtain StatisticMetricEx type information. The documentation for this has not been very helpful in understanding exactly what is required for the actual supplied values.

    For example, when requesting a category of 'TotalNumberInTimeRange' for a mask of 'CallDistributed', i haven't been able to understand what value(s) are valid for 'Interval', and generally always get an error.


    ObjectType="GroupAgents"
    Category="TotalNumberInTimeRange"
    MainMask="CallDistributed"
    Subject="DNAction"
    IntervalType="GrowingWindow"
    IntervalLength="0"

    Notification:
    Mode="Immediate"
    Frequency="10"
    Insensitivity="0"


    An example error:

    {CATEGORY [int] = 8 [TotalNumberInTimeRange]

    can't process DataSupport class cause exception: [IndexOutOfRangeException] Index was outside the bounds of the array.
    at: at Genesyslab.Platform.Reporting.Protocols.StatServer.ActionsMask.IsBitSet(Int32 bit)
    at Genesyslab.Platform.Reporting.Protocols.StatServer.ActionsMask.ToString(Int32 indent)
    at Genesyslab.Platform.Reporting.Protocols.Internal.ActionsMaskCodec.AppendLogValue(StringBuilder buf, Object customTypeObject, Int32 indent, Boolean truncate, Boolean hide)
    at Genesyslab.Platform.Commons.Protocols.Internal.ToStringHelper.AppendLogValue(StringBuilder buffer, IDataSupport data, Int32 indent, Boolean hide, Boolean truncate, AttributesLogHiddenList hiddenAttributes)
    }

    I've gotten several other errors as i've tried different things. I apologize if i have not given enough detail, i'm happy to answer questions and provide anything else needed that i haven't included. I just keep running into walls trying to successfully request MetricEx type information via the PSDK due to having issues finding clear and complete documentation.


    #Unsure/Other

    ------------------------------
    Josh
    ------------------------------


  • 2.  RE: Confusion Obtaining a Dynamic Statistic via Genesys PSDK

    GENESYS
    Posted 05-07-2020 10:12
    Hi Josh,

    Welcome to the black art of Genesys Engage statistics ;)

    As you've probably discovered, the PSDK describes the API properties for a stat definition, but doesn't go into details about the values for those properties.  There are essentially two reasons for this: 1) the values are documented in the Stat Server User's Guide, and 2) the values can vary based on the stat definition you are building.

    So, the first thing I'd suggest is to get familiar with the Stat Server User's Guide (https://docs.genesys.com/Documentation/RTME/8.5.1/User/Welcome) as it is the source of truth on how to conure up a statistic definition.  However, the Stat Server User's Guide was written to describe how to define a statistic in Genesys Administrator, so you'll have to make some mental programming translations to make this fit the PSDK objects.

    I don't have a specific code example for you in C#, but I have a sample of the JSON payload for the GWS-based Stat API, that uses the PSDK under the covers.  You can adapt this to your needs:

    {
    "statisticId":"CallAnswered",
    "definition":{
    "notificationMode":"Immediate",
    "subject":"DNAction",
    "intervalType": "GrowingWindow",
    "dynamicTimeProfile": "00:00+18:00",
    "category":"TotalNumber",
    "mainMask":"CallAnswered"
    },
    "objectId":"<agent_group_name>",
    "objectType":"GroupAgents"
    }

    I imagine you're getting hung up on the dynamicTimeProfile item above for your growing window.  In the Stat Server User's Guide you can find a detailed discussion on how time profiles are specified for Growing interval types here: https://docs.genesys.com/Documentation/RTME/latest/User/TimeProfiles

    Let us know if you get it working or have any further problems.

    ------------------------------
    Jim Crespino
    Senior Director, Developer Evangelism
    Genesys
    https://developer.genesys.com
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources