Creating a timed loop in flow designer

Fabriciofla
Tera Contributor

Hello,

I'm working on a flow, and inside that flow I'm trying to make a subflow that closes records if there's no contestation from caller in 3 days.

To better explain: Incident is answered and then the support team changes the state to "Resolved". The caller has two options: either the solution worked for him and he closes the incident/request (state "Closed") or he reopens the record (state changes back to "Work in Progress").

What I'm trying to do is, if the caller doesn't respond back in 3 days, the "Resolved" record automatically changes to "Closed". This is fine to do once with do until + flow variable, however, I can't think of a loop to reset the timer when multiple changes to the state happen. That is, the caller reopens once, the team changes the state to resolved again, caller reopens one more time, and so on.

Any insights??

4 REPLIES 4

Jugmaz
Kilo Sage

You can always do the wait there after which it check the state. But for it to "restart", that is probably quite challenging.

but i strongly suggest on using Scheduled Job for the 3 days wait  - then update the record so that Flow is nudged as well (and do whatever there is still to do!?) - probably you can put the Flow to wait for Closed state...

With a scheduled job I'd need a script, though. I'm trying to do all through the flow designer, if possible of course.

Fabriciofla
Tera Contributor

I think I got it. Have to do some testing first.

Here's what I got:

find_real_file.png

1) I set a boolean variable to false.

2) Do until variable is true.

3) Inside the loop, I wait the state to be resolved. No time out, it will wait until it's resolved.

4) After it's resolved, the flow waits until it's back in Work in Progress (that is, the caller contested the solution and changed the state back to WIP). Except this Wait for condition has a time out of 72 hours enabled.

5) If the previous condition was completed due to time out (I didn't know this was possible, changed everything to me), set the variable to true. Else, if the previous wait condition was completed before the time out, set the variable to false. This else if is probably redundant, have to test it further.

What do you guys think?

please, let us know how it went!?