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

# Variables

> How variables work across the conversation flow and logic flows

Variables are named values that persist for the duration of a call. They are set by nodes during the conversation or inside logic flows and can be read by any subsequent node, regardless of whether it is in the conversation flow or a logic flow.

## Variable scope

All variables in Vatel are **call-scoped**. A variable set anywhere during a call, whether by an Extract Info node in the conversation, a Variable node in a logic flow, or a Webhook response, is immediately available to every node that runs after it for the rest of that call.

There is no separate "flow scope." Variables do not reset when a logic flow finishes.

## Setting variables

Variables are set by several node types:

| Node                      | How it sets variables                                                                                                               |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Extract Info**          | Captures a value from the caller and stores it under the name you provide. Set once per call; will not overwrite an existing value. |
| **Extract**               | Uses the LLM to pull typed fields from the conversation transcript into named variables.                                            |
| **Variable**              | Explicitly declares one or more key/value pairs.                                                                                    |
| **Webhook / Integration** | Response data is mapped into variables based on the node's output configuration.                                                    |
| **Transform**             | Maps existing variables into a new structure and stores the result.                                                                 |

## Referencing variables

Use double curly braces to reference a variable anywhere a field accepts dynamic values:

```
Hello {{caller_name}}, your order {{order_id}} is confirmed.
```

System variables use the same syntax. See [System Variables](/configure/system-vars) for the full list.

## InputVariable

Many node fields accept an **InputVariable** rather than a plain string. This lets you choose at configuration time whether a value is fixed or pulled from the call context at runtime.

| Field         | Type                                                     | Required | Description                                                              |
| ------------- | -------------------------------------------------------- | -------- | ------------------------------------------------------------------------ |
| `name`        | string                                                   | Yes      | The parameter name this value is passed as.                              |
| `type`        | `static` \| `dynamic`                                    | Yes      | Whether the value is a literal or a reference to a call variable.        |
| `dataType`    | `string` \| `number` \| `boolean` \| `object` \| `array` | Yes      | The expected data type of the value.                                     |
| `description` | string                                                   | Yes      | What this value represents. Used by the Extract node to guide the model. |
| `required`    | boolean                                                  | No       | Whether the parameter must be present. Default: `false`.                 |
| `value`       | any                                                      | No       | The literal value when `type` is `static`.                               |

### Static vs dynamic

**Static**: the value is a fixed literal you set at configuration time. Use this for constants like a sender email address, a fixed API endpoint, or a default message.

```json theme={null}
{
  "name": "sender",
  "type": "static",
  "dataType": "string",
  "description": "Sender email address",
  "value": "noreply@example.com"
}
```

**Dynamic**: the value is resolved from the call's variable scope at runtime. Use this to pass in something the agent captured earlier in the call, like a caller's name or a customer ID from a webhook response.

```json theme={null}
{
  "name": "customer_id",
  "type": "dynamic",
  "dataType": "string",
  "description": "Customer ID looked up earlier in the call"
}
```

For dynamic variables, the `value` field is left empty and the variable is resolved by name from the call scope when the node executes.

## Variable naming

Variable names should be lowercase with underscores (e.g. `caller_name`, `order_id`, `customer_tier`). Avoid spaces and special characters. Names are case-sensitive.
