# Branching

The **Branching Node** lets you split your workflow into multiple paths based on set filters — ideal for segmenting your data into personas, geographies, funnel stages, or any other custom logic.

Think of it as a multi-lane highway where each record is routed to the right destination.

***

### When to Use It

Use the Branching node when you want to:

* Route different types of records to different actions
* Personalize follow-up based on persona, region, or stage
* Run parallel logic paths from the same dataset

***

### Configuration Overview

When you add a **Branching** node, you need to decide how the workflow should evaluate the conditions below it. This choice changes how records are routed through your logic.

* **All Matches (IF, IF, IF...)**
  * The workflow evaluates **all filters** under the branching node.
  * If multiple conditions are true, the record will flow into **every matching branch**.
  * This is similar to writing multiple **independent IF statements**.
  * Use this when you want records to follow more than one path if they qualify for it.
  * **Example:**
    * Filter A: Company is in the US
    * Filter B: Company has > 500 employees
    * A record that meets both will go into **both branches**.
* **First Match (IF, ELSE IF...)**
  * The workflow evaluates filters **in order, from left to right**.
  * As soon as one condition is met, the record flows into that branch.
  * The workflow **stops checking the rest**.
  * This is similar to an **IF / ELSE IF / ELSE** structure.
  * Use this when you want records to take **only one path**, even if multiple conditions could apply.
  * **Example:**
    * Filter A: Company is in the US
    * Filter B: Company has > 500 employees
    * If a record meets both, it will only go to the **first matching condition** (whichever comes first in the list).

### How It Works

The Branching node doesn’t contain logic itself — instead, it creates **multiple paths**, each of which needs to be followed with a **Condition node**.

Each branch:

* Starts immediately after the Branching node
* Is treated independently (you can configure totally separate workflows per branch)
* Can contain unique conditions, enrichment, sync actions, etc.

#### Example Use Cases

* **Persona-Based Branching:**\
  → Branch 1: Marketing roles → HubSpot\
  → Branch 2: Sales roles → Outreach\
  → Branch 3: RevOps roles → Salesforce
* **Geographic Segmentation:**\
  → US contacts → US sales team\
  → EMEA contacts → EMEA SDRs\
  → APAC contacts → filtered out

<figure><img src="/files/Wa2dXO3EH6oN774SJfsO" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.hockeystack.com/account-intelligence/workflows/nodes/logic/branching.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
