Sending Notification under to a specific user under certain conditions

alabbas
Tera Contributor

Hi Community,

 

I have a requirement where a manager would like to be BCc'd into every email that goes to their team from the system.

 

The notifications are generic ie. Send an email to the assigned to when they have been assigned a request. The manager only wants to see their teams notifications.

 

How would I be able to set an additional criteria that the manager gets BCc'd into the emails when their team is the team selected without effecting the original notification criteria.

 

I have tried using email scripts but I can't seem to set conditions on when to send rather it sends regardless of the team assigned. I have also tried putting an if statement in the advanced view of the notification, but not working.

 

Any help is appreciated!

1 ACCEPTED SOLUTION

@alabbas 

since gbs is reference field, you should compare display value

current.gbs.getDisplayValue() == 'DPS'

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

20 REPLIES 20

MortenPettersen
Tera Contributor

Have you considered using "Assignment Rules [sysrule_assignment]? This functionality can be used to handle the actual assignment automatically and it can run a script when triggered. Your script could then do something else, like triggering a more resuable Subflow that you have setup and then this can be expanded upon with additional teams if desired.

If you are not using this already to handle the assignment you could still take advantage of it I believe, just take a closer look at Assignement Rules "little brother", which is the Trigger Rules. These rules can trigger when an assignment group changes and also run a script. The main idea is that the rules will start some type of On-Call workflow, but you can do custom stuff using the script option.

Ankur Bawiskar
Tera Patron
Tera Patron

@alabbas 

share some screenshots and script you created

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

BrianProvencher
Giga Guru

@alabbas your notification could look something like this:

 

BrianProvencher_0-1746027594206.png

 

I don't want to change the original conditions (send notification to assigned to) - I want a additional condition that says if its for team 'x' then also bcc that manager.

@alabbas I'm not an expert on scripting by any means, so to solve this problem, I would probably set up a separate notification with the applicable filters.