> ## 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 Binding & Variables

> Master Quixa's dynamic data plumbing: Response Binding, QMock synthetic generator, QPlugin extensions, and hierarchical variables.

In enterprise API workflows, hardcoded static payloads lead to brittle, flaky tests and high maintenance overhead. Quixa eliminates this problem through its unified **Dynamic Token & Interpolation Engine**.

When configuring any node's **Body**, **Headers**, **Query Parameters**, or **URL Path**, clicking the **`+` button** or typing `{{` opens the token selection popover with four core sources:

```
┌────────────────────────────────────────────────────────┐
│  [+] ResponseBinding   [+] QMock   [+] QPlugin   [+] Variables   │
├────────────────────────────────────────────────────────┤
│  🔍 Search tokens, fields, or properties...            │
└────────────────────────────────────────────────────────┘
```

***

## 1. Response Binding (Inter-Node Plumbing)

**Response Binding** dynamically extracts data from the response of any preceding node in the flow and pipes it into downstream request URLs, headers, or payloads.

### Syntax

```handlebars theme={null}
{{ResponseBinding.<nodeAlias>.<section>.<jsonPath>}}
```

### Supported Sections

* **Body Fields**: `{{ResponseBinding.createUser.body.data.id}}`
* **Headers**: `{{ResponseBinding.authService.headers['x-correlation-id']}}` or `{{ResponseBinding.authService.headers.Authorization}}`
* **Status Code**: `{{ResponseBinding.paymentGateway.statusCode}}`
* **Array Indexing**: `{{ResponseBinding.listAccounts.body.items[0].accountNumber}}`

### Example Workflow

1. **Node 1 (`CreateCustomer`)**: Dispatches `POST /api/v1/customers` $\to$ Returns `{ "customerId": "cust_98214" }`.
2. **Node 2 (`OpenAccount`)**: Dispatches `POST /api/v1/accounts` with payload:
   ```json theme={null}
   {
     "ownerId": "{{ResponseBinding.CreateCustomer.body.customerId}}",
     "currency": "EUR",
     "type": "Savings"
   }
   ```
3. At runtime, Quixa automatically resolves the token into `"cust_98214"`.

***

## 2. QMock Engine (Synthetic Data Generation)

The **QMock Engine** provides built-in, on-demand synthetic mock data generation powered by standard faker algorithms. Every execution generates fresh, realistic data at runtime.

### Common Categories & Fields

| Category | Token | Sample Generated Value |
| :- | :- | :- |
| **Person** | `{{QMock.person.firstName}}` | `"Elena"` |
| | `{{QMock.person.lastName}}` | `"Kovacs"` |
| | `{{QMock.person.fullName}}` | `"Elena Kovacs"` |
| **Internet** | `{{QMock.internet.email}}` | `"elena.kovacs@example.com"` |
| | `{{QMock.internet.userName}}` | `"ekovacs"` |
| | `{{QMock.internet.ipv4}}` | `"198.51.100.42"` |
| **Finance** | `{{QMock.finance.iban}}` | `"DE89370400440532013000"` |
| | `{{QMock.finance.amount}}` | `"1450.50"` |
| **Utility** | `{{QMock.utility.number}}` | `48291` |
| | `{{QMock.utility.guid}}` | `"c9bf9e57-1685-4c89-bafb-ff5af830be8a"` |
| **Datatype** | `{{QMock.datatype.boolean}}` | `true` |
| **Date** | `{{QMock.date.recent}}` | `"2026-10-15T14:32:00Z"` |

### Critical Rule: Type-Aware Interpolation

JSON requires strict type fidelity. Quixa's serializer uses **Type-Aware Interpolation** to preserve raw numbers, booleans, and objects versus strings:

<Tabs>
  <Tab title="Numeric (Unquoted)">
    ```json theme={null}
    {
      "orderId": {{QMock.utility.number}},
      "active": {{QMock.datatype.boolean}}
    }
    ```

    **Resolved JSON Output:**

    ```json theme={null}
    {
      "orderId": 48291,
      "active": true
    }
    ```

    *Result:* Values remain raw integer and boolean data types without quotes.
  </Tab>

  <Tab title="String (Quoted)">
    ```json theme={null}
    {
      "documentNumber": "{{QMock.utility.number}}",
      "statusFlag": "{{QMock.datatype.boolean}}"
    }
    ```

    **Resolved JSON Output:**

    ```json theme={null}
    {
      "documentNumber": "48291",
      "statusFlag": "true"
    }
    ```

    *Result:* Values are serialized as JSON strings.
  </Tab>
</Tabs>

***

## 3. QPlugin Tokens (Custom Algorithmic Generators)

When workflows require specialized algorithmic formats (e.g., checksum algorithms, government tax identifiers, or token signers), teams publish extensions to the **Plugin Store**.

### Syntax

```handlebars theme={null}
{{QPlugin.<pluginSlug>}}
```

### Examples

* `{{QPlugin.tax-id-generator}}`: Produces algorithmically valid registration numbers.
* `{{QPlugin.hmac-signer}}`: Computes dynamic HMAC-SHA256 request signatures based on payload contents.
* `{{QPlugin.iban-validator}}`: Generates checksum-compliant International Bank Account Numbers.

***

## 4. Hierarchical Variables (`Variables`)

Quixa supports a 3-tier variable hierarchy to configure and parameterize workflows across environments:

```mermaid theme={null}
graph TD
    Env["1. Environment Variables (Dev / Staging / Prod)"]
    Env --> FlowVar["2. Flow Variables (Per-Workflow Scoped)"]
    FlowVar --> NodeExt["3. Variable Extracts (Runtime Node Outputs)"]

    style Env fill:#4338ca,stroke:#818cf8,stroke-width:2px,color:#fff
    style FlowVar fill:#1e1b4b,stroke:#7c3aed,stroke-width:2px,color:#fff
    style NodeExt fill:#312e81,stroke:#6366f1,stroke-width:2px,color:#fff
```

### 1. Environment Variables (`{{env.<key>}}`)

* Configured centrally under the Environments manager.
* Provides environment-specific values such as `{{env.baseUrl}}`, `{{env.apiGatewayKey}}`, or `{{env.channelCode}}`.
* Switching the active environment dropdown (e.g. from `Dev` to `Staging`) immediately remaps all references across the canvas.

### 2. Flow Variables (`{{flow.<key>}}`)

* Defined at the flow settings level.
* Holds workflow defaults such as `{{flow.retryCount}}` or `{{flow.defaultCurrency}}`.

### 3. Variable Extracts (Response Extractions)

* Configured in any node's **Variables** tab.
* Saves dynamic values extracted from responses directly into flow-scoped variables for subsequent node consumption.


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