Legacy Dev Forum Posts

 View Only

Sign Up

How to retrieve analytics data of the Agent Status via API

  • 1.  How to retrieve analytics data of the Agent Status via API

    Posted 06-05-2025 18:08

    Wang_Jiajun | 2022-03-02 01:42:33 UTC | #1

    Hi Genesys engineers

    I am working on retrieving the analytics data from Agent Status report by using the API [/api/v2/analytics/users/aggregates/query] referring to the below reference . https://developer.genesys.cloud/api/rest/v2/presence/understanding_presence#routing-statuses

    But I could not find any reference on how to retrieve the following 3 columns' data from Agent Status report.

    1. Off Queue%
    2. On Queue%
    3. Ocuupancy

    Is it possible to get these 3 columns' data via API directly? Or need to aggregated from other analytics data? Could you please guide me on how to get these data??

    Regards


    Wang_Jiajun | 2022-03-01 05:14:03 UTC | #2

    Additionally, I am trying to retrieve the data of Off Queue] from Agent Status report by using the following statement. metric= 'tAgentRoutingStatus', qualifier= 'OFF_QUEUE' ![image|690x398

    But can not get right value. Can anyone help on it?


    Wang_Jiajun | 2022-03-02 01:41:08 UTC | #3

    I am trying to retrieve the [off queue] data by using the following clause, but just got none value. metric= 'tAgentRoutingStatus', qualifier= 'OFF_QUEUE'

    Any one can answer this question?

    BTW, I can retrieve the right value with below clause. Get no idea what's the difference. metric= 'tAgentRoutingStatus', qualifier= 'IDLE' metric= 'tAgentRoutingStatus', qualifier= 'INTERACTING' metric= 'tAgentRoutingStatus', qualifier= 'COMMUNICATING' metric= 'tAgentRoutingStatus', qualifier= 'NOT_RESPONDING'


    Wang_Jiajun | 2022-03-02 06:29:05 UTC | #4

    Additionally, I checked genesys source codes in git about this. What's the meaning of Indicates the Routing State of the agent. A value of OFFQUEUE will be returned if the specified user does not exist.] If only this users exists that we could get the status offqueue, how can we tell which user's status? Or it means not agent, but users? ![image|690x257

    https://raw.githubusercontent.com/MyPureCloud/platform-client-sdk-python/master/build/PureCloudPlatformClientV2/models/routing_status.py


    jacobshaw | 2022-03-03 21:53:16 UTC | #5

    Hi Wang_Jiajun,

    The OFF_QUEUE routing status corresponds to any tSystemPresence entry returned from the query that is not equal to ON_QUEUE. So any presence other than ON_QUEUE will mean that the user is Off Queue.


    Wang_Jiajun | 2022-03-04 00:18:47 UTC | #6

    I need to know the status of tSystemPresence. Could you please give the reference link about the tSystemPresence including status?

    Thanks


    jacobshaw | 2022-03-04 13:54:06 UTC | #7

    After consulting with another engineer, you should be getting back the OFF_QUEUE routing status if the user was in fact Off Queue. Make sure that the user your performing the query for was actually Off Queue in the time interval of your query, and if you're sure that the data is missing, please take this up with Care, since this involves customer-specific data which we cannot handle here.


    system | 2022-04-04 13:54:25 UTC | #8

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 13739