Advanced alerts

Created: - Updated:

This article covers these topics:

Introduction to reminders

Scheduling alerts, or reminders, is as easy as adding questions to your survey. Lumi Say has a user-friendly interface that you can use for this purpose (please refer to setting up alerts). Once you have filled in the required fields, the reminder script is automatically added to your <survey> element.

Reminders are scheduled as specified, once the survey is downloaded on the respondent's device. To schedule a reminder based on the respondent's behavior, you can modify the reminder script using date and time functions.

Examples

For a repeated or interval reminder:

<reminder end_date="15.08.2013" text="Remember to take the survey!" title="New reminder" start_date="15.08.2013">
  <interval to="20:00" frequency="172800" from="14:00"/>
</reminder>

For a single reminder:

<reminder end_date="15.08.2013" text="Remember to take the survey!" title="New reminder" start_date="15.08.2013">
  <singular date="15.08.2013 14:00"/>
</reminder>

You can display the current date and time of the reminder within the reminder text:

<reminder text="Hello, the time is $mstostring(currentms(),'HH:mm')!">

  <interval from="09:00" to="21:00" frequency="3600"/>

</reminder>

To show a reminder only if the last entry made was not today, you can compare the date of the last entry with the date for the scheduled reminder:

<reminder start_date="01.01.2012" end_date="25.01.2012" title="Reminder" text="This is a repeating reminder!">

  <interval from="19:00" to="19:01" frequency="86400" if="datecompare(lastentryms(),reminderms())!=0"/>

</reminder>

A user can set a custom reminder to fill in a diary at any time during the day. The reminder is set from the survey, and can also be modified every time an entry is made.

in survey element:

<reminder start_date="01.01.2012" end_date="25.01.2012" title="Reminder" text="This is to remind you to fill in the diary as you requested!">

  <interval to="global(ReTime)" frequency="86400" from="global(ReTime)" if="datecompare(lastentryms(),reminderms())!=0"/>

</reminder>

 

initialize the global variable in an earlier stage:

<precondition then="setglobal(ReminderTime,0)"/>

 

Q(ReminderSet):

<question type="datetime" mode="time" id="2" text="What time would you like to be reminded to fill in this diary tomorrow?" alias="Q2">

  <postcondition then="setglobal(ReTime,$answer(ReminderSet))"/>

</question>

A respondent needs to fill in a follow up survey within fifteen minutes from having taken the survey:

in survey element:

<reminder end_date="31.01.2015" text="Reminder 15 minutes later" title="Reminder 15" start_date="12.01.2015">

<singular date="global(reminderTime15)"/>

</reminder>

In Question Q1:
<question type="info" id="1" text="Welcome!" alias="Q1">
    <precondition then="setvar(curTimePlus15,addminutes(currentts(),15))"/>
    <precondition then="setglobal(reminderTime15,curTimePlus15)"/>
</question>