Yes, I only set the start time once. I was trying to do a proof of concept with the duration, so they were test applications. I did look at the execution history and it did show the call had been through both flows and the duration of the calls did not match what came out. That said, I added to my real flows and now it is appearing to be close to the actual duration of the calls. This question can be closed. Not sure why the test apps wouldn't show the correct duration, but I can see it working in the other flows.
Original Message:
Sent: 09-11-2025 22:54
From: Marcello Jabur
Subject: GetCurrentDateTimeUtc() doesn't seem to be working correctly
Hi Cindy,
I personally use GetCurrentDateTimeUtc a lot, and have never seen any issues with it. But with only your description it's hard to tell what could be wrong.
You only set that participant data once? Just at the very end of the last flow? I ask that just to make sure you are also not updating it at another point, and this could be the value we see there.
Also, just to make sure I understand, you mention that you update that value before going to an agent. But the call on this example lasted less than 2 minutes. Did that call include an agent? Or are those 2 minutes all in the flows?
I think it could be easier to find the problem if you could explain the whole call flow with a little more details (How many flows are you going through? What exactly happens in the end of the last flow before/after you update those participant data? Do you update those Participant Data in any other flows? etc.)
Another thing that you could try is taking a look at the Execution History (https://help.mypurecloud.com/articles/historical-execution-data-overview/) for that conversation.
This way you can make sure your conversation actually went through those updates and at which exact time (after only 4 seconds or after 1~2 minutes).
------------------------------
Marcello Jabur
Original Message:
Sent: 09-11-2025 11:01
From: Cindy Kepes
Subject: GetCurrentDateTimeUtc() doesn't seem to be working correctly
Hi!
I am trying to get call duration before I go to an agent. I am chaining between flows. I do the Flow.StartTimeUtc at the beginning of my first flow and Put it in participant data, this is always correct. At the end of my last flow I do a GetCurrentDateTimeUtc() into a variable. When I put this in another participant data - even though I've been on a call for over a minute always has the end time as around 4 seconds.
I also do the following to get the duration
ToDuration(DateTimeDiff(ToDateTime(GetCurrentDateTimeUtc()), ToDateTime(Flow.StartTimeString)))
No matter what the time in the call, the duration is always around 4 seconds.
I am attaching two screenshots. One of the interaction start and end time and one with the participant data.
Any ideas? It would be greatly appreciated. I would have thought this would be simple to do.
Thanks,
#Architect
------------------------------
Cindy Kepes
Customer Interaction Technology
------------------------------