> 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 %}

### 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
