Lead Management User Guide

Beginner

The Lead Management system allows you to upload, organize, and automatically call leads using AI-powered calling agents. This guide covers everything you need to know to effectively manage your leads, from adding them to tracking their status through the calling process.

Lead Management User Guide

The Lead Management system allows you to upload, organize, and automatically call leads using AI-powered calling agents. This guide covers everything you need to know to effectively manage your leads, from adding them to tracking their status through the calling process.

Key Features

  • Bulk Upload: Import leads via CSV files
  • Manual Entry: Add leads one at a time
  • Custom Fields: Add your own data fields to leads
  • Automatic Calling: System automatically calls leads based on your schedule
  • Smart Retry: Automatically retries failed calls after a delay
  • Real-time Updates: See call status in real-time as agents process leads
  • Comprehensive Reporting: Track metrics and outcomes for all leads

💡 Tip: Before you start, make sure you have set up at least one calling provider (Retell or Vapi) in your account settings. You'll need this to make calls.

Getting Started: Adding Leads

Method 1: Manual Entry

  1. Go to the Add Leads section
  2. Click "Add Lead" button
  3. Fill in the required information:
    • Name: Contact's full name
    • Phone: Phone number (must be in E.164 format, e.g., +1234567890)
    • Email: Contact's email address
    • Company: Company name (optional)
  4. Add any custom fields if needed
  5. Click "Save"

Method 2: CSV Import

  1. Go to the Add Leads section
  2. Click "Import CSV" button
  3. Download the template CSV file (optional, but recommended)
  4. Fill in your lead data:
    • Required columns: Name, Phone, Email
    • Optional columns: Company, Timezone
    • Custom field columns: Add any additional columns
  5. Upload your CSV file
  6. Map your columns to the system fields
  7. Review and confirm the import

📱 Phone Number Format

Phone numbers must be in E.164 format:

  • Must start with + followed by country code
  • Example: +12125551234 (US)
  • Example: +447911123456 (UK)
  • Example: +8801977317066 (Bangladesh)

Invalid formats will cause the lead to be marked as "failed"

Understanding Lead Statuses

Your leads can be in one of five statuses. Understanding these statuses helps you track your calling progress:

Pending

Ready to Call

Meaning: Lead is ready to be called right now

When: Newly added leads start in this status, or leads that have waited for their retry delay period

Action: System will automatically call these leads when auto-calling is enabled

In-Progress

Call Active

Meaning: A call is currently happening for this lead

When: System has initiated a call and is waiting for it to complete

Action: Wait for the call to finish. Status will automatically update

Retry

Waiting for Retry Delay

Meaning: Call was unsuccessful, waiting for retry delay to pass before trying again

When: Call was not answered (no answer, busy, voicemail), failed temporarily, or lead hasn't reached max attempts yet

Action: System will automatically retry after the configured delay

Completed

Finished

Meaning: Lead has reached the end of the calling process

When: Call was successfully connected (person answered) or maximum call attempts reached

Action: No further calls will be made. Review call results in call history

Failed

Permanent Error

Meaning: Lead has a permanent issue that prevents calling

When: Invalid phone number format, phone number doesn't exist, or other permanent errors

Action: Fix the lead information (especially phone number) and manually change status back to "pending"

How Lead Statuses Change

Understanding the flow helps you know what to expect:

Status Flow Diagram

New Lead Added
    ↓
[Pending] ← Ready to call
    ↓
Call Initiated
    ↓
[In-Progress] ← Call happening now
    ↓
Call Ends
    ↓
    ├─→ Person Answered → [Completed] ✅
    │
    ├─→ No Answer/Busy/Voicemail → [Retry] → Wait for delay → [Pending]
    │                                                              ↑
    └─→ Max Attempts Reached → [Completed] ✅                    │
                                                                  │
    └─→ Invalid Phone Number → [Failed] ❌                       │
                                                                  │
    └─→ Permanent Error → [Failed] ❌                            │
                                                                  │
    └─→ Temporary Error → [Pending] → Retry immediately ────────┘

