Skip to main content

Overview

Variable Source & Formatting allows you to:
  1. Format Variables - Control how numbers, dates, and times are spoken
  2. Source from CRMs - Pull variable values from integrated systems like LeadSquared or HubSpot
This ensures your agent speaks data in a natural, human-friendly way and can access customer information from your CRM during calls.

How It Works

For each variable in your system prompt (like {{customer_name}} or {{order_amount}}), you can: 1. Set Format: How the value should be spoken
Variable: order_amount = 2500
Format: [Number] Nearest Thousands
Agent says: "Your order is for two thousand five hundred rupees"
2. Set Source: Where to get the value from
Variable: customer_name
Source: LeadSquared
Key: ProspectFirstName
Agent gets: Value from your LeadSquared CRM

Variable Formatting

Number Formats

Format: [Number] Full WordsUse For: Exact amounts, prices, quantitiesExamples:
2500 → "two thousand five hundred"
15000 → "fifteen thousand"
125000 → "one lakh twenty-five thousand"
Format: [Number] Nearest HundredsUse For: Approximate amounts, quick estimatesHow It Works: Rounds to nearest 100Examples:
2459 → Rounds to 2500 → "two thousand five hundred"
15723 → Rounds to 15700 → "fifteen thousand seven hundred"
987 → Rounds to 1000 → "one thousand"
Format: [Number] Nearest ThousandsUse For: Large amounts, simplified pricingHow It Works: Rounds to nearest 1,000Examples:
2459 → Rounds to 2000 → "two thousand"
15723 → Rounds to 16000 → "sixteen thousand"
125890 → Rounds to 126000 → "one lakh twenty-six thousand"
Format: [Number] Nearest LakhsUse For: Indian numbering system, real estate, salariesHow It Works: Rounds to nearest 1,00,000 (1 lakh)Examples:
145000 → Rounds to 100000 → "one lakh"
2456789 → Rounds to 2500000 → "twenty-five lakhs"
10234567 → Rounds to 10000000 → "one crore"

Date Formats

Format: [Date] DayInput: ISO date format (YYYY-MM-DD)Examples:
2024-12-25 → "Twenty-fifth"
2024-01-01 → "First"
2024-03-21 → "Twenty-first"
Format: [Date] Day MonthInput: ISO date format (YYYY-MM-DD)Examples:
2024-12-25 → "Twenty-fifth December"
2024-01-01 → "First January"
2024-03-21 → "Twenty-first March"
Format: [Date] Day Month YearInput: ISO date format (YYYY-MM-DD)Examples:
2024-12-25 → "Twenty-fifth December Twenty twenty-four"
2024-01-01 → "First January Twenty twenty-four"
2015-06-15 → "Fifteenth June Twenty fifteen"

Time Formats

Format: [Time] Hour Minute AM/PMInput: ISO datetime format (YYYY-MM-DDTHH:MM:SS) or just timeExamples:
2024-12-25T14:30:00 → "Two thirty pm"
2024-01-15T09:15:00 → "Nine fifteen am"
2024-06-10T00:00:00 → "Twelve am"

DateTime Formats

Format: [DateTime] Full SentenceInput: ISO datetime format (YYYY-MM-DDTHH:MM:SS)Output: Time, on Day, Date Month, YearExamples:
2024-12-25T14:30:00 → "Two thirty pm, on Wednesday, Twenty-fifth December, Twenty twenty-four"
2024-01-01T09:00:00 → "Nine am, on Monday, First January, Twenty twenty-four"
Format: [DateTime] Sentence Without YearInput: ISO datetime format (YYYY-MM-DDTHH:MM:SS)Output: Time, on Day, Date MonthExamples:
2024-12-25T14:30:00 → "Two thirty pm, on Wednesday, Twenty-fifth December"
2024-01-01T09:00:00 → "Nine am, on Monday, First January"
Format: [DateTime] Hour Minute AM/PMInput: ISO datetime format (YYYY-MM-DDTHH:MM:SS)Examples:
2024-12-25T14:30:00 → "Two thirty pm"
2024-01-01T09:00:00 → "Nine am"
Format: [DateTime] DayInput: ISO datetime format (YYYY-MM-DDTHH:MM:SS)Examples:
2024-12-25T14:30:00 → "Twenty-fifth"
2024-01-01T09:00:00 → "First"
Format: [DateTime] Day MonthInput: ISO datetime format (YYYY-MM-DDTHH:MM:SS)Examples:
2024-12-25T14:30:00 → "Twenty-fifth December"
2024-01-01T09:00:00 → "First January"
Format: [DateTime] Day Month YearInput: ISO datetime format (YYYY-MM-DDTHH:MM:SS)Examples:
2024-12-25T14:30:00 → "Twenty-fifth December Twenty twenty-four"
2024-01-01T09:00:00 → "First January Twenty twenty-four"

CRM Integration Sourcing

Pull variable values from your integrated CRM systems.

Supported Integrations

Purpose: Source customer data from LeadSquared CRMSetup:
  1. Connect LeadSquared integration
  2. Select variable
  3. Choose “LeadSquared” as source
  4. Select field from dropdown (auto-loaded from your LeadSquared)

Configuration

1

Navigate to Variable Source

