> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.intractive.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Variables & Logic

You collected someone's name in your story. Now what? Variables are how you *use* that answer — to greet people by name, send them down a tailored path, or push their details straight into another tool. Here's how they work.

## What is a variable? 
A variable is a data end-point in your story: a little container that holds something a viewer gives you, like their name, email or the answers they pick. 

Once a value lands in a variable, you can reuse it anywhere:
* **Personalise the story** — show the viewer's name in a later text block.
* **Branch on it** — send viewers down different paths depending on their answers.
* **Send it onward** — pass the data to another tool, like your CRM or ATS.

## Where to find your variables
You'll find your variables in the story block and in the **Variables** tab. This tab is your single overview of every variable in the story, where you can rename or delete one whenever you need to.

![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-1_vecyn.png)
## Create a variable and fill it with an answer
Variables get their values from what viewers enter, so you create them right where you collect the data.

**Step 1: Add a data-collection block.** Add a **Form** or **Open Question** content block where you want to ask the viewer something. 
For example, a form asking for their name and email.

**Step 2: Open Logic and assign a variable.** Click the **Logic** button on the field and connect the entered answer to a variable. 
If you don't have one yet, create it here — give it a clear name like name or email.

![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-2_30587o.png)
![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-3_1fh3k0a.png)
### Use a variable in your story (personalisation)
Once you've collected an answer, you can reuse it anywhere in your story to make it feel personal. Say your second content block is a **Form** asking the viewer for their name and email — as they move on, you can drop those values straight into a later block, so the story greets them by name.

You reference a variable with double curly braces and an `@`:
`{{@variable}}`
So in this case that's `{{@name}}` and `{{@email}}`.

**Step 1: Collect the data.** Add a **Form** (or another data-collection block) where the viewer fills in the fields, and connect each field to a variable with the **Logic** button.

**Step 2: Show it later.** Add a **Text** block further along, and type the token where you want the value to appear. for example, "hey `{{@name}}`", we will reach out to you at `{{@email}}`

|| 💡 Set a fallback. When you assign the variable, add fallback text (like Buddy or Friend) that shows if the viewer left the field empty. It keeps your story reading smoothly even when there's no answer.

|| **Note — why is my variable empty in preview?** A variable only shows once its value is known. If you preview a *single* content block, the fields haven't been filled in yet, so the token stays empty. To test it properly, use the **full story preview** so you can actually fill in the required fields first.


![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-4_5rqlfi.png)
![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-5_1t2bt6r.png)
![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-6_18c2kq9.png)
## Use variables for logic and branching
Variables can also steer *where* a viewer goes, not just what they read. By collecting a score or a choice in a variable, you can build different paths that adapt to each viewer.
The block that does this is the **Logic branch** — an advanced branching block that routes viewers based on rules, conditions or scores, rather than a plain up-front choice.

| 💡Branch Choice vs Logic branch — don't mix them up. A Branch Choice block lets the viewer pick a path directly. A Logic branch decides the path for them, based on the values you've collected in variables. Reach for Logic branch when the route should depend on answers given earlier.

**Example — a personality-style quiz.** Say you want an internal quiz that sorts viewers into one of four categories:
**Step 1:** Build your questions with question blocks (**Poll**, **True or false**, **Multiple choice**, and so on).
**Step 2:** Create four variables — one per category (A, B, C, D).
**Step 3:** Connect each answer to a category variable, so choosing an answer tied to Category A scores a point for A.
**Step 4:** Add a **Logic branch** block after the questions, so all the answers come together in one place.
**Step 5:** Set up a path for each outcome. The viewer with the most points in Category A follows the Category A path, and so on.

![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-7_1nhxkdv.png)
![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-8_1kem7rg.png)
![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-9_599pk8.png)
## Send variables to another tool
The data you collect doesn't have to stay in the story, you can pass it to another tool through an integration. A classic example: sending a viewer's name and email straight to your recruitment ATS.

**Step 1: Collect the data.** Add a **Form** block, add the fields you need (for example name and email), and connect each field to a variable using the **Logic** button.
**Step 2: Open your integration.** Go to **Integrations** and select the one you're using. (In this example that's our **Tellent Recruitee** integration, but it could be any tool you've connected.)
**Step 3: Pick the variables to send.** Inside the integration you'll see all your variables listed next to the trigger conditions. Select the ones you want to send:, `@name` and `@email`.
**Step 4: Map the fields.** Use field mapping to match each variable to the matching field in the other tool.

![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-10_1om7bx5.png)
![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-11_nkzjzo.png)
![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-13_15cb1pg.png)
![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/c/4/afc4fa0dc4a39800/variables-logic-14_1dgnsm3.png)
## Ideas & Inspiration
* **Personalised recap.** Collect a name and a favourite topic early, then reference both in a closing text block for a tailored send-off.
* **Job or study matching.** Score answers across a few questions and use a **Logic branch** to route each viewer to the vacancy or course that fits them best.
* **Warm lead hand-off.** Gather contact details in a **Form** and push them into your CRM or ATS automatically, so follow-up is instant.
* **Adaptive quiz.** Sort viewers into categories based on their answers and reveal a different result path for each.