Snap WebHost can send email invitations to a list of participants in your survey. It can also send an email to a specific email address if a particular answer is selected. This is known as an ’email alert’.
You can use alerts to:
- notify specific people or departments depending on survey results.
- send a specific email depending on various conditions (for example, the age of the participant or where they live).
- include data from the survey in the email.
- send the email to an address that was given as a response.
For example, if someone expresses an interest in buying a new car, you could send an email to a salesperson, or if someone is not satisfied with the food, you could send an email to the chef.
The emails are sent when the questionnaire is submitted.
This worksheet uses the snCrocodile survey supplied with Snap. It describes how to send an email to the cleaners when people are not satisfied with the cleanliness of the restaurant.
The emails are set up using the Alerts option in the Questionnaire Properties. For each email that you choose to send you can set up:
- The address that you are sending it to
- The text of the email (which can include the participant’s previous answers to questions)
- The conditions under which the email is sent. (Conditions are set using “if” statements, in the same way that you use them in routing and filtering.)
You can send emails in plain text or in HTML format. HTML emails allow you to set the text to be bold, italic or underlined. You can also insert HTML codes directly into your email.
Summary of steps
This worksheet tells you how to:
- Step 1: Use the status bar to look up variable names and codes
- Step 2: Set up a simple email alert
- Step 3: Add and delete alerts.
Step 1: Use the status bar to look up variable names and codes
This example describes how to send an email alert if if someone has rated the cleanliness as Very Poor. This means you need to find out what to put as the condition.
- In the Questionnaire window, Click the Very Poor heading on the rating question.
Look at the information in the status bar. This tells you that the Very Poor column is code 1.
- Click the Cleanliness question and get the question number from the status bar (Q6.b).
Step 2: Setting up a simple email alert
- Click to open the Questionnaire Properties dialog.
- Select Alerts in the left hand panel to display the Alerts section.
- Click New.
- Enter the condition on which the email is sent. In the snCrocodile survey, this email will be sent if they have rated the standard of cleanliness (Q6.b) as Very Poor (code 1), so enter Q6.b=1.
- Enter the address of the person that you wish the email to be sent to in the Address field.
- Enter the subject of the email in the top line (by default this will be Alert1).
- Check the html box so you can format the text in your email.
- Enter the text of the email in the large box. In this case, you can enter the date and time that the problem occurred, since the questionnaire asks for the date and time of the visit. The date of the visit is variable Q1.a and the time is variable Q1.b.
Type “The cleaning was rated Very Poor on ” in the large pane.
- Select the words “Very Poor” and right-click, then select Bold from the menu.
- Click the [Insert] button and select Variable Field…. The New variable field dialog opens.
- Select Q1.a from the Variable drop-down list.
- Click [OK].
- Type ” at ” and insert the Q1.b variable field in the same way.
- Complete the email and click [OK].
Step 3: Adding and deleting alerts
This describes adding an alert to send an email to the respondent. They must have supplied their email address in Q12.
- Click New.
- Set the Condition to Q12 OK. This tests if they have entered an email address in Q12.
- Put your cursor in the Address field and click [Insert]. Select Variable Field and then the email address variable.
- Select the alert from the list and…
- …Click Delete.
This worksheet has described how to set up email alerts with conditions. It explained how to create an email alert, set a condition and insert the text from variables in your email. It also explained how to create a simple condition.
Conditions are also used in creating derived variables and filters. If you would like to learn more about conditions, see If condition syntax examples (conditions that can be applied to any type of question) and a wider selection of examples for multi-choice questions. There are also some examples of conditions on all question types and an explanation of all the ways to test or group items in a condition.
Reference material is available about Snap expressions.
If there is a topic you would like a worksheet on, email to email@example.com