In this tutorial you will learn how to automatically create and send a survey invitation based on a field value updated event using the Automation Engine.
Example: Schedule an SF-36 survey (Short Form Health Survey) for a patient as soon as the field "Is the patient pregnant?" is answered with "Yes"
Event: Field value is updated.
Condition: The same field has a certain value.
Action: Create and Send Survey Package.
- To be able to send out surveys you will need to create a Survey package first. Learn how to do that here: How to create a new survey package. Keep in mind that you will need to create one separate survey package for each survey you want to send out using the Automation Engine.
- Turn the Automation Engine on by enabling beta features under Study Settings. Once they are enabled you will see the Automations tab appear in the Settings. Go to the Automations tab and click on "Add Automation". A new window will open where you can create your automation.
- To set up an automation, Click the "Add event" button, choose "Study field value updated" as a trigger event and define the field that will be triggering the survey creation:
- If necessary, set a condition by clicking 'Add Condition' and select the corresponding field value that should trigger the automation (this can be any field type and value):
In our case, we are using the condition 'Is pregnant' as a trigger, but if we want to send it to both pregnant and non-pregnant patients when the field 'Is the patient pregnant' is answered, then we do not need a condition.
- Then click 'Action' to select the action that will be executed once the field is updated. In our case that will be 'Create and send survey package':
- Set up the Survey package and save it:
- Survey package: Select the survey package that you are planning to send.
- Belongs to: Assign a phase to which the survey package belongs to.
- Email subject and text: Once you have selected the survey package, these fields will be pre-filled. Adjust it if necessary.
- Preview: Use this button to see what your text will look like,
- Lock survey if finished: Select this if you want the survey to be automatically locked after the participant finished it to prevent making any further changes.
- Send/Start date: "Relative to trigger data" means that the survey will be sent after a number of days once the trigger event happens (in this case, the field "Is patient pregnant" being answered). If you select "Decide later", the package will be automatically created but will not be sent or scheduled.
- Start date: This is the date when the survey package will be planned for relative to the trigger date. For example, if we indicate 14 days after trigger date, the survey invitation will be created and planned for two weeks after the trigger date. If the 'Start date' is set to 0, the survey package will be sent immediately when the trigger event happens, in our case when the user answers the question "Is patient pregnant?" and only if the answer was "Yes".
- Scheduling: If you are sending the survey package repetitively, you can also select one of your scheduling patterns. For example, if you want to send it 2 weeks after the trigger, but also one month later, then you can use the scheduling pattern 0, 30. The first number in this schedule will indicate when the first survey will be sent. If you use 0, it will be sent on the date you have defined as Start date (above).
Once the survey package is set up, save it and give your automation a name. Save it and close the window.
- Finally, test the automation by creating a test record that fulfills the criteria you have defined. To do that, open a record, add an email address, answer the question that is your trigger field with an answer that matches the condition. Go to the Surveys tab and see if the surveys are planned/sent:
Of course, a survey can only be sent when there is an email address added to the record. The order of events is irrelevant (whether you first add the email address to the record and then fill in the data that triggers the automation or vice-versa), the surveys will be created and sent either way, as soon as the email and the data are there.