In your agent configuration, find the Variable Source and Pre Format section
Variables from your system prompt (like {{customer_name}}) automatically appear in the list
2

Click Edit on a Variable

Click the Edit button next to any variable you want to configure
3

Set Format

Format: Choose how the variable should be spoken
  • Select “No” for no formatting (default)
  • Select appropriate format based on data type
Examples:
  • order_amount[Number] Full Words
  • appointment_date[Date] Day Month Year
  • delivery_time[Time] Hour Minute AM/PM
4

Set Source (Optional)

If you have CRM integrations:Source: Select integration (LeadSquared, HubSpot, etc.)Key Value: Select the field from your CRM
If you don’t select a source, the variable uses the value from call metadata (passed via API).
5

Save

Click “Save” to apply the configuration

Special Variables

Phone Number Formatting

For the user_phone_number variable, you have an additional option: Format as Indian:
  • Automatically adds 91 prefix for 10-digit numbers
  • Converts 9876543210 to 919876543210
Use When:
  • Making outbound calls to Indian phone numbers
  • Need international format for Indian numbers
  • All your customers have Indian phone numbers
Important: If “Format as Indian” is enabled, calls will NOT be placed to non-Indian numbers. Only enable this if you are exclusively calling Indian phone numbers.
Behavior:
  • 10-digit number (e.g., 9876543210) → Automatically adds 91 prefix → Call placed to 919876543210
  • Non-Indian number (e.g., 14155552671) → Call will not be placed
Only enable “Format as Indian” if you are certain all phone numbers in your system are Indian (10-digit format). For international calling, leave this option disabled and ensure phone numbers include the country code.

Use Cases

E-commerce Order Confirmation

Variables:
{{customer_name}}
Format: No
Source: LeadSquared → ProspectFirstName

{{order_amount}}
Format: [Number] Full Words
Source: (from call metadata)

{{delivery_date}}
Format: [Date] Day Month
Source: (from call metadata)
Agent says: “Hi Rajesh, your order for two thousand five hundred rupees will be delivered on twenty-fifth December”

Appointment Booking

Variables:
{{customer_name}}
Format: No
Source: HubSpot → firstname

{{appointment_date}}
Format: [DateTime] Sentence Without Year
Source: (from call metadata)
Agent says: “Hello Sarah, your appointment is on fifteenth January at three thirty PM”

Loan Application

Variables:
{{applicant_name}}
Format: No
Source: LeadSquared → ProspectFirstName

{{loan_amount}}
Format: [Number] Nearest Lakhs
Source: (from call metadata)

{{application_id}}
Format: No
Source: (from call metadata)
Agent says: “Dear Amit, your loan application for five lakhs has been received. Your application ID is A-B-C-one-two-three-four”

Best Practices

Choose formats that sound natural for your use caseGood:
  • Price → [Number] Full Words (“two thousand five hundred”)
  • Large numbers → [Number] Nearest Lakhs (“five lakhs”)
  • Dates → [Date] Day Month (“twenty-fifth December”)
Avoid:
  • Price → [Number] Nearest Hundreds (sounds imprecise)
  • Appointment → [Date] Day only (missing month context)
Use Test Call to hear how formatted variables soundProcess:
  1. Configure format
  2. Run test call with sample data
  3. Listen to how agent speaks the value
  4. Adjust format if needed
When CRM fields change:
  1. Review variable mappings
  2. Update field selections
  3. Test with live data
Apply the same format to similar variablesExample:
order_amount → [Number] Full Words
discount_amount → [Number] Full Words
total_amount → [Number] Full Words

Troubleshooting

Possible Causes:
  • Format set to “No”
  • Variable value is not in expected format
  • Data type mismatch
Solutions:
  1. Verify format is selected (not “No”)
  2. Check variable value is correct type (number for number formats, date for date formats)
  3. Test with sample values
Issue: Can’t see CRM fields in dropdownCauses:
  • Integration not connected
  • Integration permissions issue
  • API connection problem
Solutions:
  1. Verify CRM integration is connected in Integrations page
  2. Check integration has read permissions for contacts/leads
  3. Try reconnecting integration
  4. Contact support if persistent
Issue: Agent speaks wrong customer dataCauses:
  • Wrong field mapped
  • Customer not found in CRM
  • Field empty in CRM
Solutions:
  1. Verify correct CRM field is selected
  2. Check customer exists in CRM with matching phone/email
  3. Ensure CRM field has data
  4. Review call logs for CRM lookup results
Issue: Date pronunciation is awkwardExamples:
Wrong format: "two zero two four twelve twenty-five"
Right format: "twenty-fifth December twenty twenty-four"
Solution: Use appropriate date format:
  • [Date] Day Month Year for full dates
  • [Date] Day Month for dates in current year

Advanced Configuration

Custom Variable Addition

You can add custom variables not in your system prompt:
1

Click + Button

Click the ”+” button below the variable list
2

Enter Variable Name

Type the variable name (will be available as {{variable_name}})
3

Configure Format and Source

Set format and CRM source as needed
4

Use in System Prompt

Add the variable to your system prompt to use it

Getting Help

Test Formatting

Use Test Call to verify variables are formatted and sourced correctly

Contact Support

Our team can help configure CRM integrations and variable formatting