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

# Conditions (Branching Logic)

> Learn how to use conditions to create Yes/No branches in your flows, enabling personalized fan experiences based on behavior and attributes.

Conditions are where your flows get smart. Instead of sending every fan the same sequence of messages, conditions let you split the path — sending different messages to different fans based on who they are, what they have done, or what they have not done.

***

## What Conditions Do

A condition evaluates a Yes/No question about a fan. Based on the answer, the fan goes down one of two branches:

* **Yes branch**: The condition is true — the fan meets the criteria
* **No branch**: The condition is false — the fan does not meet the criteria

Each branch can continue with its own actions, delays, and even more conditions. This is how you create truly personalized fan journeys.

<Warning>Conditions create **parallel branches**, not sequential steps. Both branches exist simultaneously on the canvas. Each fan only takes one path, but you need to build both.</Warning>

***

## How Conditions Look on the Canvas

Conditions appear as **diamond-shaped nodes** on the Flow Builder canvas, visually distinct from the rectangular action and delay nodes. Two lines extend from the diamond:

* A line to the **right or down-left** for the **Yes** path
* A line to the **right or down-right** for the **No** path

Each path leads to its own sequence of nodes. After the branches, they can converge back together or continue independently.

***

## Creating a Condition

<Steps>
  <Step title="Add the Condition Node">
    Click the **add button** ("+") below any node in your flow and select **"Condition"** from the menu. The Condition Builder modal opens.
  </Step>

  <Step title="Define Your Criteria">
    The Condition Builder lets you define what the condition checks. Choose from the condition types below.
  </Step>

  <Step title="Build Out Both Branches">
    After creating the condition, the canvas shows two **"Add Action"** buttons — one for the Yes branch and one for the No branch. Click each to build out the respective paths.
  </Step>
</Steps>

***

## Condition Types

<Tabs>
  <Tab title="Fan Attributes">
    Check a fan's profile data:

    * **VIP Tier**: Is the fan Gold, Silver, or Bronze tier?
      * Example: "Is VIP tier equal to Gold?" — Yes: send VIP-exclusive content. No: send standard content.
    * **Location**: Where is the fan located?
      * Example: "Is fan's country equal to US?" — Yes: send US tour dates. No: send international streaming links.
    * **Engagement Score**: How engaged is this fan?
      * Example: "Is engagement score greater than 80?" — Yes: invite to exclusive event. No: send re-engagement sequence.
    * **Custom Fields**: Any custom data you have stored on the fan profile
      * Example: "Is favorite genre equal to hip-hop?" — Yes: recommend hip-hop playlist. No: recommend pop playlist.
  </Tab>

  <Tab title="Fan Behavior">
    Check what the fan has or has not done:

    * **Has Presaved**: Did the fan presave your music?
    * **Has RSVP'd**: Did the fan RSVP to an event?
    * **Has Purchased**: Did the fan buy merch or tickets?
    * **Has Opened Email**: Did the fan open a specific email?
    * **Has Clicked Link**: Did the fan click a link in a message?
    * **Has Streamed**: Did the fan stream your music?
    * **Has Replied to SMS**: Did the fan reply to a text message?

    <Tip>Use fan-action delays before behavior conditions. "Wait 3 days, then check if they opened the email" gives fans time to act before you evaluate.</Tip>
  </Tab>

  <Tab title="AI Intent Detection">
    Use AI to evaluate the fan's message content:

    * Example: A fan sends a DM. The condition checks: "Does the message indicate interest in tour dates?" AI analyzes the message and determines Yes or No.
    * This is powerful for routing fans to the right branch based on what they said, even if they did not use specific keywords.
  </Tab>

  <Tab title="Keyword Matching">
    Check if a fan's message contains specific keywords:

    * **Exact match**: Message equals "PRESAVE" exactly
    * **Contains**: Message includes the word "ticket" anywhere
    * **Starts with**: Message begins with "Hey"
    * **AI intent**: Message conveys the meaning of "wanting to presave" regardless of exact wording
  </Tab>
</Tabs>

***

## AND/OR Logic

For more complex conditions, you can combine multiple criteria using logical operators.

<Tabs>
  <Tab title="AND Logic">
    All conditions in the group must be true for the Yes branch to fire.

    **Example**: "Is fan from the US **AND** is engagement score above 50?"

    * Fan is from the US with score 75 -> Yes
    * Fan is from the US with score 30 -> No
    * Fan is from Canada with score 90 -> No
  </Tab>

  <Tab title="OR Logic">
    Any condition in the group can be true for the Yes branch to fire.

    **Example**: "Is fan from Nashville **OR** is fan from Austin?"

    * Fan from Nashville -> Yes
    * Fan from Austin -> Yes
    * Fan from Chicago -> No
  </Tab>

  <Tab title="Filter Groups">
    For the most complex logic, create **filter groups** — groups of AND conditions connected by OR:

    **Example**: "(Fan is VIP Gold **AND** from the US) **OR** (Fan has purchased merch **AND** engagement score above 90)"

    This means: the fan qualifies if they are either a US-based Gold VIP, or a highly-engaged merch buyer from anywhere.
  </Tab>
</Tabs>

