How do I use conditional logic to automate survey responses?
Researchers may wish to create conditional logic that will enable survey invitations to go out at set times (weekly) or during specific days
of the year, for example, birthday's or the day before a clinic visit. This article will go over the basics of using automated invitations.
Although it's not a requirement, in the vast majority of cases, user will want to enable "Use Longitudinal data collection with defined events".
The next step would be to define events. In out example we would like to set up weekly surveys. Therefore we need to establish
weekly events. To do this, select "Define My Events"
Then take some time to think about the event flow of your project. Define the events that will shape your project. Not every event will need
to have automated survey logic in it, but if you wish to schedule an automated survey based on an events, you'll need that event to be present.
After completing your event set-up. Select, "Designate Instruments for My Events"
Designate Instruments so that they can be associated with the correct events. This will allow us to write automated invitation logic that is assoicated with the Data Collection Instrument and the Event. Next Return
to project Set-Up and choose "Online Designer"
We'll start by setting up our automated weekly survey. Go to online designer, and on the line that is associated with weekly survey,
select 'Automated Invitations'
We'll start by setting up our automated weekly survey. Go to online designer, and on the line that is associated with weekly survey,
select 'Automated Invitations.' You will then be able to define how you would like the automated survey to go out. You have two basic options
when setting up an Automated Survey.
Option 1: Send after a set lapse of time
A setting mirroring the one below will send invitations 7 days after the Demographic Baseline form is marked complete.
Option 2: Send based on the difference between two dates
Option 2 is a more powerful option in that it uses a Data Difference Function to schedule outgoing invitations. The advantage of this
is that invitations are schedule based on a formula and can be different for each respondent based on a date value in the survey.
For example the syntax below is: datediff([Start_date], "today", 'd', true) = "7". This is will do the following. When the different between the
date in the 'start date' variable and 'today' (the calendar date) is 7, then send the invitation. In step 3, you can layer additional invitation
conditions on top of the date difference trigger.
Another common example of using the date difference formula would be sending a birthday message to respondents. You might use:
Datediff([birthday], "today", 'd', true) = "0" . This would send a message to respondent on there birthday (if it was filled out in the birthday variable).
Date Difference formulas can be used in conjunction with additional logic, such as: datediff([birthday], "today", 'd', true) = "0" and [send_birthday_message] = '1'
This would only send invitations to people who have opted in to receiving them (assuming 1 = "yes).







