Legacy Dev Forum Posts

 View Only

Sign Up

Get OnQueue users via api/v2/analytics/queues/observations/query

  • 1.  Get OnQueue users via api/v2/analytics/queues/observations/query

    Posted 06-05-2025 18:28

    Alastair_Pitt | 2023-10-18 14:06:25 UTC | #1

    Hi,

    I am trying to get the number of Users "On Queue" so that I can build an alert around this if there is nobody on Queue

    I am using the API -api/v2/analytics/queues/observations/query with the following body below

    But when I use the query, rather than getting the On Queue users, I get the "Interacting"

    Since this queue takes voice and email, there may be a number of interactions ongoing even when experts are Off Queue

    When I use the oOnQueueUsers metric, rather than getting the 4 agents currently online, it comes back with

    metric: oOnQueueUsers qualifier : Interacting status count : 9

    How do I pull the "On Queue" users ? Is there a different qualifier I need to use?

    { "filter": { "type": "or", "predicates": [ { "type": "dimension", "dimension": "queueId", "operator": "matches", "value": "**********" } ] }, "metrics": [ "oOnQueueUsers" ] }


    Jerome.Saint-Marc | 2023-10-18 11:46:03 UTC | #2

    Hello,

    I think you are confusing presence status and routing status.

    The oOnQueueUsers will give you the numbers of agents whose presence status is set to "On Queue". Agents who are in Queue can have zero conversation in progress (presence status == On Queue and routing status == IDLE), or can have conversations in progress (presence status == On Queue and routing status == INTERACTING).

    Your response (count 9) just means that you have 9 agents logged in and with presence On Queue. But all of them are currently working on a conversation (qualifier: INTERACTING).

    Regards,


    Alastair_Pitt | 2023-10-18 12:59:36 UTC | #3

    Jerome.Saint-Marc, post:2, topic:22605
    t means that you have 9 agents logged in and with presence On Queue. But all of them are currently working on a conversation (qualifier: INTERACTING).

    Thank you @Jerome.Saint-Marc for your reply. yes, I might well be confusing things If you look at the queue in Genesys, I need on the ones that are On Queue as far as their login status, not their routing status. When testing, I had no users On-Queue but because some were still Interacting offline ( because they are email interactions ) The count was 9. If this was a Voice Queue, there would obviously be nobody Interacting Thanks


    Jerome.Saint-Marc | 2023-10-18 13:16:05 UTC | #4

    Note that you can also leverage the GET /v2/routing/queues/{{queueid}}/members endpoint See this other post

    Regards,


    Alastair_Pitt | 2023-10-18 17:11:26 UTC | #5

    Thanks @Jerome.Saint-Marc I also saw this same person having the same issue In this thread

    The way I got around it was by using the following metric

    "metrics": [ "oUserPresences"

    Then I looked for the "oUserPresences" presence and Qualifier that matched the On Queue numbers and triggered off that.


    system | 2023-11-17 17:11:53 UTC | #6

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


    This post was migrated from the old Developer Forum.

    ref: 22605