In this article you will learn how to build a conditional logic based on what your end user responded to a survey.
Step 1
Build and configure a survey or a form
Step 2
a. Add a condition step after the survey and configure it
b. In the condition step, we have IF, THEN and ELSE.
c. Use IF in combination with the survey name and value to create a condition
d. configure what happens IF the value submitted by the end user matches your condition
e. configure what happens if it does not match
NPS or Emoji survey
To enable an NPS or Emoji survey, enable the "Collect feedback" toggle in the tour step and then select the desired survey type
For each of the emoji and NPS responses, there is a corresponding default value that Usetiful uses to store it. You will use the value in combination with system survey name to set up a condition.
Emoji | happy | neutral | sad |
Value | 1 | 2 | 3 |
NPS selection | 1-10 |
Value | 1-10 |
System survey names are found in the info tooltip after the survey is created
In the case above, the system survey name is 667976-survey
So this name has to be used as the Tag name in the condition
OR
Form field
To add a form to your tour step, use the Templates for pre-built forms as shown below
or add a form field using the form builder as shown below
As soon as you select the form field type (text, dropdown etc) you will be asked for a form ID and a label. The form ID is what you can later use as the Tag name in the condition step and the form field label is simply the label visible to the end user and plays no role in the conditional logic.
After you have typed the Id and the label and added the form field to the tour step, you also need to configure the values to be used in the condition step.
To do that, use the code editor as shown below
In the source code editor, the value="pet_radio_value1" is what you will need to use as the value of the tag in the condition step. You can modify each value in the code editor to make it easy to work with. Our recommendation is to match the value attribute to the actual value that is visible to the end user.
For this example, this is the modified code
And an example of a corresponding tag condition