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

# Condition Element: Branch Your Flow Based on Logic

> Use the Condition element to evaluate variables and route your Plural flow down different paths based on equals, greater-than, or other operators.

The Condition element evaluates one or more variable comparisons and routes the flow to different downstream elements depending on the result. Use it to personalise interactions — for example, greet users differently based on the time of day, show content relevant to a user's stated interest, or gate premium content behind a membership check. Every condition follows the same three-part structure: **variable**, **operator**, and **value**.

## Add a Condition element

Right-click on an empty area of your canvas and select **Condition**. Click the element once to open the sidebar where you define the logic.

## Anatomy of a condition

Each condition you add to the element has three parts:

<ParamField path="Variable" type="string" required>
  The variable whose current value you want to test. Select from the dropdown, which lists all system variables (such as `Time`, `WeekdayNumber`, `LanguageISO2`) and any custom variables you have created in the flow.
</ParamField>

<ParamField path="Operator" type="string" required>
  How to compare the variable's value to the target value. Available operators include:

  * **equals** — exact match (string or number).
  * **not equals** — any value other than the target.
  * **greater than** — numeric or time comparison.
  * **less than** — numeric or time comparison.
  * **greater than or equal to** — numeric or time comparison.
  * **less than or equal to** — numeric or time comparison.
  * **contains** — checks whether the variable's string value includes the target substring.
</ParamField>

<ParamField path="Value" type="string" required>
  The value to compare the variable against. Type a static value directly, or select from the dropdown if the system provides predefined options (for example, day-of-week numbers).
</ParamField>

## Add multiple conditions

Click **Add condition** in the sidebar to add more comparisons to the same element. All conditions in a single condition set must be true simultaneously (AND logic) for that output to fire.

To create OR-style branching, add separate condition outputs to the element and wire each one to a different downstream path.

## System variables vs. custom variables

<Tabs>
  <Tab title="System variables">
    System variables are set automatically by Plural. You do not need to create them — they are always available in the variable dropdown. Common system variables include:

    | Variable        | Description                                                                        |
    | --------------- | ---------------------------------------------------------------------------------- |
    | `Time`          | Current time on the browser or robot (24-hour format, e.g. `14:30`)                |
    | `WeekdayNumber` | Day of the week as a number (1 = Monday, 7 = Sunday)                               |
    | `LanguageISO2`  | Two-letter ISO language code of the current project language                       |
    | `Gender`        | Detected gender (`Male`, `Female`, `No Match`) — requires Gender Detection element |

    **Example:** Show a "Good morning" message only before midday.

    * Variable: `Time`
    * Operator: less than
    * Value: `12:00`
  </Tab>

  <Tab title="Custom variables">
    Custom variables are any attributes you create yourself using the **Set User Attributes & Variables** element, the **Save answer** feature in a Menu or Question Designer, or the `setVariable()` function in a Custom Script.

    **Example:** Show a premium offer only to users who indicated they are members.

    * Variable: `membershipStatus`
    * Operator: equals
    * Value: `premium`
  </Tab>
</Tabs>

## Compare two variables against each other

Instead of comparing a variable to a static value, you can compare two variables directly. In the **Value** field, select **Variable** and choose the second variable from the dropdown. Plural evaluates the comparison between the two variable values at runtime.

**Example:** Trigger a special event only when the user's score exceeds the high score on record.

* Variable: `userScore`
* Operator: greater than
* Value: (variable) `highScore`

## Connect condition outputs

Each output on the Condition element corresponds to one condition result. Wire each output to the element that should play when that condition is met. The element also has a **No match** output that fires when none of the defined conditions are true — always connect the **No match** output to prevent the flow from getting stuck.

<Note>
  Conditions are evaluated top to bottom. The first condition that matches fires its output. If you need mutually exclusive paths, order your conditions from most specific to most general.
</Note>

## Practical examples

### Time-based greeting

Route users to different "Good morning", "Good afternoon", and "Good evening" screens:

* **Condition 1:** `Time` less than `12:00` → Good morning screen
* **Condition 2:** `Time` less than `18:00` → Good afternoon screen
* **No match** → Good evening screen

### Content gating by user attribute

Show an exclusive offer only to VIP users:

* **Condition 1:** `userTier` equals `VIP` → VIP offer screen
* **No match** → Standard offer screen

### Weekday-specific content

Display a special Sunday menu item only on Sundays:

* **Condition 1:** `WeekdayNumber` equals `7` → Sunday special screen
* **No match** → Standard menu
