Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Get online agent count

    Posted 11 days ago

    Hi, I have a requirement where I need to send calls to a queue only when there are agents on queue and available to take ACD calls. They must be on queue and their routing status can be either Idle, Interacting or Communicating. I want to know which API I can use to fulfil my requirement.

    Thx,

    Vidhu


    #PlatformAPI

    ------------------------------
    Vidhu Narayanan
    x
    ------------------------------


  • 2.  RE: Get online agent count

    Posted 11 days ago

    Greetings Vidhu - We do something similar in our org. Try this API, which essentially allows you to get a count of each activated queue member's presence status:

    POST /api/v2/analytics/queues/observations/query HTTP/1.1

    Host: api.mypurecloud.com

    Authorization: Bearer *******************

    Content-Type: application/json

    {"metrics":["oUserPresences"],"detailMetrics":[null],"filter":{"predicates":[null]}}



    ------------------------------
    Brian T. Jones | Ascension | Senior Specialist - Technology
    ------------------------------



  • 3.  RE: Get online agent count

    Posted 11 days ago
      |   view attached

    I'm using this API. /api/v2/routing/queues/${input.QueueId}/users?presence=$esc.url('On Queue')&skills=${input.skills}. Rename the txt file to .json and import the data action



    ------------------------------
    Eystein Kylland
    Systemutvikler Genesys Applikasjonsspesialist
    ------------------------------



  • 4.  RE: Get online agent count

    Posted 11 days ago
    Edited by Christoph Domaschke 11 days ago

    Hi Vidhu,

    I would suggest

     /api/v2/routing/queues/${input.queueId}/members?presence=ON%20queue&joined=true

    in case your agents can be logged out from a queue. Without "&joined=true" the Api only checks if the agent that is member of this queue is "on queue" but not, if he is online in that specific queue.


    Best regards
    Christoph



    ------------------------------
    Christoph Domaschke
    Produktmanager Kunden-Dialog-Center
    ------------------------------



  • 5.  RE: Get online agent count

    Posted 10 days ago

    Let me try to explain the business case in a better way. 

    There are 4 agents in the queue.

    The call must go to the queue ONLY if at least one of the agents is on queue and is in one of the routing statuses "IDLE", "INTERACTING", "COMMUNICATING".

    If the above criteria does not satisfy, send the call to an external mobile number without waiting in the queue.

    Similarly, if the call alerts an agent and if the agent does not answer the call for whatever reason, send the call immediately to the external mobile number (if no other agent is available to receive the call)

    @Eystein Kylland @Brian Jones @Christoph Domaschke I have tried my best to explain the scenario and what the business ask is. The data action that I'm using isn't working as expected. It considers "NOT RESPONDING" status to be on queue and retains the call instead of sending the call to the external number. 

    I think I have confused you all enough :)



    ------------------------------
    Vidhu Narayanan
    x
    ------------------------------



  • 6.  RE: Get online agent count

    Posted 10 days ago

    Hi Vidhu,

    please have a closer look on https://developer.genesys.cloud/routing/routing/#get-api-v2-routing-queues--queueId--members . The API I mentioned is able to check the routing status.

    Best regards
    Christoph



    ------------------------------
    Christoph Domaschke
    Produktmanager Kunden-Dialog-Center
    ------------------------------