# Variables

Manages session variables on a page. Variables are scoped values (user, workflow, location, subsidiary) that other blocks read to drive their behaviour — pricing, filters, conditional visibility, defaults.

The block itself is mostly invisible to end users. It exposes editable variable controls that users can change, with each change saved back to the appropriate scope.

## Available in

* All module types **except Reports**

## When to use

* A workflow that needs the user to pick a context (e.g. *Currency*, *Price Level*) before the rest of the page loads with the right data.
* Letting users override a default for the duration of their session — for example, a temporary location override on a multi-location POS workflow.
* Wherever you want the user to see and change session-scoped values without writing custom JavaScript.

For variables you want to **initialise on load without a UI**, this block isn't the right fit — those typically come from URL parameters or workflow settings, not from a UI control.

## Settings

| Setting       | Description                                                                                                                                         |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Variables** | List of variable definitions, each with a `key` and a `label`. Opens an editor where you add, remove, and reorder the variables this block exposes. |

Each variable in the list has:

* **Key** — the internal variable name other blocks read (e.g. `currency`, `priceLevel`).
* **Label** — the human-readable label shown next to the input.

## How it works

At runtime:

1. The block reads each configured variable from its scope (user, workflow, location, subsidiary — resolved from session context).
2. Each variable renders as an editable input with its label.
3. When the user changes a value and saves, the new value is persisted to the appropriate scope.
4. Other blocks on the page that read those variable keys re-render with the new values.

{% hint style="info" %}
Variables are scoped — a value set against the *user* scope persists across that user's sessions, while a *workflow* scope value applies to everyone using that workflow. The scope is determined by the block's runtime context, not configured here.
{% endhint %}

## Examples

**Currency selector.** Configure a single variable `{ key: 'currency', label: 'Currency' }`. Place the Variables block at the top of a multi-currency catalog page. The Catalog Display block reads `currency` and filters product prices accordingly.

**Price level override.** Configure `{ key: 'priceLevel', label: 'Price Level' }`. On a B2B order form, this lets the user temporarily switch their pricing tier for the current session.

## Related

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Module Variables</strong></td><td>The full guide to session variables — scopes, sources, and consumers.</td><td><a href="/pages/S9QlmvCWJ8AOsDrFpQtz">/pages/S9QlmvCWJ8AOsDrFpQtz</a></td></tr><tr><td><strong>Action Dropdown</strong></td><td>An alternative way to set a variable based on user choice.</td><td><a href="/pages/QnHhhjGgNNkAnWGLpcTY">/pages/QnHhhjGgNNkAnWGLpcTY</a></td></tr><tr><td><strong>JavaScript</strong></td><td>For programmatic variable manipulation beyond simple editing.</td><td><a href="/pages/DEHisLtYVyC4YEOvJrO0">/pages/DEHisLtYVyC4YEOvJrO0</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.in8sync.com/client-admin-guide/active-workflows/getting-started/advanced-components/variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
