Why company name is a poor field to match on

Matching trade customers on company name fills a CRM with duplicates. Why domain matching leaks too, and why the ERP account number is the key to use.

Company name creates duplicates because the same trade customer gets typed differently by every person and system that touches it, so an exact match on name treats each spelling as a new business. Email domain is a better field, and it's what HubSpot deduplicates companies on, but UK trade customers fall through its gaps. The field to rely on is a number nobody has to spell, such as the ERP account number, with names and domains kept as clues for someone to check.

One customer, five spellings

Take a hypothetical builders' merchant with a CRM and an ERP. The customer and every detail below are made up, but each route in is an ordinary one. Here is one trade customer arriving five different ways, and what an exact match on name and a match on email domain each make of it.

How the record arrivedWhat it was calledExact name matchDomain match
Overnight ERP syncABC Building Supplies Ltd, accounts@abcbuilding.co.ukFirst recordNot checked, because the sync creates records through the API
Website trade account formA.B.C. Building Supplies Limited, gary@abcbuilding.co.ukMissed: new companyMatched, if the sync filled in the domain
Rep after a yard visitABC Building (Leeds yard), no emailMissed: new companyNothing to match on
Trade show listABC Builders Supplies, abcbuilding@gmail.comMissed: new companyMissed: personal mailbox
Sister companyABC Roofing Ltd, sales@abcbuilding.co.ukKept separate, correctlyMatched into ABC Building, wrongly

Exact name matching gets one of the five right, and only because the sister company has a different name. That leaves four records for one customer.

Domain matching does better, and it's what HubSpot uses. It still leaves the customer split three ways and folds a different business into the account. Each of those misses has a plain cause.

Why names don't match

A name is whatever someone typed on the day. Accounts set up the customer as "Ltd" because that's what the credit application said. The buyer filled in the website form with full stops and "Limited". The rep wrote the yard he visited, because that's the bit he cares about. Someone at the trade show heard "Builders" instead of "Building".

To a person, those are obviously the same firm. To an exact match, "A.B.C." and "ABC" share nothing. Fuzzy matching closes some of the gap, but it can also start matching "ABC Building" with "ABS Building", which is a different customer with a different credit limit.

Companies House has the same problem when it decides whether a new company name is too close to an existing one, and its rules are a useful guide to what to ignore. Its "same as" test disregards endings like Limited and Ltd, punctuation such as full stops, "the" and "www" at the start of a name and an "s" at the end, and it treats "and" and "&" as the same thing. Apply those and "A.B.C. Building Supplies Limited" and "ABC Building Supplies Ltd" come out identical. "ABC Builders Supplies" still doesn't, and "ABC Building (Leeds yard)" never will.

There's a wrinkle that matters for merchants. Many trade customers are sole traders, and sole traders register with HMRC for Self Assessment, with no company number at Companies House. They can trade under a name other than their own (it can't include "Limited" or "Ltd"), and their invoices carry both their own name and the trading name. So the same plasterer can reach your CRM as "J Smith" from the invoice and "Smith Plastering" from the van, and neither is wrong.

Why domain matching is better, and where it leaks

A company's email domain changes much less than the way people spell its name. HubSpot uses the Company domain name property to deduplicate companies. Create one by hand with a domain that's already in use and it warns you the company exists. A form submission with a known domain updates the existing company. An import checks the domain before creating anything.

Each of these gaps shows up in the table.

Integrations skip the check. HubSpot's documentation says companies created through the API aren't deduplicated on domain, and that includes installed third-party sync apps. If your ERP feeds the CRM through the API or a third-party sync app, HubSpot doesn't run that check on the accounts it creates (HubSpot's own data sync apps can follow different rules). So the first row in the table can itself be a duplicate of a company the website created last month.

Personal mailboxes carry no company. With automatic association turned on, HubSpot links a contact to a company by matching the domain in their email address. For a gmail address it looks at the contact's website instead, and if there isn't one, it doesn't link them to anything. A plasterer who orders from a personal email address won't be linked to his company that way unless someone adds a website to his record.

No domain means a new record. Import a list without a domain or another unique identifier and HubSpot imports each row as a new company. A trade show spreadsheet with no email column goes in as one new company per row, whether or not those firms already buy from you.

Subdomains split, shared domains merge. With automatic company creation on, HubSpot creates a company for each unique domain, subdomains included, so @abcbuilding.co.uk and @sales.abcbuilding.co.uk become two companies. Going the other way, when several companies share one domain, contacts from that domain are linked to only one of them, and you can't choose which. For a group with a roofing firm and a building supplies firm on the same email domain, that's how the roofing buyer can end up on the wrong account.

A shared domain is the reverse of a duplicate: two businesses end up on one record. We've written separately about what an automatic merge does to trade accounts with several branches and billing entities. A matching rule that's too loose does the same damage, a record at a time.

A number that doesn't change

The field that holds up is one the customer never types. If your ERP gives each trade account a number when it's opened, and that number is on the invoices and statements, it's the one to use. When the CRM company holds the same number in a field of its own, there's nothing to spell differently. The setup has three parts.

The number goes on the CRM record. The ERP account number gets its own field on the company, and the field is set to hold unique values. HubSpot lets an import use a custom unique property like this as the identifier instead of the domain.

The integration looks before it creates. Since API-created companies skip the domain check, the data integration has to do the looking itself. Before it creates a company, it searches for the account number, and only creates a record when nothing comes back. That lookup is what stops the sync adding a fresh duplicate each time an account comes through.

Companies House numbers help where they exist. A limited company's registered number is on its certificate of incorporation and on the public register, and nobody has to spell it. That makes it a good second key, and a quick way to spot two accounts that are really one company. Sole traders and ordinary partnerships don't have one, so it sits alongside the account number and never replaces it.

Not every record will have an account number. A new enquiry from the website belongs to someone who hasn't opened an account yet. Those records match on domain where there is one, and get the account number added when the account is opened, so the next sync finds them.

Names still help, as a suggestion

Company name still has a use. It makes a poor key and a decent clue. Once names are cleaned up the Companies House way (endings, punctuation and a leading "the" stripped, "&" read as "and"), records with the same cleaned name, postcode or phone number are worth putting in front of someone who knows the customers.

That person is the important bit. An account manager knows that ABC Building and ABC Roofing share an owner and a domain but have separate credit limits. A merge rule has no way of knowing that. The suggestions go to a person, and the person decides.

Branches deserve their own rule. "ABC Building (Leeds yard)" is a delivery site of a customer who already exists, and it belongs on the parent account as a site or a child company, depending on how your CRM handles it. Merging it into the head office record loses the yard address. Leaving it as its own company leaves the rep thinking Leeds is a new customer.

What this won't sort out

None of this cleans up the duplicates you already have. Matching rules stop new ones arriving. The old ones need a one-off data cleansing pass, and that pass is easier once the account number is in place, because you can attach each CRM record to an ERP account and see which ones are left over. If a CRM move is on the cards, it's worth doing first; we've covered what to clean before a CRM or ERP migration.

It also won't stop people creating records by hand. A rep who can't find the customer in ten seconds is likely to make a new one, so the search box has to find them by account number, postcode and the usual spellings. If the only way to find ABC Building is to type its legal name exactly, you'll get another ABC Building by Friday.

Frequently asked questions

Does HubSpot match companies on name?

HubSpot deduplicates companies on the Company domain name property, so the name isn't used for that. A company created by hand with a domain that's already in use triggers a warning, and form submissions and imports update the existing company with that domain. Companies created through the API or a third-party sync app aren't checked against the domain, so an integration can still create duplicates.

What should we match on if a customer only has a gmail address?

The domain is no use for gmail or other personal mailboxes, because thousands of unrelated people share it. HubSpot won't automatically link a contact with a personal address to a company by domain unless the contact has a website on their record. For these customers the ERP account number is the reliable key, with the phone number and delivery postcode as clues for a person to check.

Is the Companies House number a good unique ID?

It's a good one for limited companies, because it's on the certificate of incorporation and the public register, nobody has to spell it, and you can check it against the register. Sole traders and ordinary partnerships don't have one, and many trade customers are sole traders. Use it as a second key alongside the ERP account number.

Should we turn on automatic merging of duplicate companies?

Not as a blanket rule on a trade customer base. Group companies can share a domain and similar names while having separate credit limits and billing, and an automatic merge can't tell them apart. Let the matching suggest pairs and have someone who knows the accounts make the call.