Genesys Cloud - Main

 View Only

Sign Up

  • 1.  In Queue Position before call enter the queue

    Posted 22 hours ago

    Hi
    I have a question regrading Position In Queue for inbound voice interaction.

    Business team would like to present PIQ message just before the call will be transferred to ACD Queue. The root cause is to inform the caller about a possible huge number of calls already waiting in a queue before queuing the call. In that scenario there is a chance the caller will disconnect and contact later by Chat/Email before the call enter the queue (for e.g. during message the call will be recorded). Abandon shouldn't be counted, as it happens currently quite often if the caller hears there is more than for e.g. 10 other calls after the call hits the queue.

    So, standard Call.PositionInQueue expression is available only from In-Queue flow - It's not possible to use it under Inbound Call Flow

    Public API offers    /api/v2/routing/queues/{queueId}/estimatedwaittime    to use with DataAction from Inbound Call Flow but it returns EWT - not possible to get PIQ

    Any idea how to get PIQ from Inbound Call Flow?

    Regards


    #API/Integrations
    #Routing(ACD/IVR)

    ------------------------------
    Mariusz Ziemiecki

    ------------------------------


  • 2.  RE: In Queue Position before call enter the queue
    Best Answer

    Posted 16 hours ago

    Hello,

    The POST endpoint api/v2/analytics/queues/observations/query allows you to query real-time queue observation metrics in Genesys Cloud.

    This is particularly useful for retrieving live data, such as the current number of interactions waiting in a queue.

    Example Request Body

    JSON
    {
      "metrics": [
        "oWaiting"
      ],
      "filter": {
        "type": "and",
        "clauses": [
          {
            "type": "or",
            "predicates": [
              {
                "dimension": "queueId",
                "value": "{queueID}"
              }
            ]
          }
        ]
      }
    }

    You can make it more precise by also filtering on media type:

    JSON
    {
      "results": [
        {
          "group": {
            "queueId": "{queueId}",
            "mediaType": "voice"
          },
          "data": [
            {
              "metric": "oWaiting",
              "stats": {
                "count": 1
              }
            }
          ]
        }
      ]
    }

    Key Response Details

    The relevant data is typically found in this path:

    $.results[?(@.group.mediaType=='voice')].data[?(@.metric=='oWaiting')].stats.count

    • Metric: "oWaiting"
    • Common mediaType: "voice" (for phone calls; can also be "chat", "email", "callback", etc.)
    • Meaning of the value: The count represents the current number of interactions (e.g., calls) in the waiting state in the specified queue at the exact moment of the query.

    This value matches exactly what you see in the Genesys Cloud interface under:

    • Queues Activity dashboard → Waiting column
    • Performance Views → real-time queue statistics

    In other words, it shows how many people/calls are currently queued and waiting for an agent - before your own new interaction enters the queue.



    ------------------------------
    Alesson Santos
    Mid-Level Developer
    ------------------------------



  • 3.  RE: In Queue Position before call enter the queue

    Posted 13 hours ago

    Hi,

    Another option is also to retrieve queue performance metrics using the Analytics API. For example, the endpoint:

    POST /api/v2/analytics/conversations/aggregates/query

    can be used to obtain metrics such as wait times. This could allow you to calculate or retrieve the average wait time for a queue (or even across multiple queues) before routing the call.

    In some cases this may provide a clearer message to callers along with number of calls waiting, especially if the goal is simply to inform them about expected delays before entering the queue. The value could be retrieved via a Data Action in the Inbound Call Flow and then used to play an estimated wait time message.

    {
      "results": [
        {
          "group": {
            "queueId": "abc"
          },
          "data": [
            {
              "metric": "tWait",
              "stats": {
                "sum": 1200,
                "count": 20
              }
            }
          ]
        }
      ]
    }

    Avg wait time : 1200 / 20 = 60 seconds



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