Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. Entity Resolution: Merging Duplicate Customer Records
Data & Scraping

Entity Resolution: Merging Duplicate Customer Records

The same customer appears four times with different spellings and no shared key. How probabilistic matching works and how to avoid merging two real people.

Updated 2 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

Exact matching fails on real customer data because of typos, abbreviations and missing fields. Probabilistic matching scores record pairs on several fields at once, but the threshold is a business decision: a wrong merge is usually far more damaging than a missed one.

Why duplicates happen and why they matter

Duplicates accumulate through ordinary operation: a customer orders as a guest then creates an account, a company is entered with and without 'Ltd', a CRM import runs twice, two branches each add the same account.

The consequences run through everything downstream - overstated customer counts, credit limits applied per record rather than per customer, marketing that contacts the same person three times, and any model trained on customer history learning from fragments.

Comparing records without a shared key

Probabilistic matching compares pairs across several fields and combines the evidence. Each field contributes according to how discriminating it is: matching on an unusual surname is far stronger evidence than matching on a common first name.

  • Normalise first - case, punctuation, company suffixes, address formats, phone number formats.
  • Use fuzzy comparison per field - edit distance for names, specialised comparison for addresses and dates.
  • Weight by discriminating power - a shared postcode in a dense city means less than one in a rural area.
  • Handle missing values explicitly - a blank field is not a mismatch, and treating it as one loses real matches.

The pairwise comparison is expensive on a large file, so blocking - only comparing records that share something coarse such as postcode area or first initial - is what makes it practical.

The threshold is a business decision

Any matching system produces a score, and someone must decide where to cut. This is not a technical choice, because the two error types have very different costs.

ErrorWhat happensTypical severity
False mergeTwo different customers combinedSevere - data protection exposure, wrong balances, wrong contact
Missed matchDuplicates remainModerate - inefficiency, overstated counts

Because a false merge can expose one customer's data to another, most businesses should set the automatic threshold conservatively and route the middle band to human review rather than merging aggressively.

Merging without losing information

A merge should never be destructive. Keep both source records, link them to a surviving master, and record which fields came from where and when.

  1. Create a master record referencing the sources rather than overwriting.
  2. Define field survivorship rules - most recent verified address, richest contact details - and write them down.
  3. Retain an audit trail sufficient to reverse a merge, because some will be wrong.
  4. Provide staff with an unmerge route that does not require a developer.

The reversibility requirement is not optional in any business handling personal data, and building it in afterwards is considerably harder.

Stopping duplicates at the door

De-duplication is a cleanup; prevention is the fix. Checking for likely matches at the point of entry - and showing the user 'is this the same customer?' - costs one screen and prevents the problem recurring.

Cleaning duplicates without fixing entry is mopping with the tap running.

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

Can this run automatically without review?

Only above a high confidence threshold. Given the cost of a false merge, most businesses should keep a human review band.

Does it work for companies as well as individuals?

Yes, though the signals differ - company names, registration numbers and trading addresses rather than personal identifiers. Registration numbers where available are very strong evidence.

How do we measure how well it works?

Label a sample of pairs by hand and measure precision and recall separately. Precision on merges matters most given the asymmetric cost.

Is this a one-off project?

It should not be. Run it periodically and add matching at data entry, or duplicates simply accumulate again.

Keep reading

More on Data & Scraping

Start here

Want machine learning project details from us?

Tell us what you are trying to predict and roughly what data you hold. We will come back with an honest view on whether machine learning is the right tool, what the work would involve and a realistic cost range. If a spreadsheet would do the job, we will say so.

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →