Branching
Create conditional navigation paths based on user responses.
Branching
Branching lets you send users down different paths in a flow based on what they select on a screen. Instead of building separate flows for each audience segment, a single flow can adapt in real time using Branch nodes.
How branching works
- A screen presents a component with selectable options (e.g., a radio group asking "What is your role?").
- The user selects an option.
- The flow reaches a Branch node connected to that screen.
- The Branch node inspects the user's response and routes them to the matching path.
Each option maps to an outgoing edge on the Branch node. If a user selects "Product Manager", they follow the edge labeled "Product Manager". If they select "Engineer", they follow a different edge.
Branchable components
Not every component supports branching. The following component types produce a response that a Branch node can evaluate:
| Component | Response value |
|---|---|
| RadioGroup | The selected option's value. |
| NPS | The numeric score (0--10). |
| Rating | The numeric rating value. |
| Dropdown | The selected option's value. |
| Checkbox | The set of checked values. |
| Button | The button's action value. |
If the screen before a Branch node does not contain a branchable component, the Branch node has nothing to evaluate.
Setting up a Branch node
- Open your flow in the flow builder.
- Click the + Add Node button on the canvas and select Add Branch.
- Connect the screen that contains a branchable component to the Branch node.
- The Branch node automatically reads the available options from the connected component.
- For each option, draw an edge from the Branch node to the screen you want the user to see next.
Branch edges are labeled with the option value they correspond to. These labels update automatically if you rename options in the component.
Example: role-based onboarding
Suppose your onboarding flow asks users to choose their role with a RadioGroup that has three options: Designer, Developer, and Product Manager.
Start → Welcome Screen → Role Selection Screen → Branch
├── "Designer" → Design Tips Screen → End
├── "Developer" → API Intro Screen → End
└── "Product Manager" → Dashboard Tour → EndEach role sees a tailored follow-up screen. The rest of the flow (welcome screen, final screen) remains shared.
Saving responses as user attributes
When a user responds to a branchable component, you can save that response as a user attribute for future targeting and personalization. This is handled through the response save feature:
- The SDK captures the user's selection on the branchable component.
- The response is saved to the user's profile as an attribute (e.g.,
role = "Designer"). - Future flows can use this attribute in trigger conditions to target or exclude specific segments.
This creates a feedback loop -- responses from one flow inform the targeting of subsequent flows.
Saved response attributes overwrite any previous value for the same key. If a user completes the same flow twice and picks a different option, the attribute updates to the latest selection.
Branching vs. condition nodes
Both Branch nodes and Condition nodes create diverging paths, but they serve different purposes:
| Branch node | Condition node | |
|---|---|---|
| Input | User's response on the previous screen. | A logical expression you define (user attributes, event properties). |
| Timing | Evaluated after the user interacts. | Evaluated before the user sees the next screen. |
| Paths | One per option value (many). | Two: Yes or No. |
| Use case | Personalize the flow based on what the user just answered. | Skip or show screens based on existing user data. |
You can combine both in the same flow. For example, use a Condition node early in the flow to check if the user is on a paid plan, and later use a Branch node to split based on a survey response.
Tips
- Keep branches shallow -- deeply nested branches are harder to maintain. If you have more than two or three levels of branching, consider splitting into separate flows.
- Preview each path -- use the preview feature to walk through every branch and verify the experience before publishing.