Detailed Status Transitions

Pending → In-Progress

When: System selects the lead for calling

  • Auto-calling is enabled
  • Lead is within calling hours (if schedule is set)
  • System has available call slots
  • Lead hasn't reached max attempts

What Happens: Status changes to "in-progress", call attempt counter increases, and call is initiated

In-Progress → Retry

When: Call ends but person didn't answer

  • Call went to voicemail
  • Person was busy
  • No answer
  • Call failed for temporary reason

What Happens: Status changes to "retry", and lead waits for the configured retry delay period

In-Progress → Completed

When: Call was successful or max attempts reached

What Happens: Status changes to "completed", no more calls will be made, and call transcript/summary becomes available

In-Progress → Failed

When: Permanent error occurs

  • Invalid phone number format
  • Phone number doesn't exist
  • Other permanent errors from provider

What Happens: Status changes to "failed", lead is moved to failed list, and you can fix and reactivate it

Retry → Pending

When: Retry delay period has passed

What Happens: System automatically checks every 2 minutes. If retry delay has passed and lead hasn't reached max attempts, status changes back to "pending" for next attempt

Provider-Specific Guides

Using Retell

Retell is designed to automatically make all your lead information available to the AI agent during calls.

How Lead Data Works with Retell

Automatic Data Transmission
  • All standard fields are automatically sent
  • All custom fields are automatically sent
  • No configuration needed
