How can I set up a Survey reminder?

Allison3
Kilo Guru

I'm needing to setup a reminder email for users when the survey expires the next day. I have read through the community and setup what I think I need but it's still not working.

 

I have a Event setup called task.send_survey_reminder

find_real_file.png

 

I then have an email notification setup to send when the event is fired. I have surveys that are set to expire tomorrow but the email is not going out. I checked the event log and I don't see it. What am I missing?

find_real_file.png

 

1 ACCEPTED SOLUTION

You need to query for any surveys that have not yet been completed. To do that, use GlideRecord. Something like this: 

 

var survey = new GlideRecord('asmt_assessment_instance');
survey.addEncodedQuery('state=ready^due_dateONTomorrow@javascript:gs.beginningOfTomorrow()@javascript:gs.endOfTomorrow()^userISNOTEMPTY');
survey.setLimit(1); //limiting the query to just one record
survey.query();

while (survey.next()) {
	gs.eventQueue('task.send_survey_reminder', survey);
}

View solution in original post

16 REPLIES 16

Replace the encoded query with this: 

state=ready^due_dateRELATIVELE@dayofweek@ahead@2^userISNOTEMPTY

 

The easiest way to determine this query string is to build the right filter in a list view, right-click the breadcrumbs at the top, and select Copy query. (Ignore the actual text of the breadcrumb in this screenshot... it's just meant to demonstrate how to right-click and select Copy Query.)

 

find_real_file.png

Community Alums
Not applicable

Tim - I have a slightly different requirement and might need your expertise. Could you please help with my question here?

Jeff316
Kilo Guru

Hi Allison,

 

Maybe this will help.

I also send a reminder to the survey taker but I do it 50% before the due date.

I trigger the event called "assessment.reminder" from the oob workflow.

Then my email notification picks up that event.

 You can configure the workflow to fire a day before the due date if you like. 

 

find_real_file.png

 

find_real_file.png

One more thing....

If you create a custom event name, you have to register the event. If you use the oob event name just check to make sure it is registered already.

How do I register the event? It shows under System Policy>Events>Registry section. I don't see anything that specifically says to register it.

find_real_file.png