> For the complete documentation index, see [llms.txt](https://docs.zigpoll.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zigpoll.com/faq/survey-logic-and-conditional-flows.md).

# Survey Logic and Conditional Flows

How to show a question only for certain answers, branch, skip ahead and build conditional flows in your surveys

Survey logic lets you create dynamic surveys that adapt based on how respondents answer. Here are the most common questions about setting this up.

### What is question logic?

Question logic changes a survey based on how someone answers. It comes in two kinds:

* **Presentation Logic** decides whether a question is shown at all. Use it to show a follow-up question only to people who gave certain answers. This is how you branch.
* **Action Logic** runs after a question is answered: skip ahead, end the survey, redirect, or send the answer to another tool.

{% content-ref url="/pages/gTXFW4XX3ofTRN9sckv0" %}
[Question Logic](/questions/question-logic.md)
{% endcontent-ref %}

### How do I show a follow-up question only when someone picks certain answers?

Open the follow-up question, click **Add Presentation Logic**, choose **show**, and add a condition on the earlier question. For a Single Choice question use **= (is equal to)** with the answer. For several answers, add one condition per answer and join them with **or**. For Multiple Choice, use **includes any** and pick the answers. Click **Update Question**.

The follow-up stays hidden for everyone else. Repeat for each follow-up. Several questions can share the same condition, for example a Text & Image question and the Email question after it.

See [Branching](/questions/question-logic.md#branching-show-a-question-only-for-certain-answers) for a full example.

### Can I skip questions based on a previous answer?

Yes. Open the question, click **Add Action Logic**, set a condition (for example **= (is equal to)** *No*), and choose **Skip to** and the question to jump to. After the question you skip to, the survey continues in order from there. To end a branch instead, choose **End Survey**.

**Skip to** only jumps ahead: the questions it passes are still shown to everyone who doesn't take the jump. To show a question only when an earlier answer matches, open that later question and use **Add Presentation Logic** instead.

### Can I create branching paths in my survey?

Yes. Add every path's questions to the survey, then give each one **Presentation Logic** that shows it for its path's answers. Each respondent sees only their path's questions, and the survey carries on past the rest.

Use **Skip to** or **End Survey** only when a path should jump over later questions or finish early. Building the paths themselves out of **Skip to** rules makes each path run on into the next path's questions.

### Why is my follow-up question showing to everyone?

Check the follow-up question itself:

* **It has no Presentation Logic.** A question reached through **Skip to**, or simply placed after another, is shown to everyone who gets there. Add Presentation Logic with **show** and the answers it's for.
* **Its condition says is submitted.** If the earlier question changed type (for example Multiple Choice to Single Choice), a condition such as **includes any** becomes **is submitted** when you update the follow-up, and matches everyone. Set it to **= (is equal to)** each answer, joined with **or**.

### Can I make a question required before moving on?

Yes. Questions are required unless you turn on **Optional** on the question. With **Optional** off, nobody can move past the question without answering, unless logic on an earlier question skips over it.

### Can I show different questions based on what product was purchased?

Yes, if you're using Zigpoll on Shopify. The simplest way is one survey per product group:

1. Open each survey's **Settings → Targeting**.
2. Click **Advanced Rules** under **Shopify Targeting Rules**.
3. Add a rule such as **Product Ids → Includes Any →** the product.
4. In your Surveys list, put the more specific surveys above a catch-all survey.

Zigpoll checks surveys top-down and shows the first one that matches.

{% content-ref url="/pages/-Mf4fjPMXlsNJRxpYb16" %}
[Targeting Settings](/polls/targeting-settings.md)
{% endcontent-ref %}

You can also pass product information in as metadata and use **Presentation Logic** metadata conditions to show or hide questions within one survey.

{% content-ref url="/pages/-LrVNWozDJtjwyKgd2n3" %}
[Survey Metadata](/embed/poll-metadata.md)
{% endcontent-ref %}

### Can I show or hide a question based on customer data (a Shopify tag, a profile property, a metafield)?

Yes, when that data reaches the survey as **metadata**. Open the question, turn on **Presentation Logic** (**Show or hide this question**), pick **metadata** as the condition's source, enter the key name and the value to compare with. On Shopify, order and customer details such as `shopify_customer_id`, tags and the products bought arrive as metadata on their own; anything else (a quiz result, a profile property, a plan name) is passed in by your site when it loads Zigpoll, or stored by a metadata action earlier in the survey.

To show a whole survey to only some customers, use **Settings → Targeting** instead; question logic can't read a Shopify customer property that was never passed in.

{% content-ref url="/pages/gTXFW4XX3ofTRN9sckv0" %}
[Question Logic](/questions/question-logic.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LrVNWozDJtjwyKgd2n3" %}
[Survey Metadata](/embed/poll-metadata.md)
{% endcontent-ref %}

### Can I A/B test two versions of a question?

Yes. Duplicate the survey, change the question in the copy, and give each survey 50% under **Settings → Targeting → Percentage**. Each visitor is assigned to one variant and keeps it across page loads, so the comparison is clean, and the two dashboards give you the two sets of results. The same method works for testing answer options, question order, or an incentive. See [A/B Testing Surveys](/tutorials/a-b-testing-surveys.md) for the setup, including how to layer more than two variants.

If what you want to remove is order bias rather than compare wordings, turn on **Randomize answers** in the question's settings instead. Each respondent sees the options in a different order and you keep one survey and one set of results.

### Can a "None of the above" option clear the other selections on a Multiple Choice question?

No. Zigpoll has no exclusive answer option, so a respondent can tick "None of the above" together with other answers and the survey will not deselect the others. Two ways to get a clean result:

* **Ask a Single Choice gate first.** For example "Did you use any of these features?" with Yes and No, then show the Multiple Choice question only to people who answered Yes using Presentation Logic. People who answered No never see the list.
* **Keep the option and clean up in reporting.** Leave "None of the above" in the list and filter answers that include it on the dashboard or in your export.

### Can respondents go back and change an answer?

Yes. The survey shows a back arrow, and going back and picking a different answer replaces the earlier one. To stop people revisiting earlier questions, turn on **Hide back button** under **Settings → General**. See [Hide back button](/polls/display-rules.md#hide-back-button).

### My skip logic isn't working as expected

Check the following:

* **Rule order.** When several rules match, the highest one decides where to go next. Put specific rules above general ones. The **All other answers will** row only runs when no rule above it chose Skip, End or Continue.
* **The operator.** For Multiple Choice, use **includes any** or **includes all**. **=** only matches one exact combination of selected answers. For Single Choice, use **=** once per answer joined with **or**.
* **A question you skipped past still shows.** **Skip to** doesn't hide anything. Use **Presentation Logic** on the question instead.
* **Skip falls through.** After a **Skip to**, the survey carries on in order from that question. Add **End Survey** where a branch should stop.
* **A redirect fires twice.** A rule that only redirects doesn't stop the **All other answers will** row, so its redirect runs too. Add **End Survey** or **Continue** to the specific rule.
* **Redirects on Shopify checkout pages.** **Redirect To** can't navigate on checkout, Thank You or Order Status pages. Use an **Actions** question with a button link instead.
* **Answer options changed.** If you renamed or deleted an option after building the rule, pick it again in the rule.
* **Test in a private window.** Zigpoll remembers progress in the browser, so a survey you already finished won't restart cleanly.
* **Click Update Question** after editing logic rules.

See [Question Logic](/questions/question-logic.md#my-logic-isnt-working) for the full checklist.

{% hint style="info" %}
Need help designing a complex survey flow? Contact us at <support@zigpoll.com> and we'll help you map it out.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zigpoll.com/faq/survey-logic-and-conditional-flows.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
