Legacy Dev Forum Posts

 View Only

Sign Up

How to prioritize the queue when initiating a call through Genesys API

  • 1.  How to prioritize the queue when initiating a call through Genesys API

    Posted 06-05-2025 18:06

    Akshay_Golash | 2021-05-21 22:28:43 UTC | #1

    Hi Team,

    We have a use case where we initiate a call to a user on behalf of an agent using 'PostConversationsCallsAsync' from conversation API provided by the purecloud SDK. If there are multiple queues assigned to an agent and we would like to call agent on a particular queue based on the priority of the queue, how can we decide that in our .net service? Can we configure priority of a queue when we create and assign it to an agent?

    Thanks in advance!


    tim.smith | 2021-05-24 18:18:15 UTC | #2

    Akshay_Golash, post:1, topic:11004
    initiate a call to a user on behalf of an agent

    First, please be aware that dialing on behalf of a user is not possible in Genesys Cloud. To initiate a call, an access token obtained from user-based authorization is required; you cannot have a server-side app using client credentials that initiates calls. To have a backend service do this, you must implement either the auth code or SAML2 bearer grant. You can find details on these auth flows here: https://developer.genesys.cloud/api/rest/authorization/.

    You can request new features and share your use case at http://genesyscloud.ideas.aha.io/. This isn't the first time I've seen this requested, so you'll likely be able to find an idea to add your vote and use case to.

    Akshay_Golash, post:1, topic:11004
    we would like to call agent on a particular queue

    I think you mean to call on behalf of a queue. If so, when using POST /api/v2/conversations/calls to place a call, specify the queue id in the property callFromQueueId. If you mean to actually call an agent on a queue, you can't do that exactly. You can place a call to an agent or to a queue, but not to an agent in a queue. If you need to route to a specific agent in a queue, you'll need to dial into an architect flow so it can transfer the call to queue and target a specific agent.


    Akshay_Golash | 2021-05-24 18:38:59 UTC | #3

    Hey Tim, Thanks for getting back!

    1. Yes you are right we do have a accessToken of an agent, so we grab that accessToken and initiate a call on behalf of an agent, and then they can talk to our customer through genesys UI.
    2. So my use-case is, if the agent has two queue's assigned to them (Example. A and B). Now I have the access token for the agent so I can make a call using this endpoint POST /api/v2/conversations/calls although at the same time I want to associate a queue with the call being initiated. So like you said I would pass in a valid value for callFromQueueId my question is how do we chose the correct queue (Based on priority) between A and B.

    tim.smith | 2021-05-24 19:30:35 UTC | #4

    Akshay_Golash, post:3, topic:11004
    how do we chose the correct queue (Based on priority) between A and B.

    What you're asking isn't a concept that exists within Genesys Cloud. A conversation can have a priority that is used to compare against other conversations in the same queue, but a queue itself does not have a priority. Coming up with a method to prioritize one queue over another is something you'll have to determine using your own prioritization logic. If there is something in the queue's config data you could use for prioritization, you can get the user's queues via GET /api/v2/users/{userId}/queues. For example, you could hardcode a list of queue name to priority mappings in your app and match the queue names from the API response to your priority list.


    Akshay_Golash | 2021-05-24 20:00:26 UTC | #5

    Got it, thanks for the information!


    system | 2021-06-24 20:00:27 UTC | #6

    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: 11004