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:- Connect LeadSquared account
- Configure agent variable mapping
- Add webhook URL to LeadSquared
- New leads automatically trigger calls
Step 1: Connect LeadSquared Account
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
- Your LeadSquared access key
- Found in Settings → API & Webhooks
- Your LeadSquared secret key
- Keep this secure and never share
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.Variable Mapping Example
Step 3: Generate Webhook URL
Your webhook URL follows this format:Authentication
The webhook requires authentication. You can provide your API key in two ways: Option 1: Query Parameter- 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
- Go to your agent’s configuration page
- Look in the URL or agent settings
- Copy the agent ID
Step 4: Configure Webhook in LeadSquared
Enter Webhook URL
Paste your Callkaro webhook URL with agent ID and API keyUsing Query Parameter (Recommended):
Add Authentication (If Using Header)
If you prefer header authentication:
- Enter webhook URL without
x_api_keyparameter - Add custom header in LeadSquared:
- Header Name:
X-API-KEY - Header Value: Your Callkaro API key
- Header Name:
Set Content-Type to JSON
Important: Set the Content-Type to
application/json- Look for “Content-Type” or “Request Format” setting
- Select
application/jsonfrom the dropdown - Do NOT use
formorapplication/x-www-form-urlencoded
Advanced Parameters
Add optional parameters to your webhook URL to control call behavior.Available Parameters
| Parameter | Format | Description | Example |
|---|---|---|---|
min_trigger_time | HH:MM | Earliest time to trigger calls (24-hour format) | 09:00 |
max_trigger_time | HH:MM | Latest time to trigger calls (24-hour format) | 18:00 |
carry_over | true/false | Whether to carry over calls outside window to next day | true |
num_of_retries | Number | Total number of retry attempts if call fails | 3 |
gap_between_retries | X,Y,Z | Gap in hours between retries (comma-separated) | 2,4,6 |
Parameter Examples
- Basic Call Window
- With Retries
- With Carry Over
- Complete Configuration
Configure calls between 9 AM and 6 PM:
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 AM13:30- 1:30 PM18:00- 6:00 PM
carry_over
Format:true or false
Purpose: Determines behavior for leads created outside calling hours
Options:
true: Schedule call for next available time within windowfalse: Attempt call immediately (may fail if outside hours)
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 attempt1- One retry (2 total attempts)3- Three retries (4 total attempts)
gap_between_retries
Format: Comma-separated hoursX,Y,Z
Purpose: Time gaps between retry attempts
Important:
- Number of values must equal
num_of_retries - Values in hours
- No spaces between commas
- Equal Gaps
- Increasing Gaps
- Custom Pattern
- Attempt 1: Lead created time
- Attempt 2: +2 hours
- Attempt 3: +2 hours
- Attempt 4: +2 hours
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
| Call Metadata | LeadSquared Field |
|---|---|
name | ProspectName |
phone | Phone |
email | EmailAddress |
company | Company |
product_interest | mx_Product_Interest |
- 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
Troubleshooting
Calls not triggering
Calls not triggering
Possible causes:
- Webhook URL incorrect
- Agent ID wrong
- LeadSquared webhook not saved
- LeadSquared credentials invalid
- Verify webhook URL format
- Check agent ID is correct
- Confirm webhook is active in LeadSquared
- Test LeadSquared credentials in Integrations page
Variables not mapping
Variables not mapping
Issue: Agent doesn’t receive lead dataSolutions:
- Check variable source is set to
leadsquared - Verify LeadSquared field names are correct
- Ensure fields exist in LeadSquared lead
- Test with a lead that has all mapped fields
Calls outside window
Calls outside window
Issue: Calls triggering outside min/max timesSolutions:
- Check time format is
HH:MM(24-hour) - Verify
carry_oversetting - Ensure timezone matches your LeadSquared account
Retries not working
Retries not working
Issue: No retry attempts after failed callSolutions:
- Verify
num_of_retriesis set - Check
gap_between_retriescount matches retries - Ensure proper format:
2,3,4(no spaces) - Confirm call actually failed (not just unanswered)
Invalid webhook error
Invalid webhook error
Issue: LeadSquared shows webhook errorSolutions:
- Check URL has no typos
- Ensure
type=leadsquaredis included - Verify agent_id is valid
- Remove any extra spaces or characters
Best Practices
Set Appropriate Call Windows
Set Appropriate Call Windows
Why: Respect customer availability and increase answer ratesRecommendations:
- Business hours:
09:00to18:00 - Avoid early morning and late evening
- Consider customer timezone
Use Intelligent Retry Patterns
Use Intelligent Retry Patterns
Why: Balance persistence with customer experienceGood Patterns:
- Quick follow-up:
1,2,4hours - Spaced out:
4,8,24hours - Aggressive:
1,1,2hours
- Too frequent:
0.5,0.5,0.5(spam-like) - Too long:
24,48,72(lost interest)
Enable Carry Over
Enable Carry Over
Why: Never miss a lead due to timingBest Practice:
- Set
carry_over=truefor most campaigns - Ensures all leads get called
- Respects calling hours
Map Essential Fields Only
Map Essential Fields Only
Why: Keep agent context focusedEssential Fields:
- Name (for personalization)
- Phone (validation)
- Email (backup contact)
- Product interest (conversation context)
- Unnecessary personal data
- Too many fields (overwhelming)
- Sensitive information not needed
FAQs
Can I use multiple agents?
Can I use multiple agents?
Yes! Create separate webhook URLs for each agent with different agent_ids.
What happens if LeadSquared is down?
What happens if LeadSquared is down?
Calls won’t trigger until LeadSquared service resumes. No data is lost.
Can I test without creating real leads?
Can I test without creating real leads?
Yes, use LeadSquared’s webhook test feature or create test leads in a sandbox.
How do I know if a call was triggered?
How do I know if a call was triggered?
Check your Callkaro dashboard → Call History for new calls from this agent.
Can I change parameters later?
Can I change parameters later?
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