In email script detect when user click on a button in notification

romainruffie
Kilo Explorer

Hello,

We have created a notification with two buttons,

Have you an idea to how dectect when a user click on a button ?

We tried to:

use javascript function "onclick()" but without success..
create two email script for each button but, the script are trigged on notification load.. and we want to call script when user click on,

Have you any idea ?

In attachment, our notification,

(The client don't want to use mail to !)

 Waiting your answers,

Romain.

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Romain,

the email they will receive probably in their outlook and why you want to determine which button they have clicked

what is the requirement here?

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hello Ankur,

 

We want to update incident using GlideRecord(), if user click on "Accept Solution" it will close incident, if he click on "Rejet Solution" it will reopen incident.

 

The need is to execute GlideRecord() in our email script, when user click on a button, that's all,

 

Thanks,

Romain.

johnfeist
Mega Sage
Mega Sage

If you look at how to structure the templates for simply opening the accept or reject, they are fairly straight forward html.  In most cases, you shouldn't need to do anything else once they click on a link.  That opens the reply in their email client which tells them to send it.

Since you can never be sure that they are using the email client you use for testing, doing anything other than letting them send gets tricky. 

I agree with Ankur in questioning what else you are looking for.

What I have done in certain situations where the user is told to enter information, e.g. why are you rejecting, is tell the user community that if you reply reject and don't give a reason, you will de facto have accepted. (The moral of the story being idiot proofing is a wonderful ideal that is impossible to fully implement and too expensive to bother with)

Hope that helps.

:{)

 

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Omkar Mone
Mega Sage

Hi 

For such kind of requirements i guess would be fulfilled by Inbound Email Actions.

 

Just check Update Incident Inbound email action for your reference which might help you.

 

Regards,

Omkar Mone.

www.dxsherpa.com