Virbe Documentation

Variables

Variables let you store and retrieve data across nodes and flows. User variables persist across sessions; conversation variables last for one session.

Variables are named, typed values that nodes can read and write throughout the Pipeline. They are the primary mechanism for passing data between flows, persisting user information, and making conditional decisions based on stored values.

Two Types of Variables

User Variables

User variables are persistent across conversations. Once a value is stored in a user variable, it is available the next time the same end user has a conversation. Use them for information that belongs to the user long-term.

Examples: email address, GDPR consent status, preferred language, loyalty tier, previous purchase

Conversation Variables

Conversation variables are scoped to the current session. They are reset when a conversation ends. Use them for information that is only relevant within a single conversation.

Examples: selected product, current topic, checkout step, form completion status


Variable Key Format

All variables are referenced in node fields using the format:

{{variable.keyName}}

For example, a user variable with key email is referenced as {{variable.email}}. A conversation variable with key gdpr is {{variable.gdpr}}.

You can insert variable references anywhere a node field accepts text – in system prompts, Tool Agent goals, webhook payloads, response text, and more. Use the Insert field picker (available in many nodes) to browse and insert available fields without typing the syntax manually.


Managing Variables

Open the Variables panel by clicking Variables at the bottom of the left sidebar.

The panel has two tabs:

User Variables Tab

Lists all user variables defined for this pipeline. Each entry shows:

  • Key – the reference key used in {{variable.keyName}} syntax
  • Name – a human-readable label
  • Description – what this variable is used for
  • Type – the data type (String, Number, Boolean, etc.)
  • Actions – Edit or Delete

Click + Create new variable to define a new user variable.

Conversation Variables Tab

Lists all conversation variables. Same fields and management options as User Variables.

Click + Create new variable to define a new conversation variable.


Creating a Variable

When creating a variable, fill in:

FieldDescription
NameHuman-readable label shown in the Variables panel
DescriptionWhat this variable stores (for your own reference)
TypeData type – typically String for text, but can be Number, Boolean, etc.
Hide in viewsThis is an advanced setting that prevents the variable from showing in the API.

After creating a variable, it appears in the Variables panel and is available in all nodes via the Insert field picker.


Reading Variables

Use the Check Variable node to read a variable's current value and branch logic based on it. For example:

  • Check {{variable.gdpr}} – branch: "consented" / "not consented" / "not set"
  • Check {{variable.email}} – branch: "has value" / "empty"

You can also insert variable values directly into text fields – for example, in a Text node: "Hello, {{variable.email}}! How can I help you today?"

Writing Variables

Use the Store Variable node to write a value into a variable. The value can come from:

  • AI node output (e.g., Tool Agent extracting an email from a conversation)
  • User input collected by Collect User Data
  • A hardcoded value
  • Another variable's value

The Insert Field Picker

Many nodes include an Insert field button that opens a field browser. This browser groups all available fields by category:

CategoryExamples
Variables{{variable.email}}, {{variable.gdpr}}
ConversationConversation ID, Language, Message ID, Profile ID, Title, Summary
MessageText Content, Text Language, Signal Name, Signal Value, Raw Text, SSML Text
ProfileProfile ID, Profile Name, Touchpoint, Profile Context
SourceConversation URL, Dashboard URL, Source Origin
FunctionsHistory (test), History (JSON), History (JSON, advanced)

Click any field to insert it at the cursor position. The picker ensures you never have to remember the exact syntax.


Best Practices

  • Use User Variables only for data you genuinely need to persist across sessions. Over-reliance on user variables can make conversations feel unexpectedly "sticky" from the user's perspective.
  • Keep variable keys short, lowercase, and snake_case (e.g., user_email, gdpr_consent).
  • Add a clear Description to every variable – this is invaluable when multiple people edit the pipeline.

On this page