# Variables and contacts

> How flows remember answers, what a contact keeps across conversations, and every built-in value you can use in a message.

Flows remember things in **variables**: the answer to a question, a choice, a field from your API. You use them in any text by writing their name in double braces, like `{{party_size}}`, and steps such as [Condition](https://nomongeta.zenhalab.com/www/nomongeta/en/docs/flow-builder/condition) decide on them.



## Declaring variables

Open **Variables** in the builder's toolbar. Each variable has:

- a **Name**: lowercase letters, digits and underscores, starting with a letter (`order_id`). Renaming one updates every step that uses it.
- a **Type**: Text, Number, Yes / no, Date or Data (JSON). Values are converted to it when saved: "1.234,56" or "1,234.56" become a number, "yes", "sim" or "sí" become yes, "02/10/2026" becomes the date 2 October 2026 (day first).
- where it's **Kept**: for this conversation, or on the contact.
- optionally a default value and a description.

You rarely need to start there: questions, buttons, AI steps and web requests offer **New variable…** right where you pick where to save.

> [!TIP]
> The panel says how many times each variable is used. One that isn't used anywhere gets a warning; deleting one that is still used shows errors on those steps until you change them.

## For this conversation, or on the contact

| Kept | Lives | Use it for |
| --- | --- | --- |
| for this conversation | One run of the flow. Gone when the run ends. | Answers you only need now: a menu choice, a search result. |
| on the contact | On the person, across conversations and across flows. | Things worth remembering: their e-mail, plan, preferences, last score. |

Contact variables are shared by name: if two flows both declare `email` kept on the contact, they read and write the same value. When a run starts, every contact variable it declares is filled from the contact.

## Built-in values

Always available, read-only:

| Value | Is |
| --- | --- |
| `{{contact.name}}` | The contact's name (from WhatsApp or e-mail, or saved by a flow). |
| `{{contact.address}}` | Phone number or e-mail |
| `{{contact.channel}}` | The channel they write from |
| `{{contact.tags}}` | The contact's tags |
| `{{contact.id}}` | The contact's id |
| `{{sys.input}}` | The contact's last message |
| `{{sys.now}}` | Date and time now (UTC, ISO 8601). |
| `{{sys.today}}` | Today's date (`2026-10-02`). |
| `{{sys.time}}` | The time now (`14:30`). |
| `{{sys.weekday}}` | Day of the week (`mon` … `sun`). |
| `{{sys.flowName}}` | This flow's name |
| `{{conversation.id}}` | The conversation's id |

`sys.today`, `sys.time` and `sys.weekday` use the time zone of the flow's business hours (in **Flow settings**), or your business's time zone when none are set.

## Writing variables into text

- `{{name}}` is replaced by the value as text. An empty variable becomes nothing.
- A name that doesn't exist is left exactly as written, and the builder flags it before you publish.
- For data (JSON) variables, reach inside with dots: `{{order.items.0.name}}`.
- Values are inserted as plain text, never run as code, and each channel escapes them as it needs.

## Contacts

A **contact** is someone who wrote to you. Ñomongeta creates one the first time an address writes in, and keeps their name, their address, the time of their last message, their **tags** and their contact variables.

- On **WhatsApp** the contact is the phone number, on **e-mail** the sender's address: the same person writing again, in a new conversation, is the same contact, with everything the flows saved about them.
- On the **website chat**, visitors are anonymous: each widget conversation has a contact of its own, so nothing carries over from one visit to the next.
- The same person on WhatsApp and by e-mail is two contacts.

The [Update contact](https://nomongeta.zenhalab.com/www/nomongeta/en/docs/flow-builder/contact-update) step tags people and saves their details; [Condition](https://nomongeta.zenhalab.com/www/nomongeta/en/docs/flow-builder/condition) can branch on `contact.tags`.

Tags compare ignoring case and accents: `VIP`, `vip` and `Vip` are the same tag.
