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

# Data Mapping & Variable Expressions

> Bind predecessor step responses, leverage built-in dynamic functions, and map flow context.

Data flow in Quixa is driven by a flexible expression engine that passes parameters, authentication credentials, and response payloads seamlessly down the execution graph.

***

## 1. Mustache Binding Syntax

Reference any predecessor node output using double-curly syntax:

```text theme={null}
{{<NodeNameOrAlias>.<PropertyPath>}}
```

### Common Binding Patterns:

* **JSON Body Values**: `{{CreateUser.response.body.id}}`
* **Nested Object Arrays**: `{{GetOrders.response.body.items[0].sku}}`
* **Response Headers**: `{{Login.response.headers.x-auth-token}}`
* **HTTP Status Code**: `{{PaymentStep.statusCode}}`
* **Round-trip Latency**: `{{SearchApi.responseTimeMs}}`

<Tip>
  When editing URLs, Headers, or JSON Bodies, typing `{{` opens the **IntelliSense Autocomplete Picker**, displaying all available upstream outputs with live schema previews.
</Tip>

***

## 2. Built-in Dynamic Generators

Inject synthetic data and dynamic timestamps directly into your payloads without writing code:

| Macro | Output Example | Description |
| :- | :- | :- |
| `{{$guid}}` / `{{$uuid}}` | `4a3b8d12-6f1a-4c28-912b-3e5f2a1b9c7d` | Version 4 RFC UUID |
| `{{$timestamp}}` | `1732284000` | Current Unix epoch in seconds |
| `{{$isoTimestamp}}` | `2026-10-16T14:10:00Z` | ISO-8601 UTC timestamp |
| `{{$randomInt}}` | `842` | Random integer (0-1000) |
| `{{$randomEmail}}` | `user_8492@example.com` | Synthetic user email |
| `{{$randomFirstName}}` | `Sarah` | Synthetic first name |

***

## 3. Scoped Variables

* **Environment Variables**: `{{env.BASE_URL}}`, `{{env.API_SECRET}}` — scoped to active deployment environments (`Dev`, `Staging`, `Prod`).
* **Flow Variables**: `{{flowVars.batchId}}` — centralized key-values defined at the root of the workflow.
* **Loop Context**: `{{forNode.item}}`, `{{forNode.index}}` — dynamically populated during iteration cycles.

***

## 4. Script Nodes (JavaScript Transformations)

When complex transformations, hash calculations, or custom data restructuring is required, place a **Script Node**:

```javascript theme={null}
// Script Node executes in a secure V8 VM sandbox
const rawItems = context.FetchProducts.response.body.products;

// Filter in-stock items and calculate subtotal
const inStock = rawItems.filter(item => item.inventory > 0);
const subtotal = inStock.reduce((acc, curr) => acc + curr.price, 0);

return {
  validProducts: inStock,
  totalAmount: subtotal,
  itemCount: inStock.length
};
```

Outputs returned from a Script Node are immediately available to subsequent nodes via `{{MyScript.response.body.totalAmount}}`.


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