Skip to content
Data & documents

Finding and merging duplicates: customer and product records

Duplicate customer and product records: how they arise, how similarity matching and address normalisation find them, and how to merge without losing history.

14 min read DublettenDatenqualitätStammdatenDatenbereinigungNeuanlage

Two records for the same customer, three internal numbers for the same component: duplicates go unnoticed for a long time because each record looks perfectly plausible on its own. They become visible when an invoice goes to an address abandoned years ago, when stock is counted twice in a report, or when two people in sales look after the same customer without knowing about each other. This article describes how duplicate customer and product records arise, how to find them using similarity matching rather than exact equality, and how to merge two records without losing the history attached to them. It also explains why fully automatic merging without human review is risky, and how a check at the moment of record creation stops a cleaned-up database from looking exactly as it did a year later. Anyone connecting systems without tidying up first simply distributes the duplicates faster, which is why this step belongs at the start of any data integration.

Key takeaways

  • Duplicates do not arise from carelessness but from system changes, data migrations, separate entry channels and a record creation process that never checks whether the customer or product already exists.
  • A search for exact matches finds almost nothing: only normalising address, legal form, phone number and spelling makes two seemingly different records comparable in the first place.
  • The comparison does not return a yes or no but a measure of similarity per field, from which three classes emerge: certain match, review case for a person, and clear non-match.
  • Merging is not deleting: the second record stays in place as a locked pointer so that documents, orders and statutory retention duties remain untouched and every merge stays traceable.
  • Fully automatic merging without review is dangerous because a wrong merge is hard to undo in business terms; the lasting fix is a duplicate check at the moment a new record is created.

How duplicates arise, and why this is not a diligence problem

The most common cause is mundane: someone creates a new customer because they cannot find the existing one. Not because it is missing, but because it is spelled differently. The search box expects the beginning of the name, while the person searched for the second part of it. The legal form was written out once and abbreviated the other time. The street name appears once with a full stop and once spelled out. In that situation creating a new record is the sensible reaction, because the job has to move on. The duplicate therefore appears exactly where someone is doing their work, not where someone is being careless.

The second major source is data migration. At every system change, every merger of two databases and every import from a list, records meet that describe the same reality but are built differently. If the import contains no check, a few minutes create more duplicates than years of manual work. Anyone planning a legacy migration should therefore place the clean-up before the migration rather than after it, because in the target system the records are already linked to new transactions and are much harder to separate.

The third source is separate entry channels. A contact form on the website creates a prospect, the shop counter records the same person at the till, the field service keeps its own list. As long as these channels do not look at the same database, the duplicate is a property of the system and not a question of discipline. With product records there is an added twist: purchasing, warehouse and sales use different names for the same part, often for good reasons. A duplicate is rarely a typing mistake and almost always the result of a process without a checkpoint.

Three terms worth keeping apart

A duplicate is a second record for the same object inside the same database, for example a customer held under two numbers. A variant is a deliberately separate record for a different reality, for example a second branch of the same company with its own delivery address. An inconsistency exists when the same record carries different values in two systems. The remedies differ: the duplicate is merged, the variant is labelled and linked, the inconsistency needs a leading system and a data route.

What duplicate records actually cost

The visible part of the cost is small: a few minutes of searching, the occasional query. The expensive part sits in the consequences. If a customer is held under two numbers, their turnover is split across two records. The report shows two medium customers instead of one large one, the discount tier does not apply, the picture of open items is wrong, and a credit limit is used up halfway twice instead of once in full. Anyone who wants meaningful metrics and reporting is not measuring the business in a duplicate-ridden database, but the quality of the data.

With product records the effect is even more direct. Two internal numbers for the same component mean two stock levels, two reorder points and two purchase suggestions. The part is physically present and gets reordered anyway, because one record is empty and the other is not. During stocktaking it is counted twice or missed once. In production, a second number for the same material makes bills of material drift apart and costings incomparable.

  • Duplicate outreach in sales: two people look after the same customer without seeing each other's history
  • Invoices and reminders sent to an outdated address because the change was only made on one of the two records
  • Incorrect turnover, stock and margin reports because amounts are spread over several records
  • Unnecessary purchase orders and tied-up capital because an existing item is held under a second number
  • Higher effort in any mass communication because recipients are addressed more than once
  • More work on access and erasure requests because all records for one person have to be found first

