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

# Understanding Data Flow and Variables

> Reference data from one flow step to the next using @StepType.FieldName syntax

Understanding how data flows through your workflow and how to reference it is essential for building sophisticated automations. Variables make data available from one step to the next.

## Variable Syntax

All variables follow a consistent pattern:

`@StepType.OutputFieldName` or `@SpecificStepName.OutputFieldName`

## Variable Sources

### Intake Variables

Data collected in the Intake step is available throughout the flow:

* Free-text: `@Intake.Message`
* Form fields: `@Intake.FieldName` (e.g. `@Intake.CustomerName`, `@Intake.ContractTerm`)

### Step Output Variables

Outputs defined in Agent steps are available as `@AgentStepName.OutputFieldName`. For example, an Agent step called "RiskAnalysis" with an output "RiskLevel" is referenced as `@RiskAnalysis.RiskLevel`.

### Collect Step Variables

Information gathered in Collect steps is available as `@CollectStepName.FieldName`.

## Data Flow Examples

<Tabs>
  <Tab title="Free-Text Flow">
    1. A Slack mention is captured as `@Intake.Message`
    2. An Agent step analyzes the message and outputs `@AgentStepName.OutputName`
    3. A Condition step checks `@AgentStepName.RiskLevel`
    4. Approval routes the document using context from earlier steps
    5. A Notify step references `@Intake.Message` in the notification
  </Tab>

  <Tab title="Form-Based Flow">
    1. A form submission makes fields available as `@Intake.FieldName`
    2. An Agent step uses `@Intake.CustomerName` and other fields for context
    3. A Generate step maps `@Intake.CustomerName` to template fields
    4. Approval routes the generated document
    5. A Sign step collects signatures on the generated document
  </Tab>
</Tabs>

## Using Variables in Configuration

Variables can be referenced in:

* Agent step instructions (context)
* Generate step template mapping
* Notify step messages and conditions
* Condition step logical expressions
* Collect step recipient definition
* Approval routing and conditions

<Tip>
  Use descriptive field names in Intake forms, document what outputs your Agent steps provide, and test variable references to make sure they're available where you expect them.
</Tip>
