Contact Matching Logic Builder
Decision tree for handling multi-email contacts, unknown senders, internal emails, spam filters.
Contact Matching Logic Builder
Your CRM
This guide gives you the exact decision tree logic to handle every contact matching scenario: multi-email contacts, unknown senders, internal forwards, and spam false positives. Use this framework to configure your CRM
The Core Problem
Professional services firms face four recurring contact matching failures:
Multiple email addresses per contact. Your client uses sarah.chen@acmecorp.com for contracts, sarahchen@gmail.com for quick questions, and s.chen@acmecorp.com when emailing from mobile. Without proper logic, you create three separate contact records.
Unknown senders. A prospect's colleague forwards your proposal to their CFO. The CFO replies from an address you've never seen. Your CRM
Internal email noise. Your associate forwards a client email to you for review. Your CRM
Spam filter collateral damage. A legitimate inquiry from a new prospect gets flagged as spam because they used marketing language. The contact never enters your CRM
Fix these four scenarios and you eliminate 90% of CRM
Decision Tree Logic: Step-by-Step
Use this exact sequence to evaluate every incoming email. Implement it as automation rules in your CRM
Step 1: Spam Filter Check
Before any contact matching, verify the email passed spam filters.
Run this check first:
- If spam score > 5.0, route to manual review queue
- If spam score ≤ 5.0, proceed to Step 2
Manual review queue protocol:
- Assign to operations team member daily at 9 AM
- Review sender domain, email content, and any prior communication history
- Whitelist legitimate senders immediately
- Delete confirmed spam without creating contact records
Common false positive triggers:
- Emails containing "free consultation" or "limited time"
- First-time senders from free email domains (@gmail.com, @yahoo.com)
- Emails with multiple links in signature blocks
Add these patterns to your spam filter whitelist if they match your typical client communication.
Step 2: Internal vs. External Sender
Determine if the email originated inside your organization.
Check the sender domain:
- If sender domain matches your firm domain (@yourfirm.com), proceed to Step 3 (Internal Email Logic)
- If sender domain is external, proceed to Step 4 (External Email Logic)
Edge case: Forwarded emails. If the email was forwarded by an internal team member, extract the original sender from the email body or headers. Use the original sender for all subsequent matching logic.
Step 3: Internal Email Logic
Internal emails should update activity history but not trigger client-facing workflows.
When sender domain matches your firm:
- Identify the email recipients (exclude internal addresses)
- For each external recipient, match to existing contact record by email address
- Log the email as "Internal Discussion" in the contact's activity timeline
- Do NOT trigger follow-up tasks, engagement scoring, or client alerts
- If no matching contact exists, create a new record with source = "Internal Forward"
Why this matters: Without this logic, your CRM
Step 4: External Email Logic - Known Contact
Check if the sender email address exists in your CRM
Query your CRM
- If exact match found, proceed to Step 5 (Update Existing Contact)
- If no exact match, proceed to Step 6 (Domain and Name Matching)
Implementation note: Use case-insensitive matching. Treat Sarah.Chen@acmecorp.com and sarah.chen@acmecorp.com as identical.
Step 5: Update Existing Contact
The sender email address exists in your CRM
Execute these updates:
- Append email to activity timeline with timestamp, subject line, and first 200 characters of body
- Update "Last Contact Date" field to current date
- If email contains calendar invite, create linked calendar event
- If email contains attachment, upload to contact's document folder
- Trigger any active workflow rules (follow-up tasks, engagement scoring, pipeline stage updates)
Do not create a new contact record. This is the most common mistake in CRM
Step 6: Domain and Name Matching (Unknown Email Address)
The exact email address doesn't exist, but the contact might.
Run these three matching attempts in sequence:
Match Attempt 1: Domain + Last Name
- Extract domain from sender email (everything after @)
- Extract last name from sender display name
- Query CRMfor contacts where company domain matches AND last name matchesCRMClick to read the full definition in our AI & Automation Glossary.
- If single match found, proceed to Step 7 (Link New Email to Existing Contact)
- If multiple matches or zero matches, proceed to Match Attempt 2
Match Attempt 2: Full Name Fuzzy Match
- Extract full name from sender display name
- Query CRMfor contacts with similar names (Levenshtein distance ≤ 2)CRMClick to read the full definition in our AI & Automation Glossary.
- If single match found with confidence score > 85%, proceed to Step 7
- If multiple matches or low confidence, proceed to Match Attempt 3
Match Attempt 3: Email Thread Analysis
- Parse email headers for "In-Reply-To" and "References" fields
- Check if this email is part of an existing thread
- If thread exists, match to the contact associated with that thread
- If no thread match, proceed to Step 8 (Create New Contact)
Step 7: Link New Email to Existing Contact
You've matched the sender to an existing contact record. Add the new email address.
Execute these steps:
- Add new email address to contact's "Additional Emails" field
- Set primary email preference based on domain (corporate domains take priority over personal)
- Log the email to activity timeline
- Create a note: "New email address detected: [new_email] on [date]"
- Trigger workflow rules as in Step 5
Email priority logic:
- Corporate domain (@company.com) = Primary
- Professional domain (@lawfirm.com, @consultingco.com) = Primary
- Personal domain (@gmail.com, @yahoo.com) = Secondary
- Mobile-specific addresses (s.chen@ vs sarah.chen@) = Secondary
Step 8: Create New Contact (Unknown Sender)
No existing contact match found. Create a new record.
Populate these fields from the email:
- Email Address: Sender email (set as primary)
- Full Name: Parse from display name (split into First Name / Last Name)
- Company: Extract from email domain (acmecorp.com → Acme Corp)
- Source: Set to "Inbound Email"
- Lead Status: Set to "New - Unqualified"
- Owner: Assign based on email recipient (if email was sent to specific team member) or round-robin rule
- First Contact Date: Current timestamp
- Initial Message: Store full email body in notes field
Enrichment workflow (run immediately after creation):
- Query Clearbit, ZoomInfo, or Apollo.io API for company and contact details
- Populate job title, company size, industry, and LinkedIn profile if available
- If enrichment fails, flag record for manual research
- Trigger "New Lead" workflow (welcome email, assignment notification, first touch task)
Do not create a contact if:
- Email is from a no-reply address (noreply@, donotreply@)
- Email is from a known vendor or service provider (check against vendor domain list)
- Email is a newsletter or marketing automation (check for "unsubscribe" links)
Step 9: Multi-Email Contact Consolidation
Run this process weekly to merge duplicate contacts created before implementing this logic.
Automated duplicate detection:
- Query CRMfor contacts with matching last name + company domainCRMClick to read the full definition in our AI & Automation Glossary.
- Query CRMfor contacts with matching phone numberCRMClick to read the full definition in our AI & Automation Glossary.
- Query CRMfor contacts with matching LinkedIn URLCRMClick to read the full definition in our AI & Automation Glossary.
- For each potential duplicate pair, calculate match confidence score:
- Same last name + same company = 60 points
- Same phone number = 80 points
- Same LinkedIn URL = 100 points
- Similar first name (Levenshtein distance ≤ 1) = 20 points
If match confidence ≥ 80 points:
- Flag for automatic merge
- Consolidate all email addresses into single contact
- Merge activity timelines chronologically
- Keep the contact record with the most complete data as primary
- Archive the duplicate record (don't delete - maintain audit trail)
If match confidence 60-79 points:
- Flag for manual review
- Present side-by-side comparison to operations team
- Allow one-click merge or dismiss
Implementation Checklist
Use this checklist to configure your CRM
Week 1: Spam Filter Integration
- [ ] Configure spam score threshold (recommend 5.0)
- [ ] Create manual review queue in CRMCRMClick to read the full definition in our AI & Automation Glossary.
- [ ] Assign daily review responsibility
Week 2: Internal Email Handling
- [ ] Create "Internal Discussion" activity type in CRMCRMClick to read the full definition in our AI & Automation Glossary.
- [ ] Configure domain matching rule for your firm domain
- [ ] Disable client-facing workflows for internal emails
- [ ] Test with 10 sample internal forwards
Week 3: Contact Matching Logic
- [ ] Implement exact email match (Step 4)
- [ ] Implement domain + name matching (Step 6, Match Attempt 1)
- [ ] Implement fuzzy name matching (Step 6, Match Attempt 2)
- [ ] Implement thread analysis (Step 6, Match Attempt 3)
- [ ] Test with 20 sample unknown sender emails
Week 4: New Contact Creation
- [ ] Configure new contact field mapping (Step 8)
- [ ] Integrate enrichment API(Clearbit, ZoomInfo, or Apollo)APIClick to read the full definition in our AI & Automation Glossary.
- [ ] Create "New Lead" workflow
- [ ] Set up assignment rules (round-robin or territory-based)
- [ ] Test with 10 sample new contacts
Week 5: Duplicate Consolidation
- [ ] Build duplicate detection query (Step 9)
- [ ] Configure match confidence scoring
- [ ] Create merge workflow
- [ ] Schedule weekly automated duplicate scan
- [ ] Run initial cleanup on existing database
Platform-Specific Implementation
Salesforce: Use Process Builder or Flow to implement Steps 1-8. Create a custom "Email Matching Score" field to store confidence levels. Use Duplicate Rules for Step 9.
HubSpot: Use Workflows to implement Steps 1-8. HubSpot's native duplicate detection handles Step 9, but configure custom properties for email priority logic.
Pipedrive:
Use Zapier or Make.com as middleware. Pipedrive's API
Make.com (platform-agnostic):
Build a single scenario with Router modules for each decision point. Use HTTP modules to query your CRM
Measuring Success
Track these metrics monthly:
Duplicate contact rate: (Contacts merged / Total contacts created) × 100. Target: <2%
Unknown sender match rate: (Emails matched to existing contacts / Total unknown sender emails) × 100. Target: >60%
Spam false positive rate: (Legitimate emails in spam queue / Total spam queue emails) × 100. Target: <5%
Average time to contact creation: Timestamp of email received to timestamp of contact record created. Target: <2 minutes
If any metric falls outside target range, review your matching logic configuration and adjust thresholds.

Reviewed by Revenue Institute
This guide is actively maintained and reviewed by the implementation experts at Revenue Institute. As the creators of The AI Workforce Playbook, we test and deploy these exact frameworks for professional services firms scaling without new headcount.
Revenue Institute
Need help turning this guide into reality? Revenue Institute builds and implements the AI workforce for professional services firms.