Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

primary and scoendary email ID

tushar_ghadage
Tera Contributor

Hi All, 

here I have a requirement where 

I have a group with 3 members where they have a Mastercard email id 

but now client needs to have infy email id for those same group members so that they can receive the notification when their assignment group is populated on the ritm .. 

 

can anyone tell me how to config this ?? it the first time I came across this type of req. 

 

(also, FYI those members are not on dev and only available on test )..

 

thanks 

1 ACCEPTED SOLUTION

@tushar_ghadage 

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

View solution in original post

25 REPLIES 25

@Dr Atul G- LNG, Tushar has mentioned in his post that the use case is only for the 3 members in the group of that particular org not for the whole org. So, for such a small requirement, why would you create a Custom field? Does that even make sense?
If it is just one off case and only for 3 users and 3 secondary emails, then simply add their secondary emails in the notifications.
I don't see any issue in that. That is why that extra email field is given in the notification.

 

Hi @VikMach 

Agree, but the question arises: in which email notification would you add these three email IDs? If the three users are neither the Caller, Requester, nor Assigned To, yet still receive emails because you added them to all notifications, this is my concern.

*************************************************************************************************************
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]

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

@Dr Atul G- LNG, "when their assignment group is populated in the RITM"... See his post. That means there is already one notification for that use case in the RITM table.

And even if there are more than one, (which I believe would be couple and not many), it is still ok to add in the Email field given in the Notifications rather than creating custom fields or creating duplicate profile(s). Which will confuse and complicate the system even more.

So, there are two solutions:

  1. Create a new email notification specific to this group and add the email addresses there.

  2. Create a new email field for capturing and using the additional addresses.

*************************************************************************************************************
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]

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

@tushar_ghadage, Another approach, if you want a dynamic solution...
You could create one unique "User Preference" like example below then create one email script to fetch and send the emails in preferred way, example Cc or Bcc. Using syntax "email.addAddress". See example below. In this way you don't need to mess with system setup.

 

VikMach_0-1756383825918.png

 

var grUser = new GlideRecord('sys_user_preference');
grUser.addQuery('user', gs.getUserID());
grUser.addQuery('name', 'secondary_email');
grUser.query();

if (grUser.next()) {
    var secondaryEmail = grUser.value.toString();
    email.addAddress("cc", secondaryEmail, grUser.user.getDisplayValue()); // Edit as per your preference
    email.addAddress("bcc", secondaryEmail, grUser.user.getDisplayValue()); // Edit as per your preference
    gs.info("Secondary Email: " + secondaryEmail);
    gs.info("Display Name : " + grUser.user.getDisplayValue());
} else {
    gs.info("No secondary email found."); // Edit as per your preference
}

 

Regards,
Vikas K