Skip to main content
All CollectionsOther FeaturesSurveys
Surveys - Logic and Conditions
Surveys - Logic and Conditions
O
Written by Optimize Team
Updated over 2 months ago

Introduction to Logic and Conditions in Surveys

Not every question needs to be shown to every user. The form of questions could differ based on responses, making them contextual and much more relevant.

E.g. For an NPS Survey, you could:

  • Ask a user for their rating - 1 to 10

    • If the rating is bad, e.g. <=5, apologise and try to understand why.

    • If the rating is >=8, thank them and ask if there's anything else you can do to improve their experience.

How to add Logic and Conditions to the Survey

When you edit any question or page, you'll find a Conditions section in the sidebar

If you've clicked on a question and it doesn't appear, simply pull it back out with this button:

To compose your logic, if you're unfamiliar with the syntax, we recommend clicking the Edit icon:

This will launch a handy wizard for creating your conditions/logic:

Clicking the question name will allow you to select whichever question you wish:

Note that it is most useful for the logic to be based on previous questions, not future ones.

You can then apply an operator:

E.g. using "Greater than or equal to" for a rating-based question. Finally, click on the option/value you want to link the logic to:

Advanced logic

You can add advanced rules to your logic too. Simply click the Add Condition button:

This will create options to allow you to create advanced logic:

Once saved, you'll find the code has been generated for you:

Did this answer your question?