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

# If/Else 

> Add conditional logic to create different paths in your workflow

<iframe src="https://app.flywheel.cx/doc-comp-previews/workflow-node-preview?type=if_else" title="Workflow Node Preview" width="100%" height="250px" className="border dark:border-[#1C1C20]  rounded-xl" />

## How If/Else

Add conditional logic to create different paths in your workflow. Users are routed to different actions based on whether they meet specific criteria, allowing for personalized automation flows.

## Configuration

<Columns cols={2}>
  <Card title="Inputs">
    <ParamField path="Condition Type" type="enum" default="AND">
      Determines how multiple conditions are evaluated together. Choose "AND" when all conditions must be true, or "OR" when any condition can be true.

      **Options:**

      * `AND` - All conditions must be met (default)
      * `OR` - Any condition can be met
    </ParamField>

    <ParamField path="Condition" type="object" required>
      Define the criteria that determines which path users follow. Supports complex boolean logic using user data, event properties, and workflow context.
    </ParamField>
  </Card>

  <Card>
    <iframe src="https://app.flywheel.cx/doc-comp-previews/workflow-config-preview?type=if_else" title="Workflow Config Preview" width="100%" height="400px" className="" />
  </Card>
</Columns>

<Card title="Outputs">
  <ParamField path="condition_result" type="boolean" required>
    Whether the condition was met. Users with `true` results follow the "Yes" path, while `false` results follow the "No" path.
  </ParamField>
</Card>

## Use Cases

**User Tier-Based Actions**

```
Condition: user.subscription_tier = "enterprise"
True Path: Assign enterprise CSM + Create priority channel
False Path: Send standard welcome email
```

**Engagement Level Routing**

```
Condition: user.login_count > 10
True Path: Send advanced features guide
False Path: Send basic getting started content
```

**Geographic Personalization**

```
Condition: user.timezone = "America/New_York"
True Path: Send time-sensitive offers during business hours
False Path: Send general promotional content
```

**Payment Status Handling**

```
Condition: user.payment_failed = true
True Path: Send payment retry notification + Billing team alert
False Path: Continue standard onboarding sequence
```

## Best Practices

**Clear Condition Logic**

* Use specific, measurable conditions
* Test conditions with sample data before deploying
* Document complex conditions for team understanding

**Balanced Path Design**

* Ensure both true and false paths provide value
* Avoid overly complex nested conditions
* Consider the user experience for each path

**Performance Considerations**

* Use efficient conditions that evaluate quickly
* Cache frequently accessed user properties
* Monitor condition evaluation performance in workflows
