It's not a media-specific calculation. The warning about routing decisions is because the variable will never report an increase in value, if that happens (for instance if higher priority interactions come in), it will keep the now-incorrect value. If you want the true value, use a data action to look it up.
------------------------------
Melissa Bailey
Genesys - Employees
------------------------------
Original Message:
Sent: 03-17-2023 15:37
From: Peter Stoltenberg
Subject: EWT Based On Condition
Melissa,
I recall reading that this value (Call.EstimatedWaitTime) should never be used for routing decisions (I believe it says so on the help center). Is that value being calculated with this endpoint? GET /api/v2/routing/queues/{queueId}/estimatedwaittime?conversationId={conversationId}, or is being calcuated with the GET /api/v2/routing/queues/{queueId}/mediatypes/{mediaType}/estimatedwaittime endpoint?
------------------------------
Peter Stoltenberg
TTEC Digital, LLC fka Avtex Solutions, LLC
Original Message:
Sent: 03-17-2023 10:43
From: Melissa Bailey
Subject: EWT Based On Condition
The Call.EstimatedWaitTime variable is updated when the Play EWT action is used, or when the inqueue flow reiterates the inqueue task. Both cases are subject to certain caching behavior. Since you have your own loop inside the task, it's not reiterating the inqueue task to get an updated value.
First question, do you really need a loop? Remember the inqueue task is itself a giant loop. If you don't then the default looping behavior will update the value for you. If you do, add a Play EWT action but set the estimated wait time expression to NOT_SET instead of Call.EstimatedWaitTime. It won't play anything out loud for a not set value but it will force an update to the Call.EstimatedWaitTime value.
------------------------------
Melissa Bailey
Genesys - Employees
Original Message:
Sent: 03-17-2023 01:50
From: Ebrahim Shamouli
Subject: EWT Based On Condition
Hi All,
We have a below requirement:
if EWT < 2min follow path 1
if EWT > 2min and EWT < 20min follow path 2
if EWT > 20min follow path 3 and after each loop check if EWT comes under 20min and if yes call should go to the relevant path.
I have achieved all the requirements by using switch and loop but I have an issue to achieve the EWT checking after first loop.
Problem:
When EWT > 20min calls go to the right path and after finishing the first loop even if EWT has decreased the call still go back to the same path!

Workaround:
if I add play EWT action before Switch action the IVR working as expected and after a first loop call goes to the right path but this is not a requirement and we shouldn't play EWT if EWT < 20min.
Any thoughts on this issue please?
#ArchitectureandDesign
#Implementation
------------------------------
Ebrahim Shamouli
Byte Information Technology
------------------------------