Thanks, Anton, for the response. That's good suggestion to have callbacks offered after 5 mins of music on hold.
I will keep that as last resort.
I am exactly doing the same, capturing the Flow.StartDateTimeUtc in a variable and playing back, similarly with GetCurrentDateTimeUtc() function.
Flow Start time is accurate, however GetCurrentDateTime function is not accurate. Always giving 1 min few seconds more than flow start time, even though I am waiting for more than 5 mins.
You read my mind, did change duration as below directly to use duration MakeDuration(0,0,5,0).
Thanks & Regards,
Sharath Patil | Patelco Credit Union
Principal Contact Center Engineer
PH 925.460.4628 | CELL 408.306.3154
Original Message:
Sent: 2/27/2024 6:15:00 PM
From: Anton Vroon
Subject: RE: DateTimeDiff is not working as expected during inQueue flow
Hi Sharath,
The easy way to do this, is just do hold music for Duration 5 minutes, then offer the callback.
Eg

If you wanted to go down the path of doing the checks.
Your DateTimeDiff, certainly works, it doesn't reset on each inQueue flow loop that I have seen.
I would suggest you record each variable as you are setting them as participant data. And check what those values are at each step to figure out exactly where it is going wrong, especially right before the audio playback that you are doing.
One suggestion though, why set it to an integer of 5? And not just to a duration of 5 minutes

Just makes the logic a little easier on yourself.
------------------------------
Anton Vroon
------------------------------
Original Message:
Sent: 02-26-2024 14:29
From: Sharath Patil
Subject: DateTimeDiff is not working as expected during inQueue flow
Hi,
I am working on offering courtesy call back based on hard coded in queue wait time.
Looking to offer callback after member waits for 5 mins during in queue flow, in order to achieve this I am using below expression to capture current wait time.
DateTimeDiff(GetCurrentDateTimeUtc(), Flow.StartDateTimeUtc), using an update statement duration to capture the same.
When I am playing this value back, It always plays back 1 mins and few seconds, not sure what am I missing, please help.
My in queue logic:
- Play close to 6 mins of Music on Hold
- Using update statement to capture 5 mins under a variable Task.maxQueueTime == 5(integer)
- Update statement with two variables,
Variable 1 , Task.currentQueuedTime = DateTimeDiff(GetCurrentDateTimeUtc(), Flow.StartDateTimeUtc)
Variable 2, Task.maxQueuedTimeCalc = MakeDuration(0, 0, Task.maxQueueTime, 0)
4. Decision block Task.currentQueuedTime >= Task.maxQueuedTimeCalc
#ArchitectureandDesign
------------------------------
Sharath Patil
Patelco Credit Union
------------------------------