> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usertick.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Logic and branching

> Send respondents to different questions based on their answers, without code. Rules run on the respondent's device in step-by-step and chat surveys.

Branching sends each respondent to the questions that apply to them, which keeps surveys short. Rules run only when the survey shows one question at a time, in the **Step by step** and **Chat** layouts; a survey that shows all questions at once keeps its rules but doesn't run them. In a chat survey, a rule that goes back to a question already answered works like changing that answer: the questions after it are removed, and the visitor answers again.

## Add a branching rule

**1. Open the question**

In the **Content** tab, open the question whose answer decides the path, and find **Branching by answer**.

**2. Add a rule**

Select **Add rule**, choose a condition on the answer, and under **Go to:** select another question or **End survey**. A rule that goes back to an earlier question shows a warning.

**3. Set the fallback**

Under **If no rule matches**, keep **Continue to next question** or choose another question.

The conditions depend on the question type: **Equals**, **Does not equal**, **Contains**, **Does not contain**, **Greater than**, **Less than** (and their "or equal to" forms), **Answered** and **Not answered**. A choice question branches by its options, including **Other**. An NPS question branches by its score, and the answer picker marks each score as Detractor (0 to 6), Passive (7 or 8) or Promoter (9 or 10): **Less than or equal to** 6 covers detractors, and **Greater than or equal to** 9 covers promoters. **Equals** and **Contains** on text ignore upper and lower case and extra spaces, and a text answer with a screenshot or file attached is compared by its text.

When several questions share a page, the rules on that page are checked from the top when the respondent selects Next, and the first rule that applies decides where the survey goes.

## Example: an NPS follow-up

* Question 1 asks for an NPS score from 0 to 10.
* If the score is **Less than or equal to** 6 (a detractor), the survey goes to "What was missing for you?"
* If the score is **Greater than or equal to** 9 (a promoter), the survey goes to "What do you love most?"
* Everyone else continues to the general follow-up question.

Detractors are asked what went wrong, promoters are asked what works, and neither group sees the other's question.

## How rules run

* Rules run in the respondent's browser, so there is no delay between questions.
* Rules work on every channel: the website widget, the hosted link and QR pages, and the page an email answer opens.
* The progress bar accounts for skipped questions, so it never moves backward.
* The editor's live preview follows the rules, so every path can be tested before publishing.

> [!TIP]
>
> One or two levels of branching cover most surveys. Deeper trees are hard to follow and rarely change what you learn.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.