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

# Passing data between steps

> What each Auto Workflow step outputs, what the next step can use and what the warnings mean

# Passing data between steps

Each step can leave data for the steps after it. You use that data with placeholders in double braces. The editor shows what is available and warns you when a placeholder will not work.

## The three places data comes from

| Start with | What it is | Example |
| - | - | - |
| `trigger` | The request that started the workflow (Webhook Trigger) | `{{trigger.body.checkout_url}}` |
| `steps.<step id>` | The output of an earlier step | `{{steps.fetch_order.response.body.total}}` |
| `lead` | The lead that was found or created | `{{lead.phone}}`, `{{lead.name}}` |

Lists use numbers in square brackets (`{{trigger.body.items[0].title}}`). A name with spaces uses quotes: `{{steps.node_1.response.body["order id"]}}`. Placeholders only look up values, nothing is calculated. A placeholder that finds nothing is left empty.

A step can only read the output of steps that run **before** it on the path to it. Use the **Insert field** button next to a field: it lists exactly what the earlier steps give you, with example values from the last run or the captured sample.

## What each step outputs

| Step | You can use | Outputs |
| - | - | - |
| Webhook Trigger | `trigger.body`, `trigger.headers`, `trigger.query`, `trigger.receivedAt` | one |
| Trigger (new lead) | `lead.*` | one |
| AI Agent Call | Call result in a Condition step (answered, outcome, duration, analysis) | one |
| HTTP Request | `response.status`, `response.headers`, `response.body`, `attempts`; on error `error.message`, `error.code` | `default`, `error` |
| If / Switch | `handle` (the branch taken), `mode` | `true` / `false`, or one per case, plus `error` |
| Send Webhook | `delivered`, `status`, `latencyMs`, `responseBody`, `eventId` | `default`, `error` |
| Client Tool | `response.status`, `response.body`, `latencyMs` | `default`, `error` |
| Connector Action | `result.text`, `result.json`, `result.isError`, `tool`, `latencyMs` | `default`, `error` |
| Wait for Webhook | `delivery.body`, `delivery.headers`, `delivery.query`, `delivery.receivedAt`; `timedOut` | `received`, `timeout` |
| Send Email, Send WhatsApp, Set Status, Schedule steps, End | a short message only | one |

For `response.body`, `result.json` and `delivery.body` the editor learns the fields from the last run or from the captured sample. Run the workflow once, or send a test request, to see the fields in the picker.

## Which step can follow which

* One entry step: **Trigger** or **Webhook Trigger**. Nothing connects into it.
* **Condition** (call outcome) only works after an **AI Agent Call**.
* Steps with an `error` or `timeout` output: connect it, or a failure ends the run. An unconnected `error` output makes the run fail.
* An unconnected branch of an If / Switch just ends that branch.
* An older step with a single line out (for example Send Email) should lead to one next step. A second line is allowed but drawn dashed, because only the first is followed.
* A loop is only allowed if it goes through a **Wait for Webhook** or **AI Agent Call**. A loop without a wait is refused.

Hover a connection while dragging to see why it is allowed or not.

## What the warnings mean

| Message | Meaning | Fix |
| - | - | - |
| Field not seen in the sample | The captured request has no such field | Send a test request, or correct the path |
| Step is not before this step | The placeholder reads a step that cannot have run yet | Connect that step before this one, or use another field |
| Field only exists on some paths | The step that creates it is not on every path | Move the step, or add a check |
| Branch not connected | An output has no next step | Connect it or leave it to end the branch |
| Unknown placeholder start | Only `trigger`, `steps` and `lead` exist | Fix the spelling |
| If / Switch has nothing to read | No earlier step passes data in | Connect it after a step that outputs data |
| Rule compares two fixed values | The left side of a rule has no placeholder | Pick a field from an earlier step |

Warnings never block saving or activating. Errors (a missing required setting, a step with nothing before it, a loop without a wait, a rule that reads a step that is not before it) save the workflow as a draft but stop you from activating it.

## Saving as a draft or activating

* **Save** always stores your work. With errors, it is stored as a **draft** and an active workflow is switched off.
* **Activate** is possible only when there are no errors. The button shows the reason when disabled. Activation also checks that the agents, listeners, credentials and tools you picked still exist.
* A run keeps the version of the workflow it started with.

## Example

A shopper abandons a cart; the agent calls, then WhatsApp is sent.

1. **Webhook Trigger** gets `{{trigger.body.phone_number}}` and `{{trigger.body.checkout_url}}`.
2. **AI Agent Call** passes `product` = `{{trigger.body.items[0].title}}` to the agent.
3. **Condition** checks the call was answered.
4. **Connector Action** (Respond.io `send_message`) sends the template with `{{trigger.body.checkout_url}}`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.