Skip to main content

Overview

Connect your LeadSquared CRM to automatically trigger AI calls when new leads are created. Configure your agent to call leads with custom data mapping and call scheduling parameters. How It Works:
  1. Connect LeadSquared account
  2. Configure agent variable mapping
  3. Add webhook URL to LeadSquared
  4. New leads automatically trigger calls

Step 1: Connect LeadSquared Account

1

Navigate to Integrations

Go to Dashboard → Integrations
2

Find LeadSquared

Locate LeadSquared in the available integrations
3

Click Connect

Click the “Connect” button
4

Enter Credentials

Fill in the required fields:Host URL
  • Your LeadSquared API endpoint
  • Example: https://api-in21.leadsquared.com
  • Find this in your LeadSquared account settings
Access Key
  • Your LeadSquared access key
  • Found in Settings → API & Webhooks
Secret Key
  • Your LeadSquared secret key
  • Keep this secure and never share
5

Save Connection

Click “Connect” to save your credentials
Your credentials are stored securely and used only for API communication with LeadSquared.

Step 2: Configure Agent Variable Mapping

Map your agent’s call metadata variables to LeadSquared lead fields.
1

Go to Agent Configuration

Navigate to the agent you want to configure for LeadSquared leads
2

Open Variable Source Tab

Click on the “Variable Source” tab in agent settings
3

Add Variable Mapping

For each call metadata variable:
  1. Click “Add Variable”
  2. Enter Variable Name (e.g., name, phone, email)
  3. Select Source: leadsquared
  4. Select LeadSquared Field from dropdown
  5. Choose Format if needed (optional)

Variable Mapping Example

Call Metadata Variable → LeadSquared Field
-----------------------------------------------
name                   → ProspectName
phone                  → Phone
email                  → EmailAddress
company                → Company
city                   → City
The agent will receive these values from LeadSquared when a call is triggered, using them during the conversation.

Step 3: Generate Webhook URL

Your webhook URL follows this format:
https://api.callkaro.ai/call/crm-webhook?agent_id=YOUR_AGENT_ID&type=leadsquared

Authentication

The webhook requires authentication. You can provide your API key in two ways: Option 1: Query Parameter
https://api.callkaro.ai/call/crm-webhook?agent_id=YOUR_AGENT_ID&type=leadsquared&x_api_key=YOUR_API_KEY
Option 2: Header
  • Add header: X-API-KEY: YOUR_API_KEY
  • Use this when query parameter is not preferred
Your API key can be found in Dashboard → API Keys

Get Your Agent ID

  1. Go to your agent’s configuration page
  2. Look in the URL or agent settings
  3. Copy the agent ID
Complete Example URL (with API key):
https://api.callkaro.ai/call/crm-webhook?agent_id=6803fa770b666a64ab1694c1e&type=leadsquared&x_api_key=ck_1234567890abcdef

Step 4: Configure Webhook in LeadSquared

1

Log into LeadSquared

Access your LeadSquared account
2

Go to Webhooks

Navigate to Settings → API & Webhooks → Webhooks
3

Create New Webhook

Click “Create Webhook” or “Add Webhook”
4

Enter Webhook URL

Paste your Callkaro webhook URL with agent ID and API keyUsing Query Parameter (Recommended):
https://api.callkaro.ai/call/crm-webhook?agent_id=YOUR_AGENT_ID&type=leadsquared&x_api_key=YOUR_API_KEY
5

Add Authentication (If Using Header)

If you prefer header authentication:
  1. Enter webhook URL without x_api_key parameter
  2. Add custom header in LeadSquared:
    • Header Name: X-API-KEY
    • Header Value: Your Callkaro API key
6

Set Content-Type to JSON

Important: Set the Content-Type to application/json
  1. Look for “Content-Type” or “Request Format” setting
  2. Select application/json from the dropdown
  3. Do NOT use form or application/x-www-form-urlencoded
LeadSquared often defaults to form - you MUST change this to application/json or the webhook will fail.
7

Select Trigger Event

Choose “Lead Created” or relevant trigger event
8

Save Webhook

Click “Save” to activate the webhook

Advanced Parameters

Add optional parameters to your webhook URL to control call behavior.

Available Parameters

ParameterFormatDescriptionExample
min_trigger_timeHH:MMEarliest time to trigger calls (24-hour format)09:00
max_trigger_timeHH:MMLatest time to trigger calls (24-hour format)18:00
carry_overtrue/falseWhether to carry over calls outside window to next daytrue
num_of_retriesNumberTotal number of retry attempts if call fails3
gap_between_retriesX,Y,ZGap in hours between retries (comma-separated)2,4,6

Parameter Examples

Configure calls between 9 AM and 6 PM:
https://api.callkaro.ai/call/crm-webhook?agent_id=YOUR_AGENT_ID&type=leadsquared&x_api_key=YOUR_API_KEY&min_trigger_time=09:00&max_trigger_time=18:00

Parameter Details

min_trigger_time & max_trigger_time

Format: HH:MM (24-hour format) Purpose: Define the calling window for your campaigns Examples:
  • 09:00 - 9:00 AM
  • 13:30 - 1:30 PM
  • 18:00 - 6:00 PM
