Allow email notifications in some cases but not others

Cat
Tera Guru

I have created a specific notification for when an incident is placed on hold. This notification works as expected. However the comment left on incident notification (triggered by the incident.commented event) keeps firing at the same time. 

 

I changed the weight on the notifications so that the comment left on incident notification doesn't send. However, I want it to send if the agent adds a customer visible note to an incident while it's on hold. Because I changed the weight, it now doesn't send in any case.

 

Is there a way for me to resolve this?

6 REPLIES 6

Mark Manders
Giga Patron

The weight shouldn't have impact if you are just triggering the incident.commented event. I think it has to do with the conditions on your notification. Can you share those?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Hi Mark, thanks for the help.

 

Here's the one that I want to send when the conditions are met:

Cat_1-1778067002557.png

And this one is the one that I don't want to send at the same time. So previously, when the ticket was put on hold and a comment added, the above one was sending, but so was the one below.

 

Cat_0-1778066933242.png

 

I don't want it to send the notification when the on hold email is sent, but if it is on hold and then the agent for whatever reason adds a customer visible note, I *do* want it to send

Naveen20
ServiceNow Employee
Likely cause: your "On Hold" notification condition is probably "State is On Hold" rather than "State changes to On Hold," so it fires on every update while the incident sits on hold — and the higher weight keeps suppressing the comment notification permanently.

Fix:
1. On the "On Hold" notification, change the condition to "State changes to On Hold" so it only fires on the transition itself.
2. Leave the higher weight in place — it will only beat the comment notification during that one transition save.

Result: comment + state-to-on-hold in the same update - only the on-hold notification fires. Later comments on an already-on-hold incident - the comment notification fires normally.

If you want belt-and-suspenders, reset both Weights to 0 and add an advanced condition on the comment notification instead:

answer = !current.state.changesTo 3; // 3 = On Hold — verify in your instance

I think that's what I already have. Images of the notifications are above.