
Understanding Variables
Variables in QuickBot serve as data containers that can store:- User responses from user blocks (text, email, choices, etc.)
- External data from integrations (APIs, databases, etc.)
- System values (timestamps, user IDs, random values, etc.)
- Calculated values from custom scripts or logic blocks

Accessing Variables
In the flow editor blocks, you’ll find some fields with a icon. This field allows you to view the variables dropdown. This dropdown shows all available variables for use in the bot.- View all variables: See every variable declared in your bot.
- Search variables: Use the search bar to quickly find specific variables.
- Create new variables: Click the plus icon or type a new name to create variables.
- Insert variables: Click the variable and it will be inserted into the field.
- Edit variables: Click the edit icon to modify variable properties.
- Delete variables: Click the delete icon to remove the variable.

Creating Variables
From Input Blocks
The most common way to create variables is by configuring user blocks:- Add an user block (Text Input, Email, Buttons, etc.)
- Open the block settings
- Select “Save answer in a variable”
- Choose an existing variable or type a new name to create one
- User responses will automatically be stored in the variable

From Variables Panel
Create variables directly in the Variables tab:- Open Variables tab in the Flow editor sidebar
- Type a new variable name in the search box
- Click “Create variable” when prompted
- Configure variable properties in the edit modal

Using Set Variable Block
For advanced variable management, use the Set Variable logic block:- Drag a Set Variable block onto the canvas
- Choose or create a variable to modify
- Select the value type:
- Custom: Text or JavaScript expressions
- System variables: Access built-in system values
- List operations: Append, pop, or manipulate arrays
- Data mapping: Transform data from other variables
System Variables
QuickBot provides built-in system variables that give you access to contextual information about the conversation, user, and environment. These variables are automatically available and can be referenced directly using the{{system_variableName}} syntax.
Available System Variables
Date and Time
{{system_today}}: Current date (YYYY-MM-DD format){{system_now}}: Current date and time (ISO 8601 format){{system_yesterday}}: Previous day’s date{{system_tomorrow}}: Next day’s date{{system_momentOfTheDay}}: Time-based greeting value:morning,afternoon,evening, ornight
Session Information
{{system_randomId}}: Unique random identifier (CUID algorithm){{Conversation}}: Complete conversation transcript including all messages exchanged
Environment Context
{{system_platform}}: Platform identifier (weborwhatsapp){{system_device}}: Device type (mobileordesktop)
WhatsApp-Specific Variables
Available only when the conversation is on WhatsApp:{{system_whatsapp_number}}: User’s WhatsApp phone number{{system_whatsapp_name}}: User’s WhatsApp contact name
Using System Variables
System variables can be used anywhere regular variables are accepted: In text bubbles:System Variable Characteristics
- Read-only: System variables are automatically populated and cannot be manually modified
- Always available: No need to create or initialize them
- Real-time: Values are computed at runtime based on the current context
- Not saved in results: Most system variables are not persisted in the results table by default
- No initialization required: Ready to use immediately without any setup
Using Variables in Your Bot
Basic Variable Syntax
Display variable content using double curly braces:{{varName}}, welcome back!”
Inline Variable Formatting
Transform variables using JavaScript expressions:- Uppercase:
{{={{Name}}.toUpperCase()=}} - Lowercase:
{{={{Name}}.toLowerCase()=}} - First item of list:
{{={{Items}}[0]=}}or{{={{Items}}.at(0)=}} - Last item of list:
{{={{Items}}.at(-1)=}} - List length:
{{={{Items}}.length=}} - Date formatting:
{{=new Date({{Date}}).toLocaleDateString()=}}
Variable Types and Operations
Variables support these data types:- String: Single text values
- Array: Lists of text values
- Mixed: Automatically converted to string representation
Variable Properties
Save in Results
Control whether variables appear in your results export:- Enabled: Variable values appear as columns in results
- Disabled: Variables are used internally but not exported
- Use case: Enable for important data, disable for temporary calculations
Secret Variables
Mark variables as secret to protect sensitive information:- Secret variables are not saved in results
- Cannot be exported or viewed in the results panel
- Ideal for: API keys, personal data, temporary tokens
- Visual indicator: Lock icon appears next to secret variables
Advanced Variable Concepts
Prefilled Variables
Initialize variables before the conversation starts: URL Parameters:%20 in URLs)
Embed Library:
Save variables in results
You can also use save variables in results for internal tracking like:- Marketing: UTM parameters, campaign IDs
- User context: Session IDs, referrer information
- System data: Timestamps, environment variables
- Analytics: Custom event tracking, user segments
- Track marketing campaign effectiveness
- Store user authentication data
- Maintain session context across conversations
- Collect analytics without user input
Variable Validation and Types
Variables automatically handle type conversion: Valid types:Variable Best Practices
Naming Conventions
- Use descriptive names: “User Email” instead of “email”
- Be consistent: Use the same case style throughout
- Avoid special characters: Stick to letters, numbers, and spaces
- Group related variables: “Address Line 1”, “Address Line 2”
Organization
- Delete unused variables to keep your bot clean
- Use secret variables for sensitive data
- Enable “Save in Results” only for variables you need to export
- Group variables logically in your variable names
Performance
- Avoid deeply nested objects in variables
- Use arrays efficiently with proper indexing
- Clean up temporary variables when no longer needed
- Test variable transformations to ensure correct output
Troubleshooting Variables
Common Issues
Variable not displaying:- Check variable name spelling and case
- Ensure variable has been created and assigned a value
- Verify variable syntax:
{{varName}}
- Test JavaScript expressions in Set Variable block first
- Check for typos in transformation code
- Ensure proper escape characters for special content
- Enable “Save in Results” in variable properties
- Check that variable isn’t marked as secret
- Verify variable has collected values from users
Set Variable Block
Learn how to manipulate and calculate variable values
Logic Blocks
Use variables in conditional logic and flow control