Calls triggered outside this window will be handled based on carry_over setting.

carry_over

Format: true or false Purpose: Determines behavior for leads created outside calling hours Options:
  • true: Schedule call for next available time within window
  • false: Attempt call immediately (may fail if outside hours)
Example Scenario:
Settings:
min_trigger_time=09:00
max_trigger_time=18:00
carry_over=true

Lead created: 7:00 PM (outside window)
Result: Call scheduled for 9:00 AM next day

num_of_retries

Format: Number (integer) Purpose: Total number of retry attempts if call fails Valid Values: 0 to 10 Examples:
  • 0 - No retries, single call attempt
  • 1 - One retry (2 total attempts)
  • 3 - Three retries (4 total attempts)

gap_between_retries

Format: Comma-separated hours X,Y,Z Purpose: Time gaps between retry attempts Important:
  • Number of values must equal num_of_retries
  • Values in hours
  • No spaces between commas
Examples:
num_of_retries=3
gap_between_retries=2,2,2
Schedule:
  • Attempt 1: Lead created time
  • Attempt 2: +2 hours
  • Attempt 3: +2 hours
  • Attempt 4: +2 hours
Ensure the number of gap values matches num_of_retries exactly, or the webhook will fail.

Complete Setup Example

Scenario: Sales Team Lead Calls

Requirements:
  • Call new leads automatically
  • Business hours: 9 AM to 6 PM
  • Retry failed calls 3 times
  • Increasing gaps: 2, 4, 6 hours
  • Carry over evening leads to next morning
Webhook URL:
https://api.callkaro.ai/call/crm-webhook?agent_id=6803fa770b666a64ab1694c1e&type=leadsquared&x_api_key=ck_1234567890abcdef&min_trigger_time=09:00&max_trigger_time=18:00&carry_over=true&num_of_retries=3&gap_between_retries=2,4,6
Variable Mapping:
Call MetadataLeadSquared Field
nameProspectName
phonePhone
emailEmailAddress
companyCompany
product_interestmx_Product_Interest
Result:
  • Lead created at 10 AM → Call at 10 AM
  • Lead created at 7 PM → Call at 9 AM next day
  • Failed calls retry: +2h, +4h, +6h
  • Agent has access to all mapped fields during call

Testing Your Integration

1

Create Test Lead

Create a test lead in LeadSquared with sample data
2

Check Webhook Trigger

Verify LeadSquared webhook fires successfully
3

Monitor Call

Check Callkaro dashboard for triggered call
4

Review Data

Confirm agent received correct lead data during call
5

Test Retries

Test retry behavior by marking call as failed

Troubleshooting

Possible causes:
  • Webhook URL incorrect
  • Agent ID wrong
  • LeadSquared webhook not saved
  • LeadSquared credentials invalid
Solutions:
  1. Verify webhook URL format
  2. Check agent ID is correct
  3. Confirm webhook is active in LeadSquared
  4. Test LeadSquared credentials in Integrations page
Issue: Agent doesn’t receive lead dataSolutions:
  1. Check variable source is set to leadsquared
  2. Verify LeadSquared field names are correct
  3. Ensure fields exist in LeadSquared lead
  4. Test with a lead that has all mapped fields
Issue: Calls triggering outside min/max timesSolutions:
  • Check time format is HH:MM (24-hour)
  • Verify carry_over setting
  • Ensure timezone matches your LeadSquared account
Issue: No retry attempts after failed callSolutions:
  • Verify num_of_retries is set
  • Check gap_between_retries count matches retries
  • Ensure proper format: 2,3,4 (no spaces)
  • Confirm call actually failed (not just unanswered)
Issue: LeadSquared shows webhook errorSolutions:
  • Check URL has no typos
  • Ensure type=leadsquared is included
  • Verify agent_id is valid
  • Remove any extra spaces or characters

Best Practices

Why: Respect customer availability and increase answer ratesRecommendations:
  • Business hours: 09:00 to 18:00
  • Avoid early morning and late evening
  • Consider customer timezone
Why: Balance persistence with customer experienceGood Patterns:
  • Quick follow-up: 1,2,4 hours
  • Spaced out: 4,8,24 hours
  • Aggressive: 1,1,2 hours
Avoid:
  • Too frequent: 0.5,0.5,0.5 (spam-like)
  • Too long: 24,48,72 (lost interest)
Why: Never miss a lead due to timingBest Practice:
  • Set carry_over=true for most campaigns
  • Ensures all leads get called
  • Respects calling hours
Why: Keep agent context focusedEssential Fields:
  • Name (for personalization)
  • Phone (validation)
  • Email (backup contact)
  • Product interest (conversation context)
Avoid:
  • Unnecessary personal data
  • Too many fields (overwhelming)
  • Sensitive information not needed

FAQs

Yes! Create separate webhook URLs for each agent with different agent_ids.
Calls won’t trigger until LeadSquared service resumes. No data is lost.
Yes, use LeadSquared’s webhook test feature or create test leads in a sandbox.
Check your Callkaro dashboard → Call History for new calls from this agent.
Yes, simply update the webhook URL in LeadSquared with new parameters.

Getting Help

Webhook Documentation

Learn more about webhooks and call data

Contact Support

Get help with LeadSquared integration setup