Variables
Variables store and manage data throughout your conversational flow. They allow you to capture user inputs, store intermediate values, and pass data between nodes.
Variable Types
The builder supports seven variable types, each designed for specific data needs:
String
Text values of any length. Use for names, addresses, free-form responses, and any textual data.
Examples: User name, email content, custom messages
Number
Numeric values including integers and decimals. Use for amounts, quantities, scores, and calculations.
Examples: Loan amount, age, credit score
Date
Date and time values. Use for scheduling, deadlines, and temporal data.
Examples: Birth date, appointment date, deadline
Boolean
True/false values. Use for flags, toggles, and binary states.
Examples: Is verified, has accepted terms, is eligible
Object
Complex structured data with key-value pairs. Use for storing related data together.
Examples: User profile data, API response objects
Array
Ordered lists of values. Use for collections, multiple selections, and lists.
Examples: Selected options, list of documents, phone numbers
Attachment
File references and attachments. Use for documents, images, and uploaded files.
Examples: ID document, profile photo, signed contract
Variable Scope
All variables have global scope within the flow. This means:
- Variables created in any node are accessible from all other nodes
- Variable values persist throughout the flow execution
- Variables are reset when a new flow session starts
Naming Rules
Variable names must follow specific rules:
Format Requirements
- Must start with a letter (a-z, A-Z) or underscore (_)
- Can contain letters, numbers (0-9), and underscores
- Cannot contain spaces or special characters
- Case-sensitive (
userNameandusernameare different variables)
Valid Names
Invalid Names
Reserved Names
Certain variable names are reserved by the system and cannot be used:
System Reserved Names
| Name | Purpose |
|---|---|
phone | User's phone number (auto-populated) |
name | User's name (auto-populated) |
now | Current timestamp |
today | Current date |
liveness_id | Liveness verification identifier |
Conversation Reserved Names
| Name | Purpose |
|---|---|
borrower_id | Identifier for the borrower entity |
metadata | Conversation metadata object |
Attempting to create variables with these names will result in an error.
Variable Usage Analysis
The builder provides tools to analyze how variables are used in your flow:
Usage Indicators
- Set in: Nodes where the variable value is assigned
- Used in: Nodes where the variable value is read
Warning Indicators
| Indicator | Meaning | Recommendation |
|---|---|---|
| Unused | Variable is not used in any node | Consider removing it |
| Not Set | Variable is used but never assigned a value | Add a node to set its value |
Best Practices
Naming Conventions
- Use descriptive names:
user_full_nameinstead ofxortemp - Use consistent casing: choose either
snake_caseorcamelCaseand stick with it - Prefix related variables:
user_name,user_email,user_phone
Organization
- Document the purpose of complex variables
- Remove unused variables to keep the flow clean
- Group related data in objects when appropriate
Type Selection
- Choose the most specific type for your data
- Use
numberfor values that need calculations - Use
datefor temporal data (not string) - Use
objectfor structured data from API responses