Need assistance with a notification condition

Casey23
Tera Guru

I am working on some changes to notifications and I have two notifications being sent out at the same time and I'm trying to adjust one of them without any luck. The first notification will be sent when an RITM is cancelled and will include additional comments. The second should only be sent if comments are added but the state doesn't change to closed cancelled.

The first is being sent whenever an RITM is cancelled:

find_real_file.png

The other is being sent when comments are added to the RITM:

find_real_file.png

I was hoping that I could add a condition that says something like "state does not change to closed cancelled" but that doesn't seem like an option.

find_real_file.png

Does anyone have any suggestions on how I can do this?

TIA

1 ACCEPTED SOLUTION

rambabuboyapati
Kilo Guru

If the target recipients are the same for both notifications, you can prevent duplicate notifications by adjusting the weight of the notification. 

 

See below for an example of notification weights and how they work.

Notifications - Email notification weight examples - ServiceNow User Group - UK - United Kingdom - B...

View solution in original post

7 REPLIES 7

rambabuboyapati
Kilo Guru

If the target recipients are the same for both notifications, you can prevent duplicate notifications by adjusting the weight of the notification. 

 

See below for an example of notification weights and how they work.

Notifications - Email notification weight examples - ServiceNow User Group - UK - United Kingdom - B...

This seems like it would be the best option to implement a fix, but it doesn't seem to be working as expected.

I set both notifications to notify "Request.Requested for" and "Watch list". I set the cancellation notification to a weight of 15 (because this one should be sent instead of the other notification if a ticket is cancelled) and left the other one at a weight of 10. Both notifications use the table sc_req_item but I couldn't find the target field anywhere. Maybe it's dot walked from somewhere else? In either sense, the target should be the same since both notifications are being triggered by the same RITM.

When I tested after changing to the new values, I still get both notifications in the email log and both are set to a type of "send-ready". I validated that I'm not seeing anything in the skipped mailbox either.

It turns out the reason it wasn't working is because there was actually a line in the HTML of one of the notifications where there was a hard-coded "CC" email address. So while the recipients field was matching on both, technically the recipients list when sent was different and therefor ignored the weights.