The last point also has a legal side. The General Data Protection Regulation states the principle that personal data must be accurate and, where necessary, kept up to date (European Commission). A database with many duplicates makes it harder to answer an access or rectification request completely. How this is to be judged in your particular case belongs to a review with your legal advisers; this article does not replace one.

Assessment: how many duplicates are actually in there?

Every clean-up starts with a measurement, and it is simpler than it sounds. The goal is not a figure to two decimal places but an order of magnitude: are we talking about a few dozen cases or about a structural share of the database? That answer decides whether an afternoon is enough or whether a tool has to be built. Build groups based on unambiguous attributes and count how many records fall into each group. A group is not yet a duplicate list, it is a candidate list.

Building candidate groups, order of evaluation
Step 1  Record the baseline: number of all customer and product records
Step 2  Group: same postcode and same house number
Step 3  Group: same e-mail address, consistently lower case
Step 4  Group: same phone number without spaces and separators
Step 5  Group: same VAT identification number
Step 6  Group for products: same manufacturer or supplier number
Step 7  Combine the hits = candidate list for review

# A candidate group is not yet a duplicate
# Always run the evaluation on a copy, never in the live system
# Record the result per group so the rules stay assessable

Take a small sample from each group and actually look at the records. You will quickly see which rules carry weight and which produce too many false hits. The same phone number is a strong attribute for private customers and a weak one for business customers behind a central switchboard. The same postcode with the same house number works well in rural districts and badly in office buildings. Write these observations down, because they are the basis for the matching rules that follow.

Address normalisation: the groundwork without which matching fails

A comparison can only find what has been made comparable. Normalisation therefore comes first: for every field an additional comparison value is calculated that serves matching only and leaves the original untouched. This point deserves its own rule: the displayed value stays as it is, only a background copy is normalised. Otherwise a clean-up rewrites customer names, and that surfaces with the next invoice at the latest.

Normalisation: raw value and comparison value
Raw value                      Comparison value
High St. 12 a             ->   high street 12a
High Street 12A           ->   high street 12a
High-St. 12a              ->   high street 12a

(0 152) 288 173 86        ->   4915228817386
+49 152 28817386          ->   4915228817386
0152 / 28817386           ->   4915228817386

Name with legal form      ->   split off the legal form, compare it separately
Post box instead of street->   own field, never mixed with the street address
Care-of and additions     ->   own field, never inside the street line

# Treat accented characters the same way on both sides of the comparison
# Comparison values are stored in addition, never in place of the original

For addresses it pays to treat street, house number and additions separately. The house number should be its own field, because matching has to test it strictly while the street name may be compared loosely. Town names should be checked against the postcode: a correct postcode with a misspelled town is a very good hit, while a wrong postcode with the same town is a weak one. International addresses need their own rules for country codes and postcode formats; anyone working in one country only can save that effort.

Without normalisation even the best matching method finds close to nothing. The reason is simple: the differences between two duplicates rarely sit in the core of the name, they sit precisely in the parts normalisation removes, namely abbreviations, legal forms, spacing, punctuation and case. Skip normalisation and go straight to similarity, and you get many review cases and few certain matches, turning the clean-up into manual work that nobody finishes.

Similarity instead of equality: how matching works

The matching itself does not compare whole records but individual fields, and it returns not a yes or no but a measure of how close two values are. Two names differing in a single letter are very similar; two names with swapped parts are similar as well, even though no character sits in the same position. One simple method counts how many character changes would be needed to turn one value into the other. Another compares how a name sounds, which helps with names taken down over the phone. A third splits both values into short character sequences and measures the overlap, which works well against swapped word order.

These field scores are then combined with weights. Not every field carries the same weight: a matching VAT identification number is a strong argument, a matching postcode on its own means almost nothing. Conversely, a single differing field must not discard a match immediately, because that is exactly where duplicates differ. What helps is a small written set of rules stating, for each field, how strictly it is compared and how much it counts. That set belongs in your process documentation, otherwise nobody remembers after the first run why a case is on the list.

Strong attributes first

VAT identification number, company register number, your customer number at the supplier, manufacturer or supplier product number and the full e-mail address are strong attributes. Where they match, the case is usually clear and needs only a short visual check.

Weak attributes only in combination

Town, postcode, industry or a central switchboard number say little on their own. They only carry weight when several of them match at once. Weighting them highly in isolation produces review lists that nobody works through.

