How to identify Contractors and send email to their respective reporting managers

NiSaraswat
Tera Contributor

Hi,

 

I need some ideas for below scenario:

 

We need to identify contractors accounts going to expire in next 3 months and automatically send email to their reporting managers if they want to extend their account, also log a ticket side by side for the same. Please suggest.
e,g see below example:

Real life example:

Contractor Joe Doe reporting to Mark will expire on 1 Feb 2025

Ideally, the flow would send an email to Mark on 1 Jan 2025 (one month ahead the Contractor expiring).

Contractor 1

Joe Doe

1 Feb 2025

Contractor 2

Jane Doe

5 Feb 2025

Contractor 3

Jack Doe

1 March 2025

 

So, the process would send a single email to Mark including the contractors reporting to them, in this case, Joe and Jane on Jan 1st and another email including Jack on Feb 1st.

Mark will respond to the email and update the ticket saying if the accounts should be kept active or disabled.

Process needs to follow up with the manager if they don’t respond.

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @NiSaraswat 

 

The use case is well-defined, and the solution largely depends on how you store the user data.

Key Questions:

  • Do you have a flag in the user table indicating whether a user is a contractor?
  • Are you storing the contract expiration date for each contractor?

If both are available, here's how you can approach the solution:


Solution Steps:

  1. Use Flow Designer:

    • Trigger: Set the flow to trigger daily.
    • Action 1: Use the "Look Up Records" action to fetch all contractors whose contracts expire in the next 3 months.
    • Action 2: Send an email notification to the contractors' managers. Add logic to retrieve all users who report to the same manager.
  2. Handle Replies:

    • Create an Inbound Action (can also use Flow Designer for this).
    • Based on email replies, define the next steps to be taken automatically.

Recommendation:

Break the entire requirement into smaller, manageable parts and implement them step-by-step. This approach will help ensure that the solution is robust and easy to maintain.

 

@AshishKM input here.

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Thanks @Dr Atul G- LNG , as you already cover the framework for this use case.

@NiSaraswat , Write some code and share if its not working for you. 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution