Deduplication
Ledly’s deduplication engine prevents duplicate leads from entering your system. Using advanced fuzzy matching algorithms, it can detect duplicates even when data isn’t exactly the same.
How Deduplication Works
When a new lead arrives, Ledly checks it against existing leads using your configured matching criteria. The system calculates a similarity score (0-100%) and takes action based on your threshold settings.
New Lead → Match Check → Score Calculation → Threshold Comparison → ActionMatching Methods
Exact Match
Fields must be identical (case-insensitive).
| Field | New Lead | Existing Lead | Match? |
|---|---|---|---|
| [email protected] | [email protected] | Yes | |
| [email protected] | [email protected] | Yes | |
| [email protected] | [email protected] | No |
Fuzzy Match
Uses similarity algorithms to detect near-matches. Perfect for catching typos and variations.
| Field | New Lead | Existing Lead | Similarity |
|---|---|---|---|
| name | ”John Smith" | "Jon Smith” | 91% |
| name | ”John Smith" | "John Smyth” | 87% |
| phone | ”5551234567" | "555-123-4567” | 100% (normalized) |
| ”[email protected]" | "[email protected]” | 85% |
Supported Algorithms
| Algorithm | Best For | Description |
|---|---|---|
| Levenshtein | Names, addresses | Edit distance between strings |
| Jaro-Winkler | Names | Optimized for short strings with common prefixes |
| Soundex | Names | Phonetic matching (sounds alike) |
| Phone Normalization | Phone numbers | Strips formatting, compares digits |
| Email Normalization | Emails | Removes dots, plus-addressing, compares |
Configuration
Navigate to Settings
Go to Settings → Deduplication
Enable Deduplication
Toggle deduplication on for your organization
Configure Match Fields
Select which fields to use for matching:
- Email (recommended)
- Phone
- First Name + Last Name
- Custom fields
Set Matching Strategy
Choose the matching algorithm for each field type
Set Threshold
Configure the minimum similarity score to consider a duplicate (default: 85%)
Set Duplicate Window
Define the time window for checking duplicates (default: 24 hours)
Configure Action
Choose what happens when a duplicate is detected
Duplicate Actions
When a duplicate is detected, Ledly can take one of several actions:
Reject
Block the duplicate lead from entering the system.
{
"success": false,
"error": "Duplicate lead detected",
"duplicate_of": "lead_abc123",
"similarity_score": 92
}Merge
Combine the new data with the existing lead, updating empty or older fields.
| Field | Existing | New | Merged Result |
|---|---|---|---|
| [email protected] | [email protected] | [email protected] | |
| phone | null | 555-1234 | 555-1234 |
| source | ”web" | "api" | "web” (keep original) |
| updated_at | Jan 1 | Jan 5 | Jan 5 |
Link
Accept the new lead but link it to the existing lead for tracking.
Flag for Review
Accept the lead but mark it for manual review.
Allow
Accept the lead as a new record (useful for intentional re-submissions).
Match Field Configuration
Email Matching
Email matching includes intelligent normalization:
| Original | Normalized | Notes |
|---|---|---|
| [email protected] | [email protected] | Dots removed, lowercase |
| [email protected] | [email protected] | Plus-addressing removed |
| [email protected] | [email protected] | Lowercase |
Email normalization only applies to common providers (Gmail, Yahoo, Outlook). Custom domains are compared as-is.
Phone Matching
Phone numbers are normalized to digits only:
| Original | Normalized |
|---|---|
| (555) 123-4567 | 5551234567 |
| +1-555-123-4567 | 15551234567 |
| 555.123.4567 | 5551234567 |
Name Matching
Names use fuzzy matching with configurable algorithms:
| Comparison | Jaro-Winkler Score |
|---|---|
| ”John Smith” vs “John Smith” | 100% |
| “John Smith” vs “Jon Smith” | 96% |
| “John Smith” vs “Jonathan Smith” | 88% |
| “John Smith” vs “Smith, John” | 85% |
Duplicate Window
The duplicate window determines how far back to check for duplicates.
| Window | Use Case |
|---|---|
| 1 hour | High-volume, fast-moving leads |
| 24 hours | Standard daily dedup (recommended) |
| 7 days | Weekly campaign protection |
| 30 days | Monthly dedup for slow-moving leads |
| All time | Check against entire database |
Longer windows increase processing time. For high-volume ingestion, keep the window under 7 days.
Multi-Field Matching
Combine multiple fields for more accurate matching:
AND Logic
All fields must match to be considered a duplicate.
Match if:
email similarity > 95%
AND first_name similarity > 80%
AND last_name similarity > 80%OR Logic
Any field match counts as a duplicate.
Match if:
email similarity > 95%
OR phone similarity > 95%Weighted Scoring
Assign weights to different fields.
Final score = (email_score × 0.5) + (name_score × 0.3) + (phone_score × 0.2)| Field | Weight | Score | Contribution |
|---|---|---|---|
| 50% | 100% | 50 | |
| Name | 30% | 85% | 25.5 |
| Phone | 20% | 90% | 18 |
| Total | 93.5% |
Deduplication Log
Every duplicate check is logged for auditing:
Viewing the Log
- Go to Leads → Deduplication Log
- Filter by date range, action taken, or similarity score
- Click any entry to see match details
Log Entry Details
{
"timestamp": "2024-12-25T10:30:00Z",
"incoming_lead": {
"email": "[email protected]",
"first_name": "John",
"last_name": "Smith"
},
"matched_lead_id": "lead_abc123",
"match_fields": {
"email": { "score": 100, "method": "exact" },
"name": { "score": 96, "method": "jaro_winkler" }
},
"final_score": 98,
"threshold": 85,
"action_taken": "reject",
"reason": "Duplicate detected"
}Vendor-Specific Deduplication
Configure different deduplication rules per vendor:
| Vendor | Duplicate Window | Threshold | Action |
|---|---|---|---|
| Vendor A | 24 hours | 90% | Reject |
| Vendor B | 7 days | 85% | Merge |
| Web Forms | 1 hour | 95% | Reject |
| API Direct | All time | 80% | Flag |
Setting Vendor Rules
- Go to Vendors → Select vendor → Deduplication
- Override the organization defaults
- Configure vendor-specific settings
- Save changes
Cross-Vendor Deduplication
By default, deduplication checks across all vendors. You can configure:
Within Vendor Only
Only check for duplicates from the same vendor.
Use case: Different vendors may legitimately send the same lead.
Cross-Vendor (Default)
Check for duplicates across all vendors.
Use case: Prevent paying multiple vendors for the same lead.
Vendor Groups
Check within defined vendor groups.
Use case: Group vendors by lead type and only dedup within groups.
Performance Considerations
High-Volume Optimization
For organizations processing thousands of leads per hour:
- Reduce match fields - Use only essential fields (email, phone)
- Shorten window - Use 1-24 hour windows
- Use exact match first - Fuzzy matching is slower
- Index custom fields - Contact support for custom field indexing
Estimated Processing Times
| Volume | Window | Match Fields | Avg Time |
|---|---|---|---|
| 100/hour | 24 hours | Email only | ~50ms |
| 1000/hour | 24 hours | Email + Phone | ~100ms |
| 5000/hour | 7 days | Email + Phone + Name | ~200ms |
| 10000/hour | 30 days | Multiple fields | ~500ms |
API Reference
Check for Duplicates
Before submitting a lead, you can check if it’s a duplicate:
POST /api/dedup/check-duplicate
Content-Type: application/json
{
"email": "[email protected]",
"first_name": "John",
"last_name": "Smith",
"phone": "555-123-4567"
}Response (duplicate found):
{
"is_duplicate": true,
"matched_lead_id": "lead_abc123",
"similarity_score": 94,
"match_details": {
"email": 100,
"name": 88
}
}Response (no duplicate):
{
"is_duplicate": false
}Get Deduplication Config
GET /api/dedupUpdate Deduplication Config
POST /api/dedup
{
"enabled": true,
"threshold": 85,
"window_hours": 24,
"action": "reject",
"match_fields": ["email", "phone"]
}Best Practices
-
Start with email-only matching - It’s the most reliable identifier
-
Use 85-90% threshold - Lower catches more duplicates but may have false positives
-
Monitor false positives - Review the dedup log regularly to tune settings
-
Combine with validation - Validate email/phone format before dedup for better matching
-
Consider your use case - Marketing leads may tolerate duplicates; sales leads may not
-
Document vendor expectations - Communicate dedup policies to vendors
Troubleshooting
False Positives (Good Leads Rejected)
- Increase the similarity threshold (e.g., 85% → 92%)
- Use more match fields with AND logic
- Review if name matching is too aggressive
- Check if email normalization is causing issues
False Negatives (Duplicates Getting Through)
- Lower the similarity threshold
- Add more match fields
- Extend the duplicate window
- Switch to fuzzy matching for names
Performance Issues
- Reduce the duplicate window
- Use fewer match fields
- Switch to exact matching for high-volume fields
- Contact support for custom indexing