Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Inbound IVR flow (not inqueue flow) check EWT and PIQ

    Posted 09-15-2025 16:33

    On our Inbound IVR flow (not inqueue flow) can we check EWT and PIQ of one particular queue and depending on outcome offer extra options to the customer.

    The flow is when customer calls we want the Inbound flow to check if QueueA has less then 2 minutes wait time and No one waiting in the queue.

    If the requirements meet we play a message saying we have a offer and ask customers to press 1 to get the offer and it goes to QueueA

    If conditions are not met, we give them another message with 5 different options.


    #Routing(ACD/IVR)

    ------------------------------
    Gita Jogia
    Voice Consultant – IT Services
    ------------------------------


  • 2.  RE: Inbound IVR flow (not inqueue flow) check EWT and PIQ
    Best Answer

    Posted 09-15-2025 22:01

    Hi Gita,

    You can absolutely achieve that, but not in the same way you can on inqueue call flows.

    For Inbound Call Flows you will not find those components on the flow itself, and instead will have to create Data Actions to find that information using Genesys Cloud's APIs.

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

    For EWT it should be pretty easy. Just use the following API:

    GET /api/v2/routing/queues/{queueId}/mediatypes/call/estimatedwaittime

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

    For PIQ it's a little harder, but you can use the Analytics Observation API:

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

    The query on the body should look something like that:

    {
      "filter": {
        "type": "and",
        "predicates": [
          {
            "type": "dimension",
            "dimension": "queueId",
            "operator": "matches",
            "value": "{your_queue_ID_goes_here}"
          }
        ]
      },
      "metrics": [
        "oWaiting"
      ],
      "detailMetrics": [
        "oWaiting"
      ]
    }

    The response for this will have a list of conversations that are on queue (This should be inside an array called "observations").

    As far as I remember, all conversations returned there will be ordered by oldest to new (This means index 0 should be your oldest call waiting on that queue, while your highest index should be your newest call).

    You should then compare the conversationId of your current call (the one you want to know the PIQ) to the array returned on the API.

    When you find the corresponding index, you should add +1, and that should be your position in queue.

    So let's say the API returns an array with 4 index on it (0,1,2,3), and your conversationId is currently the index 2... You should let the customer know that they are the third in queue (0..1..2)

    -----------

    Hope this helps!



    ------------------------------
    Marcello Jabur
    ------------------------------