User Guide: Using Variables in Scripts
For: Campaign Managers, Script Designers
Last Updated: January 26, 2026
Table of Contents
- Introduction
- Quick Start
- Variable Syntax
- Standard Variables
- Custom Variables via Description Field
- CSV Upload with Variables
- Examples by Industry
- Best Practices
- Troubleshooting
Introduction
Variables allow you to personalize AI voice calls by inserting dynamic data into your scripts. Instead of generic greetings like βHello customerβ, you can say βHello John, Iβm calling about your Honda Cityβ.What Variables Can Do
β Personalize greetings with customer namesβ Reference specific products, policies, or orders
β Include custom data like appointment dates, locations
β Support multiple languages
β Make calls feel natural and relevant
Quick Start
Step 1: Add Variables to Your Script
In your script editor, use double curly braces:Step 2: Provide Values in CSV or Description
Option A: CSV UploadStep 3: AI Speaks Personalized Script
The AI will say:βHello John, Iβm calling from ABC Motors regarding your Honda City.β
Variable Syntax
Format
Variables use double curly braces:{{variable_name}}
Rules
| Rule | Example | Notes |
|---|---|---|
| Use lowercase with underscores | {{first_name}} β
| Not {{FirstName}} |
| No spaces inside braces | {{product_name}} β
| Not {{ product name }} |
| Letters, numbers, underscores only | {{order_id_123}} β
| Not {{order-id}} |
Valid Examples
Standard Variables
These variables are automatically available from your contact list:| Variable | Description | Example Value |
|---|---|---|
{{first_name}} | Contactβs first name | John |
{{last_name}} | Contactβs last name | Doe |
{{full_name}} | First + Last name | John Doe |
{{email}} | Contactβs email | john@example.com |
{{phone}} | Contactβs phone number | +1234567890 |
Usage in Script
Custom Variables via Description Field
For additional personalization, use the Description field when creating contacts or campaigns.β οΈ CRITICAL WARNING: PREVENTING HALLUCINATIONS When using custom variables (especially in segments), you MUST ensure that every contact has a valid description containing the required variables. If a proper description is not added, the AI may hallucinate or invent information to fill the missing script placeholders. This can lead to the AI stating incorrect names, dates, or details. To prevent this, always ensure your contact descriptions are complete and accurate before launching a campaign.
Format Options
Option 1: JSON Format (Recommended)
Option 2: Key-Value Format
Option 3: Equals Format
Using Custom Variables in Script
βHello John, Iβm calling from ABC Motors about your 2024 Honda Glamour. Your scheduled service date is February 15, 2026. Would this time work for you?β
CSV Upload with Variables
CSV Structure
Your CSV file should have columns matching the variable names:Column Name Mapping
| CSV Column | Variable in Script |
|---|---|
phone | Used for calling (required) |
first_name | {{first_name}} |
last_name | {{last_name}} |
email | {{email}} |
product_name | {{product_name}} |
appointment_date | {{appointment_date}} |
location | {{location}} |
Tips for CSV
- First row must be headers (column names)
- Phone column is required for making calls
- Use consistent naming -
first_namenotFirstNameorFirst Name - Avoid special characters in values that might confuse the AI
Examples by Industry
π Automotive - Service Reminder
Description Field:π₯ Healthcare - Appointment Reminder
Description Field:π¦ Banking - Loan Follow-up
Description Field:π¦ E-commerce - Order Delivery
Description Field:π Education - Admission Follow-up
Description Field:Best Practices
β DO
- Test your scripts with sample data before launching campaigns
-
Have fallbacks for missing variables:
If
first_nameis empty, the system will remove the placeholder gracefully. -
Keep variable names descriptive:
- Good:
{{appointment_date}},{{product_model}} - Bad:
{{x1}},{{data}}
- Good:
- Match CSV columns to variable names exactly
-
Use proper capitalization in values (not variable names):
- CSV value:
John(capitalized) - Variable:
{{first_name}}(lowercase)
- CSV value:
β DONβT
-
Donβt use spaces in variable names:
- Wrong:
{{first name}} - Right:
{{first_name}}
- Wrong:
-
Donβt use special characters:
- Wrong:
{{user-name}},{{product.type}} - Right:
{{user_name}},{{product_type}}
- Wrong:
- Donβt assume variables will always have values - design scripts to work even if some data is missing
- Donβt put sensitive data (passwords, full SSN) in variables
Troubleshooting
Variable Not Replaced
Problem: AI says{{first_name}} literally instead of the name.
Solutions:
- Check variable name spelling matches exactly
- Ensure CSV column header matches variable name
- Check Description field JSON is valid
- Look for typos in curly braces
Empty Variable
Problem: AI pauses awkwardly where variable should be. Solutions:- Ensure data exists in CSV/Description
- Check for empty cells in CSV
- System removes empty placeholders - rewrite script to flow naturally
Wrong Value Inserted
Problem: Wrong customer name or product mentioned. Solutions:- Verify CSV row matches the phone number
- Check for duplicate phone numbers
- Ensure Description field is unique per contact
Variable Appears Twice
Problem:{{first_name}} shows the name, then shows {{first_name}} as text.
Solution: Check for duplicate variable in script - maybe in a hidden node or edge.
Support
If you need help with script variables:- Check this documentation first
- Test with a sample contact before bulk campaigns
- Contact support with:
- Your script content
- Sample CSV row
- Description field value
- What the AI actually said
Quick Reference Card
Need more help? Contact info@qcall.ai

