The CRM, the ERP and the invoicing tool each keep their own customer record, and none is complete. How duplicates appear, why comparing every record with every other one does not scale, how record linkage scores a pair, and who must own the master data so the duplicates do not come back.
Ask three departments how many customers the company has. Sales answers from the CRM, finance from the ERP, leadership from a dashboard. The three numbers differ, and none is wrong: each system counts its own records. The same customer exists in them under three names, with three addresses.
This is not a tool problem. It is a master data problem: nobody has decided which record is the reference, or how to recognise that two records describe the same company. The good news is that the problem is old and well studied. Statisticians have been linking records that lack a shared identifier since the 1960s, and the methods they built are now available in open-source tools. This article walks through them in the order you would apply them.
How duplicates appear
Duplicates almost never come from a single mistake. They come from normal practice:
- several entry points: sales creates the prospect in the CRM, finance creates the customer again in the ERP when it invoices;
- free-text entry: "BENNANI SARL", "Bennani S.A.R.L." and "Ste Bennani" are the same company;
- missing identifiers: without an ICE, nothing links two records;
- data migrations: every migration or file merge adds its own variants;
- subsidiaries and sites: one group, several establishments, and nobody has decided at which level a "customer" is counted.
The last point is a decision, not a cleaning task. Before matching anything, write down what one customer means for your business: the legal entity, the site that receives deliveries, or the group. The same three records can be one customer for finance and three for logistics, and both are right.
Why you cannot compare everything with everything
The obvious method is to compare each record with every other one. It does not scale. With n records there are n × (n − 1) / 2 possible pairs, so the work grows with the square of the file size. A customer file of 18,204 records already holds about 166 million pairs. A file of one million records holds about 500 billion.

The answer is called blocking. Instead of comparing every pair, you only compare records that share a simple key: the same city, the same first letters of the company name, the same phone prefix. Two records that share nothing on any key are never compared. The Splink documentation describes blocking rules as the most important factor in how fast a linkage runs, and it produces every pair that satisfies at least one of the rules. Using several rules, each on a different field, means a typo in the city does not hide a duplicate that shares a phone number.
Matching rules, from the safest to the least certain
Inside each block, records are matched with written, tested rules, not by eye. Start with the rules that cannot be wrong, and only move on when they run out:
- same official identifier: two records with the same ICE are the same company;
- same normalised company name and same city: after removing the legal form, punctuation and capitals;
- same phone number or email domain, combined with a similar name;
- similar name only: a similarity score, for example above 0.92, sent to human review rather than merged automatically.
Deterministic rules like these are easy to explain and to audit. Their limit appears quickly: real records disagree on some fields and agree on others, and a fixed rule cannot weigh that evidence. That is where probabilistic matching comes in.
How record linkage scores a pair
The method most tools still use was published in 1969 by Ivan Fellegi and Alan Sunter, two statisticians at what is now Statistics Canada, under the title A Theory for Record Linkage. The idea fits in three steps.
First, compare the two records field by field: name, address, phone, email, ICE. Each comparison gives a level of agreement, such as exact, close or different.
Second, ask two questions for each level. How often do two records of the same company agree like this? And how often do two records of different companies agree like this by chance? Agreeing on a rare email address is strong evidence. Agreeing on a common city is weak evidence, because thousands of unrelated companies share it. The ratio of those two probabilities is the weight of that field.
Third, add the weights. Fellegi and Sunter showed that comparing this total with two thresholds is the best possible decision rule for a given level of error: above the upper threshold the pair is a match, below the lower one it is not, and in between it goes to a person.

This chart is worth reading slowly, because it shows why probabilistic matching beats a fixed rule. The two records disagree on the date of birth and on the city. A rule that required both to match would have rejected the pair. The model sees that the first name, the surname and above all the email address agree, and that this combination almost never happens by chance.
The model has one known weakness. It treats each field as independent evidence, and in practice fields are often linked: a postcode and a city say nearly the same thing. Counting both inflates the score. Choose fields that bring different information, and check the thresholds on a sample of pairs reviewed by someone who knows the customers.
You do not have to build this yourself. Splink, an open-source library developed by the UK Ministry of Justice, implements the Fellegi and Sunter model and runs on ordinary data warehouses. Other tools exist. What matters is that the rules and weights are visible and can be explained to the person who owns the customer data.
From pairs to groups
Matching gives pairs. A customer file needs groups: every record that describes the same company, gathered under one identifier.


Grouping follows the links: if A matches B and B matches C, all three end up together. This is also the main risk. One wrong link between two large groups merges two different companies, and every invoice of one appears under the other. Two habits prevent it: review the largest groups by hand before publishing, and keep every merge reversible, with the records combined, the rule or score that combined them, and the date.
Golden records
Once records are grouped, one record has to become the reference for each group: the single record, often called the golden record. It does not copy a source at random. It keeps the best value for each field, by rules decided in advance:
- the company name and ICE come from the most controlled source, often the ERP;
- the address kept is the most recent and complete one;
- the sales contact comes from the CRM, where it is kept up to date;
- each value keeps its source and date, so you know where it came from.
Illustrative example: three records of the same customer in the CRM, the ERP and billing merged into a single record, keeping the best value for each field.
The golden record is then sent back to the systems, or at least used by every report. It is what gives one customer count.
Who owns the master
Without an owner, duplicates come back within months. Customer master data needs:
- a business owner, often in sales or finance leadership, who settles ambiguous cases;
- a creation rule: a new record is created only after a search on ICE and name;
- entry checks: mandatory ICE, format checked, alert on a likely duplicate;
- monitoring: duplicates detected each month, and time to resolve them.
The entry check matters most. Matching the history once is a project. Stopping new duplicates at the door is what keeps the result.
What it unblocks
Reliable customer master data is not an end in itself. It makes possible:
- accurate revenue per customer, and therefore real segmentation;
- collections and campaigns that do not contact the same person three times;
- accepted e-invoices, with the right ICE;
- AI or scoring projects that learn from real customers, not duplicates.
Where to start
- Write down what one customer means: legal entity, site or group.
- Export customers from each system and count the records.
- Apply the safest rule, the same ICE, and measure the obvious duplicates.
- Choose blocking keys and score the remaining pairs, with two thresholds and a review queue in between.
- Name an owner, review the largest groups with them, then add the entry checks before merging the history.
This is the core of our governance, quality and master data work. Our data platform assessment measures the scale of duplicates across your systems in two to three weeks.
Sources
- Ivan P. Fellegi and Alan B. Sunter, "A Theory for Record Linkage", Journal of the American Statistical Association, vol. 64, no. 328, 1969, pp. 1183-1210. Scanned copy, Cornell University.
- Splink documentation, "Blocking rules", UK Ministry of Justice. moj-analytical-services.github.io/splink.
- Splink documentation, "The Fellegi-Sunter model", UK Ministry of Justice. moj-analytical-services.github.io/splink.
- Splink source code and README, UK Ministry of Justice, MIT licence. github.com/moj-analytical-services/splink.

