How to send the reminder notification survey to the users who have not taken the survey.

Gagandeep2
Mega Contributor

How to send the reminder notification survey to the users who have not taken the survey?

 

@asifnoor 

1 ACCEPTED SOLUTION

asifnoor
Kilo Patron

Hi,

Go to your assessment table and filter them like this

find_real_file.png

 

Then create a event on your assessment table

Write a scheduled job which triggers daily and query the assessment table with the above encoded query.

And trigger the event.

Create a notification which listen to this event and select the recipient as assigned_to

Mark the comment as correct/helpful if it helps to solve the problem.

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Gagandeep 

Steps below

  1. Create a new Event (Event > Registry) on Assessment Instance table
  2. Create a new Email > Notification for the assessment instance table) and associate the above event
  3. Ensure your notification has

    • Send to event Creator true
    • Event parm1 contains recipient as true
  4. Create schedule job which runs daily and checks the records and sends notification to the user

Script:

sendNotification();

function sendNotification(){

try{
var gr = new GlideRecord('asmt_assessment_instance');
gr.addEncodedQuery('stateINready,wip^userISNOTEMPTY');
gr.query();
while (gr.next()) {
	gs.eventQueue('event_name', gr, gr.user, '');
}
}
catch(ex){
gs.info(ex);
}

}

find_real_file.png

find_real_file.png

Regards
Ankur

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

@Gagandeep 

Did you mistakenly mark other response as correct?

As I see same approach was provided before from my end pretty well first.

You can only mark 1 response as correct.

Please mark appropriate response as correct.

Regards
Ankur

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

Hi Ankur, - I know it has been a couple of years since this post but where does the script go?.. Is it part of the event?  Thanks Rachel

asifnoor
Kilo Patron

Hi,

Go to your assessment table and filter them like this

find_real_file.png

 

Then create a event on your assessment table

Write a scheduled job which triggers daily and query the assessment table with the above encoded query.

And trigger the event.

Create a notification which listen to this event and select the recipient as assigned_to

Mark the comment as correct/helpful if it helps to solve the problem.