Routing a new lead to an account's owner has two parts. First the lead must be matched to the account. Then the owner must be set from that match. Both fail without an error. The lead is simply treated as new business.
1. What Salesforce does natively
Salesforce has no built-in step that links a new lead to an account. Duplicate rules can flag a likely match. They do not link the lead or set its owner. The link, and the routing from it, are yours to build.
2. A Flow build, in short
The Spot for Pardot published a Flow walkthrough on 27 September 2021, so match its steps to Flow Builder as it is today. In outline:
- A record-triggered flow on Lead runs on create or update. The lead needs an email or a company name.
- A formula field pulls the domain out of the lead's email.
- The flow looks for an account whose domain field holds that domain.
- If none is found, it looks for an account named like the lead's company.
- If it finds one, it stores the match on the lead.
3. Fill the account domain first
The walkthrough does not cover how to fill the domain field on accounts. Without it, the first match never fires. Every lead then falls back to the weaker name match.
Derive the domain from the account's Website field. Use a formula field or a one-off data load. Then count the accounts that still have none.
SELECT COUNT() FROM Account WHERE Website != null AND Domain__c = null
Use the name of your own domain field in place of Domain__c.
4. Where matching goes wrong
Matching on the wrong field
Company name is the weakest match: Acme, Acme Ltd and ACME Limited are three values. An email domain is stronger, but not for people using personal addresses.
Shared and personal domains
A match on gmail.com would connect every lead to one account. A sound match ignores free mail domains, and then has no basis for those leads.
Duplicate accounts
If the company exists twice, the lead matches one. The owner it reaches may not be the one who looks after the customer.
Hierarchy
A lead at a subsidiary should often go to the owner of the parent. Matching that way needs a rule that reads the account hierarchy.
The match runs after the owner is set
If the owner is assigned before matching, the lead has already gone to a person, by territory or round robin. See a flow overriding the rule for how order decides who wins.
5. After the match: route to the account owner
Once the lead holds its account, a second step copies the account owner onto the lead. Two things break it. The owner may have left, and the lead then goes to an inactive user. See reassigning leads when a rep leaves. Or another rule sets the owner after the flow.
6. Check it yourself
Start with how many leads could match at all.
SELECT COUNT() FROM Lead WHERE IsConverted = false AND Email != null AND CreatedDate = LAST_N_DAYS:90
Then list matched leads with both owners. SOQL cannot compare two fields, so export the result and filter the rows that differ.
SELECT Id, OwnerId, Matched_Account__c, Matched_Account__r.OwnerId FROM Lead WHERE IsConverted = false AND Matched_Account__c != null AND CreatedDate = LAST_N_DAYS:30
Use the name of your own match field in place of Matched_Account__c. A row where the two owners differ is a lead that missed the account owner. Count accounts owned by inactive users too.
SELECT COUNT() FROM Account WHERE Owner.IsActive = false
The free scan cannot count which leads match an account. It checks the setup behind it.
7. When a matching tool is worth paying for
A Flow is enough for exact domains. Fuzzy names, hierarchies and duplicate accounts are where it strains. That is where routers sell matching. See LeanData, Traction Complete or Distribution Engine.
Related: Salesforce lead assigned to the wrong person and duplicate leads routed to different reps.
Have it checked every night instead.
Routing Forensics connects as a read-only user and checks this, and the rest of your routing, against your real leads. Three design partners get a free health report on their own CRM, free for 90 days: what is leaking, where, and what it is worth. Apply for a place.
The free scan cannot count which leads match an account. It reads your routing setup in your browser. Scan your Salesforce or HubSpot routing. The nightly check, open to design partners, counts it.