How to add action that will check if user is inactive for 60 days?

jeffreygard1127
Tera Contributor

Hi everyone!

 

Good day!

 

It's my 1st time to create a flow design from scratch and I need help cause I can't execute the logic. 
I need to create a flow that will trigger the deactivation tasks for (2) department. Each dept has their own deactivation tasks and we already have the subflow for it. But these subflow will only be triggered after checking in the sys_user table that users are already inactive for 60 days.
REQ.png

I know how to do the trigger, but I don't know how to do the ACTION part, can someone please help me?
Terminate Flow.png

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

@jeffreygard1127 

add this in the filter condition and it checks if user has not logged in last 60 days

You can use Last login field on User table

 

AnkurBawiskar_0-1737992566475.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar, thank you so much for responding. I'm a bit confused though.
1. Why is your filter says Active is true?
2. Where is the part where it will wait for 60 days just to check again if users are still inactive?

 

Also, I changed my initial trigger from ACTIVE is FALSE to ACTIVE CHANGES TO FALSE because this flow should only run once the system detected that a user becomes INACTIVE, what do you think of this new trigger?

Terminate Flow 2.png

@jeffreygard1127 

simply do this

1) Active changes to False

2) Then use Wait for Duration and give 60*24 = 1440 hours

3) then use again if the User is Active=false (IF Logic)

4) based on outcome of that IF take the next steps

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@jeffreygard1127 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader