> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbit.devotel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Flow Builder

> How to use the Orbit visual flow builder to create communication workflows

# Flow Builder

The Orbit Flow Builder is a visual drag-and-drop editor for designing communication workflows. Built on React Flow, it provides an intuitive canvas where you connect nodes to build automations of any complexity.

## Accessing the Builder

Open the Flow Builder from the Orbit dashboard: **Flows > Create New Flow** or edit an existing flow.

## Node Types

Drag nodes from the sidebar onto the canvas and connect them to build your flow.

### Triggers

Choose a trigger node, then set its **Trigger Type** in the config panel:

| Trigger Type          | Description                                                  |
| --------------------- | ------------------------------------------------------------ |
| **Incoming SMS**      | Starts when an SMS is received on one of your numbers        |
| **Incoming WhatsApp** | Starts when a WhatsApp message is received                   |
| **Incoming Email**    | Starts when an email is received on a connected address      |
| **Webhook**           | Starts when an external system calls your flow's webhook URL |
| **Schedule**          | Starts on a cron schedule (e.g., daily at 9 AM)              |
| **Business Event**    | Starts when a platform event fires (e.g., `contact.created`) |
| **Campaign**          | Starts when a campaign sends to a contact                    |
| **Contact Action**    | Starts when a contact is added, updated, or tagged           |
| **Audience Event**    | Starts when a contact enters or leaves an audience           |

### Actions

| Node              | Description                                          |
| ----------------- | ---------------------------------------------------- |
| **Send SMS**      | Send an SMS message                                  |
| **Send WhatsApp** | Send a WhatsApp template or session message          |
| **Send Email**    | Send an email using a template or inline content     |
| **Send RCS**      | Send an RCS rich card or text                        |
| **Make Call**     | Initiate an outbound voice call                      |
| **HTTP Request**  | Call any external API (also called the Webhook node) |

### AI

| Node             | Description                                               |
| ---------------- | --------------------------------------------------------- |
| **Run Agent**    | Hand the conversation to an AI agent                      |
| **AI Classify**  | Classify the inbound message and route by detected intent |
| **AI Response**  | Generate an AI-written reply from the conversation        |
| **AI Sentiment** | Score the message sentiment and branch on it              |

### Logic

| Node          | Description                                      |
| ------------- | ------------------------------------------------ |
| **Condition** | Branch based on a value (if/else)                |
| **Split**     | Fork execution down several branches in parallel |
| **Merge**     | Join parallel branches back into a single path   |
| **Delay**     | Wait for a duration before continuing            |

## Nodes for API-defined flows

Flows created through the [API](/api-reference/endpoints/flows) can use extra node types that the visual builder does not yet surface in its palette. Add them to a flow definition's `nodes` array and the runtime executes them the same way:

| Node                       | Description                                                                                                        |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Functions**              | Derive or set flow variables with safe `{{...}}` templates and boolean expressions, then reference them downstream |
| **Update Record**          | Write collected fields (e.g. lifecycle stage, tags, custom attributes) back to the contact record                  |
| **Send Survey**            | Send an NPS, CSAT, or CES survey to the contact                                                                    |
| **Send-Time Optimization** | Hold the contact until their predicted best time to receive the next message                                       |
| **A/B Test**               | Route contacts down weighted variants and report a per-variant winner                                              |

Additional messaging channels — Viber, LINE, Telegram, Instagram, Messenger, push, and fax — are available as send nodes in API-defined flows as well.

<Note>
  **Not yet available:** **Wait for Reply** and **Loop** (per-item iteration) are on the roadmap. For a multi-way branch, chain **Condition** nodes (each is an if/else fork). To set a variable in the visual builder, capture values from an upstream node's output (e.g. an **HTTP Request** response) and reference them with `{{...}}`, or use a **Functions** node in an API-defined flow.
</Note>

## Building a Flow

### 1. Add a Trigger

Every flow starts with a trigger node. Drag one onto the canvas — this defines what starts your workflow.

### 2. Add Action Nodes

Drag action nodes below your trigger and connect them by dragging from the output handle of one node to the input handle of the next.

### 3. Use Variables

Reference dynamic data in any text field using double curly braces. Variables are flat keys drawn from the trigger payload and contact context — use `{{first_name}}`, not a dotted path like `{{contact.first_name}}`. A placeholder whose key is missing from the context renders as an empty string:

```
Hello {{first_name}}, your order {{order_id}} has shipped!
```

### 4. Add Conditions

Use condition nodes to create branches:

```
If {{order_total}} > 100
  → Send VIP thank you email
Else
  → Send standard confirmation SMS
```

### 5. Test Your Flow

Click **Test** in the toolbar to simulate the flow with sample data. The builder highlights each node as it executes so you can trace the path.

### 6. Publish

Click **Publish** to activate your flow. Published flows process live events immediately. You can pause or unpublish a flow at any time without deleting it.

## Keyboard Shortcuts

| Shortcut           | Action                  |
| ------------------ | ----------------------- |
| `Ctrl + S`         | Save flow               |
| `Ctrl + Z`         | Undo                    |
| `Ctrl + Shift + Z` | Redo                    |
| `Delete`           | Delete selected node    |
| `Ctrl + D`         | Duplicate selected node |
| `Space + Drag`     | Pan the canvas          |
| `Scroll`           | Zoom in/out             |

## Version History

Every save creates a version. Access previous versions from **Flow Settings > Version History** to compare changes or roll back.
