Notify manager about employee leaving company

swapnil15
Tera Contributor

Hello everyone,

I wanted to share with you a process I've implemented in ServiceNow. When HR sends an email to SNOW containing details about an employee who is leaving the company, I have set up an inbound to extract the employee's name from the email and save it in a field (leaver_name) on the RITM. Also, the inbound triggers the creation of a RITM and assigns it to the relevant group automatically.

 

What I need:

Once the group resolves the RITM, I want a notification to be sent to the employee's manager. The employee's name is stored in a field on the RITM, and their manager can be found in the sys_user table in the employee's record.

I need help with figuring out how to send a notification to the manager (manager of the employee who is leaving the company) once the RITM is resolved. Can anyone assist me with script and steps?

Thank you.

 

PS: I am getting the name of the user from mail body in string format on RITM table.

Below is what I think:
1. Get the name of the leaver user from the RITM field (leaver_name).

2. Glide over sys_user, add query as name is same as the user from leaver_name.

3. Once I get the record of user, push the managers name into a variable.

 

------> Unsure about how to proceed ahead.

 

 

2 REPLIES 2

SanjivMeher
Kilo Patron
Kilo Patron

You should be able to create a notification record and depending on which field you are storing, i hope it is a reference field, you can send setup the notification to the manager. Do you see any issue with that?


Please mark this response as correct or helpful if it assisted you with your question.

Hi Sanjiv,

I am new to notifications.

I am not sure how to compare the parsed user value on RITM table with the value from sys_user table and find the manager of that user.

 

I can create a notification on ritm table but how to choose the manager from user table for the parsed user?