Standard Fields Sent to Retell
Field NameDescription
customer_nameFull name
first_nameFirst name only
last_nameLast name only
email_addressEmail
phone_numberPhone number
company_nameCompany
timezoneTimezone
Best Practices for Retell
  1. Create descriptive custom field names (they'll be used as variable names)
  2. Ensure phone numbers are in correct E.164 format
  3. Fill in as much information as possible - the AI can use it all
  4. Custom fields are automatically available - no template configuration needed
⚙️ Retell Configuration Requirements
  • Phone Number: Must have a phone number configured in agent settings
  • Agent ID: Can use Retell's external agent ID or system's inline configuration
  • API Key: Must have Retell API credentials configured

Using Vapi

Vapi uses a template-based approach where you control exactly what information is included in your agent's messages.

How Lead Data Works with Vapi

Template-Based Data Usage

Lead data is only used if you reference it in your agent's message templates. Use placeholder syntax: {{field_name}} to include lead information.

If you don't reference a field, it won't be sent to Vapi

Available Placeholders
Standard Fields
{{name}}Full name
{{first_name}}First name only
{{last_name}}Last name only
{{email}}Email address
{{phone}}Phone number
{{company}}Company name
{{timezone}}Timezone
Custom Fields

Use {{your_custom_field_name}} for any custom field you created

  • Example: If field is "address", use {{address}}
  • Example: If field is "job_title", use {{job_title}}
Where to Use Placeholders
First Message (Opening Line)
Hi {{name}}, I'm calling from {{company}} about your inquiry.
System Prompt (Agent Instructions)
You are calling {{name}} at {{company}}. Their email is {{email}}. Their address is {{address}} if available.
Voicemail Message
Hi {{name}}, this is a message for you regarding {{company}}.
⚠️ Important Notes for Vapi
  • Custom fields are ONLY included if you use placeholders in your templates
  • If you don't reference a custom field, it won't be available during the call
  • Standard fields also need to be referenced if you want them in messages
  • Placeholders are case-sensitive - use exact field names
⚙️ Vapi Configuration Requirements
  • Assistant Configuration: Can use Vapi's external assistant ID or configure inline
  • First Message: Required if using inline configuration
  • System Prompt: Recommended for better call quality
  • API Key: Must have Vapi API credentials configured

Custom Fields Guide

Custom fields allow you to add your own data to leads beyond the standard fields (Name, Phone, Email, Company, Timezone).

Creating Custom Fields

  1. Go to SettingsCustom Fields
  2. Click "Add Custom Field"
  3. Enter:
    • Field Name: The name of your field (e.g., "Address", "Job Title", "Product Interest")
    • Field Type: Text, Number, Date, etc.
  4. Save the custom field

Using Custom Fields

For Retell Users

  • Custom fields are automatically sent to Retell
  • No configuration needed
  • AI agent can access them during calls
  • Use descriptive field names

For Vapi Users

  • Must reference custom fields in message templates
  • Use {{your_field_name}} syntax
  • Example: If field is "address", use {{address}}
  • If not referenced, the field won't be available

Custom Field Best Practices

  1. Use Clear Names: Field names should be descriptive and easy to understand
  2. Be Consistent: Use the same field names across all leads
  3. Fill Complete Data: More information helps the AI agent have better conversations
  4. For Vapi: Remember to add placeholders in your agent templates if you want to use custom fields

Retry System Explained

The retry system automatically attempts to call leads again if the first call doesn't connect, helping you reach more people while respecting their time.

How Retry Works

  1. First Call Attempt: Lead is called
  2. If Unsuccessful: Status changes to "retry" and system waits for retry delay
  3. After Delay: Status changes to "pending" for next attempt
  4. Repeat: Until successful OR max attempts reached

Retry Delay Configuration

Where to Set: Settings → Calling Configuration

Options:

  • Minimum: 1 hour
  • Maximum: 168 hours (7 days)
  • Default: Usually 1-2 hours

What It Means: Longer delays = fewer calls per day, but less intrusive

Maximum Call Attempts

Where to Set: Settings → Calling Configuration

What It Means: System will try calling this many times before giving up

Example: If set to 3, system tries 3 times total. After max attempts, lead status changes to "completed" (even if never answered)

When Leads Are Retried

Automatic Retries Happen For

  • No answer
  • Busy signal
  • Voicemail
  • Temporary network errors
  • Other temporary failures

Leads Are NOT Retried For

  • Invalid phone number (marked "failed")
  • Phone doesn't exist (marked "failed")
  • Other permanent errors

Retry Status Visibility

In the lead details panel, you can see:

1
Attempts Made: How many times the lead has been called
2
Attempts Remaining: How many more attempts will be made
3
Time Until Next Retry: Countdown showing when the next attempt will happen
4
Last Called: When the last call attempt was made

Best Practices

Phone Number Management

  1. Always Use E.164 Format: Start with + followed by country code
  2. Verify Before Uploading: Check phone numbers are valid and include country codes
  3. Handle Invalid Numbers: Check "Failed" status leads regularly, fix phone numbers, and change status back

Lead Information

  1. Complete Data: Fill in as much information as possible - more data means better AI conversations
  2. Custom Fields: Use for important information (address, job title, product interest, etc.)

Calling Schedule

  1. Set Appropriate Hours: Respect leads' time zones, avoid too early or too late
  2. Retry Delay: Start with 1-2 hours for faster follow-up, increase to 24+ hours for less frequency
  3. Max Attempts: 2-3 attempts usually sufficient - balance persistence with respect

Provider Selection

Choose Retell If

  • You want all lead data automatically available
  • You don't want to manage message templates
  • You prefer simpler configuration

Choose Vapi If

  • You want full control over message content
  • You want to customize exactly what information is shared
  • You prefer template-based configuration

Troubleshooting

Lead Stuck in "Pending"

Possible Causes:

  • • Auto-calling is disabled
  • • Outside of calling hours (if schedule is set)
  • • No agent selected
  • • System has reached max concurrent calls

Solutions:

  1. Check Settings → Auto-calling is enabled
  2. Verify calling schedule allows calls now
  3. Ensure an agent is selected
  4. Wait for current calls to complete

Lead Stuck in "In-Progress"

Possible Causes:

  • • Call is actually still happening
  • • Call completed but webhook hasn't updated status
  • • System error

Solutions:

  1. Wait 5-10 minutes (calls can take time)
  2. Check call history to see if call completed
  3. System automatically cleans up stale "in-progress" leads after 2 hours

Lead Marked as "Failed"

Possible Causes:

  • • Invalid phone number format
  • • Phone number doesn't exist
  • • Permanent error from provider

Solutions:

  1. Check lead details for error message
  2. Fix phone number format (must be E.164: +countrycode+number)
  3. Verify phone number is correct
  4. Change status back to "pending" after fixing

Lead Not Retrying

Possible Causes:

  • • Retry delay hasn't passed yet
  • • Maximum attempts already reached
  • • Lead is in "failed" status (won't retry)

Solutions:

  1. Check "Time Until Next Retry" in lead details
  2. Verify lead hasn't reached max attempts
  3. If in "failed" status, fix the issue and manually change to "pending"

Custom Fields Not Working (Vapi)

Possible Causes:

  • • Custom field not referenced in templates
  • • Wrong placeholder syntax
  • • Field name doesn't match

Solutions:

  1. Add {{your_field_name}} to first message or system prompt
  2. Check field name matches exactly (case-sensitive)
  3. Verify custom field has data for the lead

Custom Fields Not Working (Retell)

Possible Causes:

  • • Custom field name has special characters
  • • Field value is empty

Solutions:

  1. Custom fields should work automatically - check field has data
  2. Use simple field names (letters, numbers, underscores)
  3. Verify custom field is saved for the lead

Understanding Error Messages

Common Error Types:

  • • Invalid phone number format (E.164 required)
  • • Phone number not registered in account
  • • Agent configuration errors
  • • API key invalid or missing
  • • Rate limit exceeded

Solutions:

  1. Check the Error Classification Guide section for detailed explanations
  2. Verify phone numbers are in E.164 format: +14155551234
  3. Check API keys in environment variables
  4. Verify agent configuration in provider dashboard
  5. For rate limits: wait for automatic retry or upgrade your plan

Provider-Specific Errors (Vapi/Retell)

Common Provider Errors:

  • • "Invalid phone number format" - Check E.164 format
  • • "Agent not found" - Verify agent ID
  • • "Rate limit exceeded" - Too many calls
  • • "Server error" - Provider issue (auto-retries)

Solutions:

  1. See the Error Classification Guide for provider-specific troubleshooting
  2. Check Vapi/Retell dashboard for configuration issues
  3. Verify phone numbers are registered in your account
  4. Review API key permissions and validity

Error Classification Guide

What is Error Classification?

When your system makes phone calls through Vapi or Retell, sometimes things go wrong. The Error Classifier automatically analyzes these errors and decides whether to mark the lead as failed (permanent problem) or retry the call later (temporary problem). This helps you avoid wasting time on phone numbers that will never work, while still retrying calls that failed due to temporary issues like network problems.

Understanding Error Types

Permanent Errors

❌ Stop Trying

These errors mean something is fundamentally wrong and won't fix itself. The system marks the lead as "failed" so you can focus on other leads.

What happens:

  • • Lead status changes to "failed"
  • • No more automatic retries
  • • You'll see the specific reason in the error message

Common causes:

  • • Invalid phone number format
  • • Phone number doesn't exist
  • • API key is invalid or missing
  • • Agent/assistant not configured properly
  • • Phone number not registered in your account

Temporary Errors

⏳ Will Retry

These errors are short-term problems that might resolve themselves. The system will automatically retry the call later.

What happens:

  • • Lead stays in the queue
  • • System retries automatically (with increasing delays)
  • • No manual intervention needed

Common causes:

  • • Rate limiting (too many calls too quickly)
  • • Server errors on the provider's side
  • • Network or connection issues
  • • Unknown errors (defaults to temporary for safety)

Vapi Provider Errors

Phone Number Errors

"Invalid lead phone number format"

What it means: The phone number you're trying to call isn't formatted correctly.

Common causes:

  • • Missing country code (e.g., using 5551234567 instead of +15551234567)
  • • Using incorrect format (must be E.164 format: +[country code][number])
  • • Contains invalid characters (spaces, dashes, parentheses in wrong places)

How to fix:

  1. 1. Check the phone number format in your CSV or lead data
  2. 2. Ensure it starts with + followed by country code and number
  3. 3. Remove any spaces, dashes, or special characters
  4. 4. Example: +14155551234 (correct) vs 415-555-1234 (incorrect)

"Phone number not registered in account"

What it means: The phone number you're trying to use as the caller (your agent's number) isn't set up in your Vapi account.

How to fix:

  1. 1. Go to your Vapi dashboard
  2. 2. Buy or register a phone number
  3. 3. Update your agent configuration with the correct phone number ID

Agent Configuration Errors

"Agent phone number configuration error"

What it means: Your agent isn't properly configured with a phone number to call from.

How to fix:

  1. 1. Check your agent settings in Vapi dashboard
  2. 2. Ensure a phone number is assigned to the agent
  3. 3. Verify the phone number ID is correct in your configuration

"Agent or assistant configuration not found"

What it means: The agent or assistant ID you're using doesn't exist in your Vapi account.

How to fix:

  1. 1. Verify the agent ID in your system settings
  2. 2. Check that the agent exists in your Vapi dashboard
  3. 3. Update the configuration with the correct agent ID

API Key Errors

❌ Permanent

"API key is invalid or missing"

What it means: Your Vapi API key isn't working or isn't configured.

How to fix:

  1. 1. Check your environment variables (VAPI_API_KEY)
  2. 2. Generate a new API key from Vapi dashboard if needed
  3. 3. Ensure the API key has proper permissions
  4. 4. Restart your application after updating the key

Network & Server Errors

"Rate limit exceeded"

What it means: You've made too many calls in a short time. Vapi has limits on how many calls you can initiate per minute/hour.

What happens:

Temporary error - system will retry automatically

How to handle:

  • • Wait for the system to retry (it uses exponential backoff)
  • • Consider upgrading your Vapi plan for higher limits
  • • Spread out your call initiation times

"Server error" (5xx codes)

What it means: Vapi's servers are having issues.

What happens:

Temporary error - system will retry automatically

How to handle:

  • • System will retry automatically
  • • Check Vapi status page if issues persist
  • • No action needed on your part

"Network or connection error"

What it means: Your server couldn't reach Vapi's servers.

What happens:

Temporary error - system will retry automatically

How to handle:

  • • Check your internet connection
  • • System will retry automatically
  • • No action needed on your part

Retell Provider Errors

Phone Number Errors

"Invalid phone number format"

What it means: The phone number doesn't meet Retell's requirements.

Common causes:

  • • Not in E.164 format
  • • Missing country code
  • • Invalid characters

How to fix:

  1. 1. Format: +[country code][number] (e.g., +14155551234)
  2. 2. No spaces, dashes, or parentheses
  3. 3. Must start with +

"Phone number not found" or "not a valid number"

What it means: The phone number doesn't exist or isn't a real phone number.

How to fix:

  1. 1. Verify the phone number is correct
  2. 2. Check if the number has been disconnected
  3. 3. Contact the lead to get a different number

Agent Configuration Errors

"Agent phone number configuration error"

What it means: Your Retell agent doesn't have a phone number configured to call from.

How to fix:

  1. 1. Go to Retell dashboard
  2. 2. Configure your agent with a phone number
  3. 3. Save the agent settings

"Agent or assistant not found"

What it means: The agent ID in your configuration doesn't exist in Retell.

How to fix:

  1. 1. Verify the agent ID in your settings
  2. 2. Check Retell dashboard for the correct agent ID
  3. 3. Update your configuration

API Key Errors

❌ Permanent

"API key is invalid or missing"

What it means: Your Retell API key isn't working.

How to fix:

  1. 1. Check RETELL_API_KEY environment variable
  2. 2. Get a new API key from Retell dashboard
  3. 3. Ensure the key has necessary permissions
  4. 4. Restart your application

Network & Server Errors

"Rate limit exceeded"

What it means: You've hit Retell's rate limits.

What happens:

Temporary error - automatic retry

How to handle:

  • • System will retry with delays
  • • Consider upgrading your plan for higher limits
  • • Space out your call initiations

"Server error" (5xx codes)

What it means: Retell is having server issues.

What happens:

Temporary error - automatic retry

How to handle:

  • • System will retry automatically
  • • Check Retell status if issues continue
  • • No action needed

"Network or connection error"

What it means: Can't reach Retell's servers.

What happens:

Temporary error - automatic retry

How to handle:

  • • Check your internet connection
  • • System will retry automatically
  • • No action needed

General Troubleshooting Steps

1

Identify the Error Type

Check if it's permanent (take action) or temporary (auto-retry)

2

Read the Specific Reason

Each error includes a specific reason telling you exactly what's wrong

3

Follow the Fix

Use the sections above to find the specific fix for your error

4

Prevent Future Errors

Follow best practices to avoid similar issues

Best Practices to Prevent Errors

1. Phone Number Format
  • • Always use E.164 format: +14155551234
  • • Validate numbers before importing
  • • Clean data before CSV import
2. API Keys
  • • Store in environment variables
  • • Rotate keys periodically
  • • Use separate keys for development/production
3. Agent Configuration
  • • Test agent setup before bulk calling
  • • Verify phone numbers are registered
  • • Keep agent IDs updated
4. Rate Limiting
  • • Check provider rate limits
  • • Space out call initiations
  • • Monitor your usage

Frequently Asked Questions

Getting Help

If you're still having trouble after following this guide:

  1. Check the logs for the original error details
  2. Verify your configuration in the provider dashboard
  3. Test with a single lead before bulk processing
  4. Contact support with the specific error message

The error classifier is designed to make troubleshooting easier, but sometimes provider-specific issues require looking at their documentation or contacting their support.

Summary

Permanent errors

Fix the issue, then you can retry manually

Temporary errors

System retries automatically

Phone numbers

Always use E.164 format (+14155551234)

API keys

Check environment variables if authentication fails

Agent setup

Verify configuration in provider dashboard

Rate limits

System handles automatically with retries

The error classifier helps you focus on leads that can actually work, saving you time and frustration!

Quick Reference

Voice Throughput Calculator

Estimate your calling capacity based on concurrency, call duration, and batch frequency. Plan your lead processing strategy and understand infrastructure limits before scaling your campaigns.

Concurrency PlanningThroughput EstimationInfrastructure Limits
Open Calculator

Status Meanings

StatusMeaningAction Needed
PendingReady to callNone - system will call automatically
In-ProgressCall happeningWait for call to complete
RetryWaiting for retry delayNone - system will retry automatically
CompletedFinished callingReview call results
FailedPermanent errorFix issue, change status to pending

Phone Number Format

✅ Correct

+12125551234+447911123456+8801977317066

❌ Wrong

212-555-1234(212) 555-123401977317066

Error Messages Quick Reference

Permanent Errors (Action Required)What It MeansWhat To Do
Invalid lead phone number formatPhone number format is wrongFix the format to E.164 (+14155551234)
Phone number not registeredYour caller ID isn't set upRegister phone number in provider dashboard
Agent or assistant not foundAgent doesn't existCheck agent ID in settings
API key is invalid or missingAuthentication failedCheck/update API key
Phone number does not existLead's number is invalidGet correct number from lead
Temporary Errors (Auto-Retry)What It MeansWhat Happens
Rate limit exceededToo many calls too fastSystem waits and retries
Server errorProvider is having issuesSystem retries automatically
Network or connection errorCan't reach providerSystem retries automatically
Unknown errorUnexpected issueSystem retries for safety

Provider Comparison

FeatureRetellVapi
Custom FieldsAutomaticTemplate-based
ConfigurationSimpleMore control
Data AvailabilityAll fields always availableOnly referenced fields
Template RequiredNoYes (for custom fields)