Estimated Wait Time

Estimated Wait Time is the estimated length of time that an interaction will wait in the queue until it is accepted by an agent. The calculation is based on how long the interaction has been waiting in the queue and the average time to answer for the last 15 minutes. The average is rolling for the last 15 minutes and is weighted towards the present. After the wait time is calculated, the value is rounded up to the minute. For example, if the calculation returns 25 seconds, the Estimated Wait Time is one minute. You can retrieve an interaction’s Estimated Wait Time using the Realtime Stats flow notation and play the value back to the customer.

The value returned by Estimated Wait Time is the current expected wait time. For example, your flow asks for the Estimated Wait Time shortly after putting the interaction on a queue and you get a value of 10 minutes. If you then ask for the value again after 4 minutes, you will likely get a response back saying the updated Estimated Wait Time is 6 minutes. It is possible that due to updated information that is made available over the last 4 minutes that the new Estimated Wait Time has increased or decreased. For example, it could return 5 minutes or 8 minutes as well.

Please note, before making a query for Estimated Wait Time or Position in Queue an interaction must first be added to the queue. We recommend waiting a few seconds after putting an interaction on a queue before querying for Estimated Waiting Time or Position in Queue to ensure the data is available in reporting. If you get a null response back for the Estimated Waiting Time or Position in Queue, you may need to wait another second for the data to become available. Currently, you cannot query the wait time for a queue without putting the interaction on a queue.

For more information on retrieving the Estimated Wait Time and related statistics using the REST API, see Realtime Statistics in the REST API documentation.

Flow Design Instructions

Use the Realtime Stats flow notation to retrieve the estimated-wait-time statistic and assign it to a response variable. You can create a reusable flow that includes Realtime Stats and then a Play Media notation to play a text-to-speech file with your estimated wait time response. Invoke that flow in your interaction flow with Queue With Flow.

  As a best practice, you should wait approximately five seconds for your call to be in queue before retrieving related statistics to maximize accuracy and ensure a timely response. This can be easily accomplished by playing a media file prior to retrieving the statistic.

Here is an example of a reusable flow to that retrieves the estimated wait time for a caller: 

Image of the reusable flow design to retrieve estimated wait time

Create a new reusable flow. Design the flow using this table as a guide. In this example, none of the parameters will be used as a variable so the Variable toggle can remain disabled in each notation.

Step Details Notation
Step 1 Drag and drop an Entry event onto the Flow Designer canvas. Image of the Entry flow event
Step 2

Next to the Entry event, add a Play Media notation.

  • Loop: Leave disabled.
  • Media: Select a media file to play to callers who have just been added to a queue. For example, a media file from your tenant or a text-to-speech message welcoming to the queue.
  • Participant: Customer

This Play Media is a suggested best practice to ensure that the interaction has been in queue long enough to calculate an estimated wait time . Retrieving the statistic too quickly after enqueuement may result in a delayed response while flow is requesting data.

Image of the Play Media flow notation
Step 3

Next to Play Media, add a Realtime Stats notation.

  • Type: Interaction
  • Stats: "estimated-wait-time"
     This is an expression field. If you're entering a statistic name, such as estimated-wait-time, it must be surrounded by quotations.
  • Interaction ID: interaction/interaction-id (default value)
  • Response: Enter a binding variable for the response data. This is a free entry text box, and the value entered here is what will be used to retrieve the statistic's value in the next step. For example, ewt.
Image of the Realtime Stats flow notation.
Step 4

Next to Realtime Stats, add another Play Media notation.

  • Loop: Leave disabled.
  • Media: Text to Speech
    • Text: Enter the string that you want read to the customer, including your Reatime Stat response variable as well as the {time} indicator that translates the statistics to a minute speech value. For example: Your estimated wait is currently {{ewt.time}}.
    • Language: Select the language and region for the voice message being played.
    • Voice: Select from man, woman, or alice.
       See Creating Text-to-Speech Media Files for more information on the language and voice options.
Image of the Play Media flow notation
Step 5 Add an Exit event Image of the Exit flow event.
Step 6 Publish your flow. Image of the Publish button in Flow Designer

Create or edit your customer flow for inbound calls. For the queuing action, use the Queue With Flow notation and select your reusable flow that retrieves estimated wait time.

This is only an example of a possible flow design. You may choose to design your flow differently. For example, your reusable flow may loop to provide periodic updates to callers in queue. Each time Realtime Stats sends the request, the value provided is the current value.