Send Notification based on a variable answer?

Gemma4
Mega Sage

Hi Everyone, 
I created a notification to send if a catalog item variable is Yes - see attached details. The good news is that the notification sends when the variable "Additional Information =Yes" However, the bad news is that the notification is constantly sending when any update is made since the variable is always yes. Any suggestions how I can trigger this notification to only send one time when Additional Information changes to Yes? I verified changes to is not an option to select after the variable is selected. 

thanks in advance for any feedback you have.

 

 

9 REPLIES 9

Vishal Birajdar
Giga Sage

Hi @Gemma4 ,

 

Can you check if there is option in condition like additional information changes.

 

So you can combine two condition with AND.

 

i.e., "your first condition" AND "additional information changes"

 

This will ensure that while updating the record it will check if additional information is Yes and if its changed then only trigger the notification.

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

Thank @Vishal Birajdar 

Attached is a copy of the conditions for the email. Unfortunately there is not an option for "changes" I tried to change insert and updated and in all scenarios the notification is still sent. I also tried to add an event for it to trigger but didn't have any luck-not much experience in that area. 

Hi @Gemma4 

 

If possible then send the notification through workflow.

This might work.

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

Hemanth M1
Giga Sage
Giga Sage

Hi @Gemma4 ,

 

Triger email trough script using BR

1)Create event , change the notification trigger to event and select the event created

2)Create a on before BR - runs only on update

2)in the BR script , check if previous value is empty and current value is not empty, send the email.

if (!previous.variables.variablename) { //check previous value is empty

        if (current.variables.variablename)
            gs.eventQueue('eventname', current, gs.getUserName()); //replace gs.getUserName() with the user you want to send email

    }

 

let me if any questions.

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025