House number strict, street loose

Street names are written in many ways, house numbers rarely are. A loose comparison of the street name combined with a strict test of the house number is markedly more reliable than a loose comparison of the whole address line.

Carry counter-evidence along

Differing VAT identification numbers, differing bank details or a clearly different contact person are arguments against a merge. They should lower the overall score and be visible on the review screen rather than quietly disappearing.

Computationally, comparing every record against every other record is too expensive on larger databases. Grouping therefore comes first: only records that agree on a coarse attribute, for example the first letter of the normalised name together with the postcode, are compared at all. This pre-grouping cuts the effort considerably, but it has a price: choose a grouping attribute that differs within a duplicate pair, and you will never find it. In practice it helps to run two or three groupings one after another and combine the results.

Three classes, three treatments

The weighted score produces three classes, and that split is the core of any dependable approach. Above a high threshold sits the certain match, below a low threshold the clear non-match, and between them the review case. The two thresholds are not constants of nature but settings calibrated against a sample: take a few dozen pairs, decide by hand and check where the score reflects those decisions.

AspectCertain matchReview caseNo match
Typical situationStrong attribute equal, rest consistentAddress similar, strong attribute missingOnly one weak attribute equal
TreatmentMerge proposalReview list for the departmentKeep separate
Who decidesDepartment, released in batchesDepartment, case by caseNobody, just document it
Effort per caseSecondsMinutes, sometimes with a queryNone
Main riskA variant mistaken for a duplicateThe list grows faster than it is worked throughThe duplicate stays undetected
CountermeasureSpot check after every releaseFixed slot in the weekly planSecond grouping on another attribute

The review case is where most clean-up projects come apart. Not because it is technically hard, but because without a named owner and a fixed time slot the list simply sits there. Plan from the start who works on it for how long each week, and put the list where those people already work. A review list in a separate tool that nobody opens is a list that does not exist.

Product records are harder than customer records

With customers there is usually at least one strong attribute: an address, an e-mail address, an identification number. With products that is often missing. Two records for the same component differ in wording, in the order of attributes, in the unit and sometimes in the pack size. A description made of material, dimension, colour and standard can be written in many orders, and every one of them has been used somewhere in the business. Pure text matching therefore carries less far for products than for customers.

What does carry weight are external numbers: the manufacturer's part number, the supplier's number, a standard designation, a drawing number. These fields exist in many databases but are poorly maintained, because nobody needs them day to day. That is exactly why it pays to fill them in during the clean-up: they are both the best matching attribute and the best prevention against future duplicates. Where they are missing, only a combination of normalised description, unit and product group helps, and those results almost always belong in the review class.

  • Check the unit before comparing: pieces, packs, metres and kilograms must not be mixed
  • Pack sizes and containers are variants rather than duplicates and need a link instead of a merge
  • Discontinued items with a successor are not duplicates either but a succession relationship with its own field
  • Split descriptions into attributes: compare material, dimension, standard and colour separately rather than as one text field
  • Check bills of material and open purchase orders before merging, because they point at the old number
  • Check barcode and label printing after the clean-up so that no number is left without a marking in the warehouse

Merging without losing the history

Merging is not deleting. A customer record with orders, invoices and documents must not disappear, because transactions subject to retention rules hang on it. The usual route is different: one record is designated the surviving record, all references are moved onto it, and the second record stays in place but is locked for search and new entries and carries a pointer to the survivor. Every old document number remains findable, and a later audit can trace what was merged.

Which record survives is a business decision, not a technical one. Usually it is the one with the most transactions or the more recent address, but not always: if the older record has maintained bank details, a correct VAT identification number and an agreed payment arrangement, it is the better basis. The review screen should therefore show both records field by field and allow a choice per field, rather than adopting one record wholesale.

Before the first merge a full backup is taken and its restore is tested. Regular backups are among the basic measures of IT security (Federal Office for Information Security). The first run happens on a copy, not in the live system.

Before moving references, check which neighbouring systems know the old number. An online shop, a time recording system, a shipping service or a reporting tool may point at the second record. Where those systems are connected through interfaces, the merge has to reach them or at least be resolvable through the pointer. Otherwise the duplicate reappears in the neighbouring systems as soon as the next synchronisation runs.

Why automatic merging without review is dangerous

