This guide explains how to use SmartLead's enhanced Email Reply Webhooks to track replies from multiple email IDs
Overview
When an email sent through SmartLead receives a reply, our system triggers a webhook notification containing detailed information about the correspondence. With our enhanced webhook system, you can now accurately track replies from different contacts within the same organization.
Use Cases
- Account-Based Marketing: Accurately track all stakeholders who engage with your campaigns
- CRM Integration: Update contact records with precise engagement data
- Follow-up Automation: Create personalized follow-up sequences based on who actually responded
- Analytics: Generate accurate response attribution reports
- Team Collaboration: Route responses to the appropriate team members based on who replied
Webhook Payload
Below is an example of our enhanced webhook payload structure:
{
"campaign_status": "COMPLETED",
"stats_id": "a891fe37-c45d-21e8-67ba-fcd44e9c33a8",
"sl_email_lead_id": "1482956",
"sl_email_lead_map_id": 1438627,
"sl_lead_email": "[email protected]",
"from_email": "[email protected]",
"cc_emails": [],
"subject": "Some more conversions?",
"to_email": "[email protected]",
"to_name": "James Parker",
"time_replied": "2025-03-28T09:35:01+00:00",
"event_timestamp": "2025-03-28T09:35:01+00:00",
"message_id": "<BDD5kUwc77maSjLRv2gmq35VkzEF9K4L3csPPCVx8e5kWbUnrsD@mail.gmail.com>",
"preview_text": "webhook reply\n",
"campaign_name": "email sent",
"campaign_id": 9181,
"sequence_number": 1,
"secret_key": "4f7c8d23-a619-58c2-93g6-72936ee16f38",
"app_url": "https://app.smartlead.ai/app/master-inbox?leadMap=1438627",
"ui_master_inbox_link": "https://app.smartlead.ai/app/master-inbox?leadMap=1438627",
"description": "[email protected] replied to Email 1 for campaign - email sent ",
"metadata": {
"webhook_created_at": "2025-03-28T08:14:40.843Z"
},
// NEW: Enhanced Lead Correspondence Information
"leadCorrespondence": {
"targetLeadEmail": "[email protected]", // Original recipient
"replyReceivedFrom": "[email protected]", // Actual responder
"repliedCompanyDomain": "DifferentCompany" // Domain relationship
},
"webhook_url": "https://webhook.site/35def789-4c28-3951-ef12-7abc9d3254cd",
"webhook_id": 799,
"webhook_name": "user",
"event_type": "EMAIL_REPLY"
}
Key Changes in the Webhook Payload
The most significant enhancement to our webhook system is the addition of the leadCorrespondence
object, which contains the following properties:
Property | Description |
---|---|
targetLeadEmail | The email address of the original recipient who was targeted in your campaign |
replyReceivedFrom | The email address of the actual person who replied to your email |
repliedCompanyDomain | Indicates the relationship between the responder and the original recipient. Values can be "SameCompany", "DifferentCompany", or "Unknown" |
Response Scenarios
Our enhanced webhook system can now accurately handle various response scenarios:
Scenario 1: Direct Reply
When the original recipient replies directly to your email, both targetLeadEmail
and replyReceivedFrom
will contain the same email address.
Scenario 2: Colleague Reply (Same Company)
When a different person from the same company replies to your email, the webhook will:
- Identify the original recipient in
targetLeadEmail
- Identify the actual responder in
replyReceivedFrom
- Set
repliedCompanyDomain
to "SameCompany"
Scenario 3: Different Company Reply
When a person from a different company replies (perhaps due to email forwarding), the webhook will:
- Identify the original recipient in
targetLeadEmail
- Identify the actual responder in
replyReceivedFrom
- Set
repliedCompanyDomain
to "DifferentCompany"
Implementation Steps
To leverage this enhanced webhook functionality:
- Update Webhook Endpoints: Ensure your webhook endpoint is prepared to process the additional
leadCorrespondence
object - Modify Your Integration Logic: Update your code to check who actually replied to your emails
- Enhance Your Follow-up Logic: Create more personalized follow-ups based on who responded
- Update Your Analytics: Include the actual responder in your attribution reporting
Backward Compatibility
For existing integrations, all previous webhook fields remain unchanged. The new leadCorrespondence
object is simply an addition to the payload. This ensures all existing integrations will continue to function without modification.
Error Handling
Our enhanced webhook system includes improved email parsing logic to handle various email clients and reply formats. In cases where the responder cannot be confidently determined, the system will default to the original recipient information but will indicate this in the repliedCompanyDomain
value as "Unknown".
Testing Your Integration
We recommend testing your webhook integration with various response scenarios:
- Direct replies from the original recipient
- Replies from colleagues of the original recipient
- Replies from email forwards to different companies
- Replies with unusual formatting or from different email clients