### Building Compound Conditions

In the Condition Builder modal:

<Steps>
  <Step title="Add First Criterion">
    Add your first criterion to the condition.
  </Step>

  <Step title="Add More Criteria (AND)">
    Click **"Add Condition"** to add another criterion within the same group (AND logic).
  </Step>

  <Step title="Add New Group (OR)">
    Click **"Add Group"** to create a new group (OR logic between groups).
  </Step>

  <Step title="Evaluate">
    Each group evaluates independently, and any group returning true sends the fan down the Yes branch.
  </Step>
</Steps>

***

## Branching Patterns

<AccordionGroup>
  <Accordion title="Simple Two-Way Branch">
    The most common pattern:

    ```
    Condition: Has fan presaved?
    |-- Yes -> Send thank-you email
    |-- No  -> Send presave reminder email
    ```
  </Accordion>

  <Accordion title="Nested Conditions">
    Branch within a branch for multi-level personalization:

    ```
    Condition: Is fan a VIP?
    |-- Yes -> Condition: Has fan purchased merch?
    |          |-- Yes -> Send VIP + buyer exclusive offer
    |          |-- No  -> Send VIP merch discount
    |-- No  -> Send general presave reminder
    ```
  </Accordion>

  <Accordion title="Converging Branches">
    Both branches can lead to a shared action:

    ```
    Condition: Did fan open the email?
    |-- Yes -> Send follow-up SMS with streaming link
    |-- No  -> Resend email with new subject line
               | (after 2-day delay)
               Send follow-up SMS with streaming link  <-- Same action for both
    ```
  </Accordion>

  <Accordion title="Exit Branch">
    One branch continues the flow while the other exits:

    ```
    Condition: Is fan opted in to SMS?
    |-- Yes -> Send SMS with presale code
    |-- No  -> (no action — fan exits this branch)
    ```

    If a branch has no actions, the fan simply finishes that branch and the flow is complete for them.
  </Accordion>
</AccordionGroup>

***

## After Branching

Both branches can continue with any combination of:

* More actions (emails, SMS, DMs, tags)
* More delays
* More conditions (nested branching)
* Go-to-Flow (redirect to another flow)

<Note>There is no limit to how deep your branching can go, but simpler is usually better. Most effective flows have one or two conditions total.</Note>

***

## Practical Examples

<AccordionGroup>
  <Accordion title="Release Day Segmentation">
    ```
    Trigger: Release day (until-date delay)
      |
    Condition: Did the fan presave?
    |-- Yes -> "Your presave just went live! Listen now: {ai_dsp_link}"
    |          Wait 3 days
    |          "How many times have you played it? Add it to your playlists!"
    |-- No  -> "New music alert! {latest_title} is out now: {ai_dsp_link}"
               Wait 5 days
               "Have you listened yet? Fans are loving it."
    ```
  </Accordion>

  <Accordion title="Channel Routing">
    ```
    Trigger: Fan signs up
      |
    Condition: Does fan have SMS opt-in?
    |-- Yes -> Send welcome SMS
    |          Condition: Does fan have Instagram connected?
    |          |-- Yes -> Send IG DM with exclusive content
    |          |-- No  -> Send email with exclusive content
    |-- No  -> Send welcome email
               "Want VIP texts? Reply YES to opt in."
    ```
  </Accordion>

  <Accordion title="Tour Ticket Follow-Up">
    ```
    Trigger: Fan RSVPs to event
      |
    Wait until on-sale date
      |
    Send presale code email
      |
    Wait 3 days
      |
    Condition: Has fan purchased a ticket?
    |-- Yes -> "See you at the show, {fan_first_name}! Here's what to expect."
    |-- No  -> "Tickets are going fast for {next_event_name}! Don't miss out."
               Wait 2 days
               Condition: Has fan purchased a ticket? (re-check)
               |-- Yes -> "Got your ticket! See you there."
               |-- No  -> (exit flow — don't over-pressure)
    ```
  </Accordion>
</AccordionGroup>

***

## Tips and Best Practices

<AccordionGroup>
  <Accordion title="Keep it simple">
    One or two conditions per flow is ideal. If you need five nested conditions, consider splitting into multiple flows connected by Go-to-Flow.
  </Accordion>

  <Accordion title="Test both branches">
    It is easy to build and test only the Yes path. Make sure the No path works too.
  </Accordion>

  <Accordion title="Use fan-action delays before conditions">
    "Wait 3 days, then check if they opened the email" is a powerful pattern. The delay gives the fan time to act.
  </Accordion>

  <Accordion title="Name conditions clearly">
    When you look at the canvas, the condition text should tell you exactly what it checks without opening the modal.
  </Accordion>

  <Accordion title="Avoid dead-end branches">
    Even if one branch does less, at least tag the fan or add a note — this helps with future segmentation.
  </Accordion>

  <Accordion title="Check execution logs">
    If fans are taking the wrong branch, the execution logs show which path each fan took and why.
  </Accordion>
</AccordionGroup>

***

## What Happens Next

Conditions and actions use merge tags to personalize messages. Learn about all 80+ available tags in [Merge Tags](/flow-builder/merge-tags).
