> For the complete documentation index, see [llms.txt](https://help.blings.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.blings.io/apps/blings-platform/flow-map/flow-map-conditions.md).

# Conditions

Conditions send viewers to different paths based on data or time. Use them when a project needs to choose the next scene or lineup from a rule instead of sending every viewer through the same route.

<figure><img src="/files/nVTp7qdm8wRHCYZsJlIF" alt="Condition node with reorder_count branches connected to outcome scenes"><figcaption><p>This condition checks `reorder_count` and routes viewers to the first matching branch. If no condition matches, viewers follow `Otherwise`.</p></figcaption></figure>

Condition branches are evaluated in order. The first branch that matches determines the next path. If no branch matches, the fallback branch is used.

## Common Condition Patterns

| Goal                         | Condition example                    | Result                                                                    |
| ---------------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| Personalize by customer type | `customer_type is VIP`               | VIP viewers see a premium offer. Everyone else follows the fallback path. |
| Route by count               | `reorder_count is 1`                 | First-time reorder viewers see the first-time routine scene.              |
| Route by score or value      | `loyalty_points is greater than 500` | High-value viewers see a reward scene.                                    |
| Show date-based content      | `date is between June 1 and June 30` | Viewers see a limited-time campaign scene during the selected date range. |
| Check whether data exists    | `first_name exists`                  | Viewers with usable data see personalized copy; others see generic copy.  |

{% hint style="info" %}
Put the most specific branch first and keep an `Otherwise` branch connected. For example, check `VIP in US` before a broader `VIP` branch.
{% endhint %}

## Create or Edit a Condition

To edit a condition, select the condition node, then choose **Edit** from the node menu.

<figure><img src="/files/vWsd96DT8cqWVj8RYXgV" alt="Condition node selected with a menu showing Edit and Remove actions"><figcaption><p>Select a condition node to open node actions, then choose **Edit**.</p></figcaption></figure>

{% stepper %}
{% step %}

### Add a Condition Node

Add or select a condition at the point where the viewer journey should split. Place it after the scene or lineup that must decide the next path.
{% endstep %}

{% step %}

### Choose the Field

Choose the data field, date field, URL parameter, or other supported value the condition should check. Example fields include `customer_type`, `reorder_count`, `country`, `days_since_purchase`, and `first_name`.
{% endstep %}

{% step %}

### Choose the Operator

Select the operator that matches the field type. Text fields can use operators such as `is`, `contains`, or `exists`. Number fields can use operators such as `is greater than`, `is between`, or `is at most`.
{% endstep %}

{% step %}

### Enter the Value

Enter the value that should make the branch match. For example, use `1` for `reorder_count is 1`, or `VIP` for `customer_type is VIP`.
{% endstep %}

{% step %}

### Connect Every Branch

Drag each branch output handle to the scene or lineup that should play for that result. Connect the fallback branch as well.
{% endstep %}
{% endstepper %}

The condition editor shows the selected node beside the editable rules, so you can keep the branch context visible while changing logic.

<figure><img src="/files/g9Qtk1bz5MGldp6UhoO6" alt="Condition editor open beside the selected condition node on the Flow Map canvas"><figcaption><p>The editor opens beside the selected condition node and shows each branch as an editable rule group.</p></figcaption></figure>

To add another branch rule, select **+ Add condition**. The new rule appears as an incomplete `Else if` branch until a field, operator, and value are selected.

<figure><img src="/files/VwLe93oCwXhtsbiSf8jw" alt="Condition editor with a newly added incomplete Else if rule"><figcaption><p>A new branch starts incomplete until you choose the data key, operator, and comparison value.</p></figcaption></figure>

For example, to route viewers who purchased more than 30 days ago:

1. Select the **Data** condition type.
2. Choose `days_since_purchase` as the data key.
3. Choose **Is greater than** as the operator.
4. Enter `30` as the value.
5. Save the condition only after the branch name and connector are ready.

<figure><img src="/files/73OoRvPVaLoANoAGvXx1" alt="Condition editor showing days_since_purchase, Is greater than, and value 30"><figcaption><p>Example condition rule: viewers match this branch when `days_since_purchase` is greater than `30`.</p></figcaption></figure>

{% hint style="warning" %}
Do not leave a condition branch incomplete. Incomplete branches are easy to spot in the editor, but they should be completed or removed before saving and publishing.
{% endhint %}

## Test Condition Branches

Preview every branch with representative data before publishing. Include edge cases such as missing values, unexpected values, date boundaries, and viewers who should fall through to `Otherwise`.

{% content-ref url="/pages/o3Uq9AhtjBVAMsxuyMFA" %}
[Flow Map basics](/apps/blings-platform/flow-map.md)
{% endcontent-ref %}

{% content-ref url="/pages/VkH17x1J2SH1VmvzEgwU" %}
[Simulation](/apps/blings-platform/simulation.md)
{% endcontent-ref %}
