Trigger E-mail notification when survey is dissatisfied or very dissatisfied by user

geet
Tera Guru

Hello everyone,

Kindly help me   in knowing how to trigger an E-mail notification to a manager/group when user dissatisfy the survey.

Kindly explain step by step by step as i am not familiar with the notification part much.

1 ACCEPTED SOLUTION

survey_form.PNG


This is our Survey form and when user submits this form the incident form get updated as follows :


example.PNG



So, now i want when user dissatisfy or very dissatisfy the survey, an email should be sent to the Grroup/Assignee/manager.



Kindly let me know if you got answer of your question.


View solution in original post

15 REPLIES 15

Thijs Daemen
Mega Guru

Hi Shikha,



You could create a notification on the survey instance table (fuji: asmt_assessment_instance). I think you would need to script the condition to only run on a dissatisfied user response. this scripted condition would work together with any other condition you set in the condition builder.



In order to create the scripted condition you could create something like this:



var gr = new GlideRecord('asmt_metric_result');


gr.addQuery('instance', current.sys_id);


gr.addQuery('metric.question','<add info to match survey question>')


gr.query();


if(gr.next()){


      if(gr.string_value == '<add value for dissatisfied>'){


                  return true;


      } else {


                  return false;


      }


}


return false; //catchall



you could also adjust the query to add the dissatisfied value directly in the query search. This would return a record if found, and not return any records if not found.


It might not be the most efficient way to do this, but it should work regardless.



Of course you could also trigger this from a business rule(with an event) in which you create your condition/business logic.


Hi Thijs,



Today i worked upon it and i followed the following steps:


  1. Firstly i created a Template (Email Template) as follows :

Email_temp.PNG


2. Then i created a notification as follows :



Email_temp1.PNG


Email_temp2.PNG


Email_temp3.PNG


Kindly guide me where i am lacking.


Hi Shikha,



Do you write survey responses / comments to incidents, because i see you configured the notification on the incident table. The survey instances are configured on a different table, the asmt_assessment_instance table. The actual responses are configured on the asmt_metric_result table.


survey_form.PNG


This is our Survey form and when user submits this form the incident form get updated as follows :


example.PNG



So, now i want when user dissatisfy or very dissatisfy the survey, an email should be sent to the Grroup/Assignee/manager.



Kindly let me know if you got answer of your question.