Skip to main content

User Guide: Using Variables in Scripts

For: Campaign Managers, Script Designers
Last Updated: January 26, 2026

Table of Contents

  1. Introduction
  2. Quick Start
  3. Variable Syntax
  4. Standard Variables
  5. Custom Variables via Description Field
  6. CSV Upload with Variables
  7. Examples by Industry
  8. Best Practices
  9. 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 Upload
Option B: Description Field

Step 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

Valid Examples


Standard Variables

These variables are automatically available from your contact list:

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 tags), 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 2: Key-Value Format

Option 3: Equals Format

Using Custom Variables in Script

Result:
“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

Tips for CSV

  1. First row must be headers (column names)
  2. Phone column is required for making calls
  3. Use consistent naming - first_name not FirstName or First Name
  4. Avoid special characters in values that might confuse the AI

Examples by Industry

🚗 Automotive - Service Reminder

Description Field:
Script:

🏥 Healthcare - Appointment Reminder

Description Field:
Script:

🏦 Banking - Loan Follow-up

Description Field:
Script:

📦 E-commerce - Order Delivery

Description Field:
Script:

🎓 Education - Admission Follow-up

Description Field:
Script:

Best Practices

✅ DO

  1. Test your scripts with sample data before launching campaigns
  2. Have fallbacks for missing variables:
    If first_name is empty, the system will remove the placeholder gracefully.
  3. Keep variable names descriptive:
    • Good: {{appointment_date}}, {{product_model}}
    • Bad: {{x1}}, {{data}}
  4. Match CSV columns to variable names exactly
  5. Use proper capitalization in values (not variable names):
    • CSV value: John (capitalized)
    • Variable: {{first_name}} (lowercase)

❌ DON’T

  1. Don’t use spaces in variable names:
    • Wrong: {{first name}}
    • Right: {{first_name}}
  2. Don’t use special characters:
    • Wrong: {{user-name}}, {{product.type}}
    • Right: {{user_name}}, {{product_type}}
  3. Don’t assume variables will always have values - design scripts to work even if some data is missing
  4. 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:
  1. Check variable name spelling matches exactly
  2. Ensure CSV column header matches variable name
  3. Check Description field JSON is valid
  4. Look for typos in curly braces

Empty Variable

Problem: AI pauses awkwardly where variable should be. Solutions:
  1. Ensure data exists in CSV/Description
  2. Check for empty cells in CSV
  3. System removes empty placeholders - rewrite script to flow naturally

Wrong Value Inserted

Problem: Wrong customer name or product mentioned. Solutions:
  1. Verify CSV row matches the phone number
  2. Check for duplicate phone numbers
  3. 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:
  1. Check this documentation first
  2. Test with a sample contact before bulk campaigns
  3. 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