A matching method can be very good at finding candidates and still be entirely unsuited to deciding on its own. The reason lies in the nature of the two possible errors. If a genuine duplicate is not found, the situation stays as it already was: inconvenient, but no new damage. If two different records are merged, a new and wrong state is created, and the transactions of two different customers now hang on one record. These two errors are not equally severe, so they must not be treated equally.

Particularly exposed are cases that look very similar to a matching routine but belong apart in business terms: two branches of the same company at the same address, two people with the same name in the same building, father and son in a family firm, a property company and an operating company sharing an address, a site address that temporarily coincides with a company address. In all of these the similarity is high and the right decision is still to keep them separate. Merging is a business decision, not a technical operation.

A duplicate that goes unfound costs search time. A wrongly merged customer relationship costs trust, and it can only be unwound with considerable effort and rarely in full.

Basic rule of data clean-up

Automate everything up to the proposal

What should be automated is everything up to the decision: normalisation, grouping, matching, sorting candidates by score, pre-selecting the fields and preparing the log. The release stays with a person who can judge the customer or the product. For very certain matches, for example an identical VAT identification number together with an identical address, a batch release is defensible provided spot checks are made and a reversal remains possible.

Prevention: the check belongs in record creation

A one-off clean-up is a snapshot. Without prevention the database looks the way it did before after a while, because the cause is unchanged. The most effective lever therefore sits where duplicates arise: at record creation. As soon as name and postcode, or description and manufacturer number, have been entered, the system searches the existing data and shows similar records before anything is saved. The timing is what matters: a check after saving only produces another list, a check before saving prevents the record.

Terminal
# New customer: name and postcode entered
Check against existing data running, before saving Similar records shown with address and last transaction Choice: use the existing record or create a new one with a short reason
# New product: description and manufacturer number entered
Hit found on the same manufacturer number Note: part already held under a different internal number New record only after release by master data maintenance

For this check to be accepted it has to be fast and helpful. A display that takes three seconds and then shows an unsorted list will be bypassed. A display that appears immediately, shows the closest records first and names the last transaction for each saves the person entering data some work and will therefore be used. The same applies to search: many duplicates arise because the search only finds the beginning of a name. A search that also matches inside words and works on normalised values prevents more duplicates than any rule.

A short set of maintenance rules helps as well: who may create master records, which fields are mandatory, how legal forms and address additions are written, and where changes are reported. Two pages are enough. What matters more than the length is that the rules are shown on real cases during the rollout rather than handed out as an appendix nobody reads.

Rollout: sequence, ownership and evidence

Start with the data that causes the greatest damage, which in most businesses means customer records, because invoices and communication hang on them. Work through the certain matches there first, because they are quick and produce a visible result. Only then move into the review cases, and only then into the product data. The vast majority of companies in Germany are small and medium-sized enterprises (Federal Statistical Office), and there is no data quality department there: an approach demanding more than a few hours per week will not be sustained.

Name an owner per data set. Not as an extra box on the organisation chart, but as a clear answer to the question of who decides, in case of doubt, whether two records are the same customer. Without that person review cases circulate and the list grows faster than it is worked through. For products the ownership is usually shared between purchasing and the warehouse; in that case an agreement is needed on who has the final say.

Finally, measure the same things you measured at the start: number of records, number of candidate groups, number of open review cases and the number of new records created per month. The last figure is the most interesting one, because if new records drop noticeably after the check is introduced, the duplicate problem really was a process problem. Record the baseline and the rules so that nobody starts from scratch next year. Where the clean-up is part of a wider tidying-up effort, it belongs inside a process analysis rather than in an isolated project of its own.

This article is based on data from: Federal Statistical Office, European Commission, Federal Office for Information Security and our own project experience.

Related Articles

Data & documents

Getting master data in order: customers, articles, suppliers

Customers, articles, suppliers: which system leads, which fields are mandatory and how to clean up master data without halting your daily operations.

14 min read
Practice & rollout

Replacing the grown spreadsheet: when and how it pays off

When a spreadsheet becomes a shadow core system: five weak points, three decision questions and a transition path with a parallel run instead of a standstill.

14 min read
Data & documents

Text recognition in practice: what it reads, what it guesses

Text recognition realistically assessed: clean sources versus carbon copies, stamps and handwriting, measuring quality, fields to extract, effort per type.

14 min read