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).

You can:

  • 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.

Background

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

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.

  1. 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.

  2. Click the Cleanliness question and get the question number from the status bar (Q6.b).

Step 2: Setting up a simple email alert

  1. Click Questionnaire properties button to open the Questionnaire Properties dialog.
  2. Select Alerts in the left hand panel to display the Alerts section.
  3. Click New.
  4. 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.
  5. Enter the address of the person that you wish the email to be sent to in the Address field.
  6. Enter the subject of the email in the top line (by default this will be Alert1).
  7. Check the html box so you can format the text in your email.
  8. 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.
  9. Select the words “Very Poor” and right-click, then select Bold from the menu.
  10. Click the [Insert] button and select Variable Field…. The New variable field dialog opens.
  11. Select Q1.a from the Variable drop-down list.
  12. Click [OK].
  13. Type ” at ” and insert the Q1.b variable field in the same way.
  14. Complete the email and click [OK].

When you next publish your questionnaire and upload it to Snap WebHost, the email will be sent when someone who has said the cleaning was very poor submits a questionnaire.

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.

  1. Click New.
  2. Set the Condition to Q12 OK. This tests if they have entered an email address in Q12.
  3. Put your cursor in the Address field and click [Insert]. Select Variable Field and then the email address variable.

Deleting alerts

  1. Select the alert from the list and…
  2. …Click Delete.

Conclusion

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 snapideas@snapsurveys.com