- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 12:46 PM
Hi All,
To preface: I am very new to Service Now development and flow designer, so I am learning as I go. I apologize in advance if I use confusing or the wrong terminology.
I've been tasked with creating a flow for waivers for our organization. These waivers last a pre-set amount of time (ex: 1 month, 3 month, 6 month), at which point the ticket for the waiver is supposed to be closed. This had been a manual process that our organization is trying to automate.
What I've done is created a simple flow that is basically, "if 1 month waiver, wait 1 month and update record" updating the state from active to closed. However, I've stumbled across some documentation that indicates that wait for a duration flow logic "you can enter a wait value of up to 999 hours".
However, when creating my flow I've been able to enter values greater than 999.
The terminology makes it sound like I shouldn't have been able to enter a value over 999. It's also possible that I'm misinterpretting and it actually means that any value over 999 won't work.
Do you guys know what kind of behaviour this might have? And could a potential workaround be to use several 900 hour waits sequentially?
Thanks for any and all help you can provide and I look forward to learning more about Service Now and Flow Designer. 🙂
Thanks,
Mark
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 01:57 PM - edited 02-19-2025 01:58 PM
Of course I agree, lets wait if somebody more experienced with flows gives you a better solution 👌
Regarding flow variables:
1. Define a variable via 'More action menu' (three dots in the top right corner) > Flow variables
2. Select type Integer so the variable value is a number
3. In the flow, use Flow logic > Set Flow Variables step
4. Define initial value
5. Add 'Do the following until' step and set until condition
6. Add 'Set Flow Variables' step, set value for variable and use function to increment by one
7. Then do rest of your logic (sending e-mail or trigger an event for notification)
Flow should look like this:
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 01:23 PM
Hello,
according to documentation the maximum suggested value is really 999 hours. However it is possible enter higher value, save and also activate a flow. I haven't tried it yet so I don't know how it will behave.
Official documentation: Wait for a duration flow logic
You can try a workaround:
- Create Flow logic 'Do the following until'
- Create Flow variable (type Integer, value 0)
- Inside Flow logic create two steps:
- 'Wait for duration' and set it to 24 hours
- Increment Flow variable by one
- In the until condition select flow variable and set number of days you want to wait.
By this way you can meet requirement not to exceed 999 hours and have a flow running for a long period.
I am not sure about performance impact having many flows running for this kind of period.
Maybe look at Scheduled jobs if this functionality meets your requirements? But it requires scripting skills.
If my answer helped you, please mark it as correct and helpful, thank you 👍
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 01:41 PM
Hi Martin,
Thanks for the quick response. I'm going to hold off marking the solution correct for now as I'm hoping some other folks may be able to weigh in. However, you've given me a good suggestion with the flow variables that I will look into, as it's outside of my current scope of knowledge.
At a quick glance, I was able to create a flow variable, but it is not allowing me to drag the data pill into the flow, but it's most likely user error on my part. I'd like to understand it a bit better before adding it into prod.
Thanks again for the feedback; I'll dig into the flow variables and see if it can be utilized in my flow. I will come back and mark as the solution pending feedback from other creators.
Thanks,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 01:57 PM - edited 02-19-2025 01:58 PM
Of course I agree, lets wait if somebody more experienced with flows gives you a better solution 👌
Regarding flow variables:
1. Define a variable via 'More action menu' (three dots in the top right corner) > Flow variables
2. Select type Integer so the variable value is a number
3. In the flow, use Flow logic > Set Flow Variables step
4. Define initial value
5. Add 'Do the following until' step and set until condition
6. Add 'Set Flow Variables' step, set value for variable and use function to increment by one
7. Then do rest of your logic (sending e-mail or trigger an event for notification)
Flow should look like this:
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 09:03 AM
Martin,
I appreciate you taking the time for this. Your first commment was already helpful, but I think this is kind of what I was looking for before I had created the timers.
I am going to look more into the flow variables and how you set it up and will adopt it as a more permanent the solution if I can get it working.
Thanks again for your input and have a great day 🙂