---
updatedAt: 2026-09-01T16:18:36.000Z
---

Fetch the complete documentation index at: https://developers.wabbit.gg/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# If / Branch

# If / Branch

Run different steps depending on a condition

> **Note:** A show\_modal step inside then/else must still be the first step of that branch.

## Fields

| Field       | Type           | Required | Description                                                                               |
| ----------- | -------------- | -------- | ----------------------------------------------------------------------------------------- |
| `condition` | condition tree | yes      | A compare ({op, a, b}), group ({op: and/or/xor, terms}), or negation ({op: 'not', term}). |
| `then`      | array of steps | no       | Runs when the condition is true.                                                          |
| `else`      | array of steps | no       | Runs when the condition is false.                                                         |

## Example

```json
{
  "id": "01H8XGJVBWX7Y5Z3K9M2N4P6Q1",
  "type": "if",
  "condition": {
    "op": "==",
    "a": {
      "path": "user.coins"
    },
    "b": {
      "literal": 100
    }
  },
  "then": [],
  "else": []
}
```