Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

How to Get Count of All Online/LoggedIn Users?

  • 1.  How to Get Count of All Online/LoggedIn Users?

    Posted 20 days ago

    How to Get Count of All Online/LoggedIn Users
    Then filter them OnQueue, Busy etc.
    Need to view/download.

    Right now it's visible only at queue level. Any Guidance/advise will be helpful.

    Thanks & Regards,

    Ajay Kumar


    #Implementation

    ------------------------------
    AJAY KUMAR
    XXX
    ------------------------------


  • 2.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 20 days ago

    You could view this information through the Analytics Agent tab and apply filters.



    ------------------------------
    Victor Soares
    Gerente técnico
    ------------------------------



  • 3.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 20 days ago

    After that Can we download the list using export?

    Can you please double check and confirm?



    ------------------------------
    AJAY KUMAR
    XXX
    ------------------------------



  • 4.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 20 days ago
    Edited by Phaneendra Avatapalli 20 days ago

    Hi Ajay,

    Other than queue-level views, the main option I'm aware of is using the Analytics API endpoint:

    POST /api/v2/analytics/agents/status/query

    You can retrieve agent presence/routing statuses (On Queue, Busy, Available, Offline etc.) and then filter/export as needed. From memory the response is paginated/default limited, so you may need to loop through results for larger environments.

    I also found this community guide which walks through using the API and explains the routing/presence values pretty well:

    Analytics Agent Status API – Routing Status and Presence Examples

    Hope this helps.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 5.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 20 days ago

    Hello @Phaneendra Avatapalli

    Do you have any working sample code?

    Thanks in Advance.

    Regards,

    Ajay Kumar



    ------------------------------
    AJAY KUMAR
    XXX
    ------------------------------



  • 6.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 20 days ago

    Unfortunately I don't have any working sample code for this, but the link shared above explains the API usage and payload structure pretty well and should cover exactly what's needed for retrieving/filtering agent statuses.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 7.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 20 days ago
    In my view, @Victor Soares's or @Phaneendra Avatapalli's options would be the best ones. There is another alternative that could work if your goal is to quickly check the environment and immediately see how many agents are logged in, etc., but it would need to be carefully evaluated.
     
    Depending on the environment size and how consistently users follow the process, one option would be to create a "dummy" queue (with no interactions routed to it), add all agents to that queue, and use it as a single place to quickly track users' logon/status.


    ------------------------------
    Elisson Fernandes
    ------------------------------



  • 8.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 20 days ago

    That's actually a clever workaround @Elisson Fernandes , especially for environments where the requirement is more around quick operational visibility rather than reporting/exporting.

    A shared "monitoring" queue with no interactions routed to it could provide a single place to view agent statuses/logon state using the native queue views and dashboards. A custom dashboard/widget on top of that queue could probably give a pretty good real-time overview as well.

    But it would depend heavily on agents consistently following the On Queue/Off Queue process to keep the data accurate.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 9.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 16 days ago

    As per my understanding it can work as workaround but not good for large organizational level. Just an example not easy to add Queue on top of 500 queues.
    It can be workaround for Starting Levels.



    ------------------------------
    AJAY KUMAR
    XXX
    ------------------------------



  • 10.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 20 days ago

    Agree! This one works very well and makes it easy for a supervisor to monitor their agents if they have many different queues. 



    ------------------------------
    Arthur Pereira Reinoldes
    ------------------------------



  • 11.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 18 days ago
    Edited by Kaio Oliveira 18 days ago

    I do this for several customers.
    It's the simple way.



    ------------------------------
    Kaio Oliveira
    GCP - GCQM - GCS - GCA - GCD - GCO - GPE & GPR - GCWM

    PS.: I apologize if there are any mistakes in my English; my primary language is Portuguese-Br.
    ------------------------------



  • 12.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 17 days ago

    @Kaio Oliveira, Thank you for sharing your real-world experience and insights as well.

    Interesting to hear that approach is working successfully across multiple customer environments.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 13.  RE: How to Get Count of All Online/LoggedIn Users?
    Best Answer

    Posted 17 days ago
    Edited by Jason Kleitz 17 days ago

    Hi AJAY KUMAR,

    If you need an org-level view, one option is to use the Users Search API and expand `routingStatus` and `primaryPresence`, then calculate/export the counts outside Genesys Cloud.

    Example:

    POST /api/v2/users/search

    {
      "enforcePermissions": true,
      "pageSize": 100,
      "pageNumber": 1,
      "sortOrder": "ASC",
      "sortBy": "name",
      "expand": [
        "routingStatus",
        "primaryPresence"
      ],
      "query": [
        {
          "type": "EXACT",
          "fields": [
            "state"
          ],
          "values": [
            "active"
          ]
        }
      ]
    }

    Then you can paginate through all users and group the result by:

    - primaryPresence.systemPresence for Available, Busy, Away, Offline, etc.
    - routingStatus.status for Off Queue, Idle, Interacting, Communicating, Not Responding, etc.

    For example, if the user is not "Offline: , you could consider that user as online/logged in, depending on your business definition. For On Queue / Busy / Interacting, I would use the routing status instead of only the presence.

    So, for a downloadable/global report, I would probably build a small script or scheduled job using the API and export the grouped data to CSV.

    Hope this helps.
    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------



  • 14.  RE: How to Get Count of All Online/LoggedIn Users?

    Posted 16 days ago

    Thanks for Providing the Best Answer 👍



    ------------------------------
    AJAY KUMAR
    XXX
    ------------------------------