Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Routing decision based on EWT or PIQ

    Posted 5 hours ago

    Dear Experts!

    I am facing a challenge. I would like to make routing decision based on certain attributes of a queue. If the Estimated Wait Time for example is above a certain threshold of a concrete queue, I would like to re-route that call to another one BEFORE hitting this queue, so in the Inbound flow. Can I read the EWT and PIQ values of a queue in the inbound flow?


    #ArchitectandDesign
    #Routing(ACD/IVR)

    ------------------------------
    Sandor Balogh
    -
    ------------------------------


  • 2.  RE: Routing decision based on EWT or PIQ
    Best Answer

    Posted 2 hours ago

    Hi Sandor,

    From my understanding, yes, you can make a routing decision based on a queue's Estimated Wait Time (EWT) before transferring the call.

    One option is to use the built-in Architect GetQueueEstimatedWaitTime() function. For example:

    State.EWT = GetQueueEstimatedWaitTime(FindQueue("Queue Name"), "call")

    You can then use a Decision action such as:

    If(IsSet(State.EWT), State.EWT > MakeDuration(0, 0, 5, 0), true)

    Alternatively, if you already use Data Actions, you can call the Estimated Wait Time API:

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

    This can also be useful if you need to retrieve the EWT for specific labels within a queue.

    For PIQ (People in Queue), I don't believe there is an equivalent native function available in an Inbound Call Flow. If approximating the number of waiting interactions meets your requirement, you could explore using the Analytics API via a Data Action:

    POST /api/v2/analytics/conversations/activity/query

    You can retrieve the oWaiting metric for the target queue and use that value in your routing logic. While this isn't the same as the caller's actual position in queue, it may be sufficient depending on your use case.

    Hope this helps.



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



  • 3.  RE: Routing decision based on EWT or PIQ

    Posted 2 hours ago

    Appreciate your quick answer, it sounds right. Thank you!



    ------------------------------
    Sandor Balogh
    -
    ------------------------------