All posts

Product matching explained: GTIN, EAN, MPN and what to do when there is no identifier

Hannah Wright · January 22, 2026 · 5 min read

Product matching is the decision that a listing on your site and a listing on a competitor's site are the same sellable item. When both sides publish a GTIN, EAN or MPN correctly, that decision is a database lookup. When they do not, you rebuild identity from brand, model, quantity, pack count and variant attributes, then send anything doubtful to a person to confirm.

Most catalogues are a mix. Packaged groceries and consumer electronics usually carry identifiers. Wine, fashion, fresh produce, private label and made-to-order construction items often carry none. You need a method for both halves, and you need to know which half a given product sits in.

What GTIN, EAN, UPC and MPN actually mean

GTIN is the umbrella term for the numbers printed under a barcode. EAN-13, the thirteen digit number common in Europe, is a GTIN-13. UPC-A, the twelve digit number common in North America, is a GTIN-12. A GTIN-14 identifies a case or outer carton, not the individual item inside it.

Store all of them in a single field, left padded with zeros to fourteen digits. A padded GTIN-12 and a padded GTIN-13 then compare correctly against each other, and you stop writing conversion code in five places.

MPN is the manufacturer part number. The brand assigns it and it is unique only inside that brand. Two manufacturers can each ship a part called A100. An MPN on its own is not an identifier, it is a string. Brand plus MPN is an identifier. SKU is the retailer's own code and means nothing across companies, so work out which of the three a competitor page is showing before you index it.

Use the check digit before you trust the number

Every GTIN ends in a check digit, so you can reject typos before they reach the matcher. Take the first twelve digits of a thirteen digit number: 4 0 1 2 3 4 5 6 7 8 9 1.

Multiply them alternately by 1 and 3, starting with 1 on the left: 4, 0, 1, 6, 3, 12, 5, 18, 7, 24, 9, 3. Those sum to 92. The check digit is whatever brings the total to the next multiple of ten, so 100 minus 92 is 8 and the complete number is 4012345678918. Run this on import. A number that fails is a data error, and treating it as a product creates a phantom that will never match anything.

Why a matching EAN is still not proof

An identifier tells you which trade item a number was assigned to. It does not tell you what the seller has put in the box or on the page. These are the cases that produce confident wrong matches:

  • Multipacks listed under the single unit EAN, so a six bottle case appears to undercut a single bottle by a factor of six.
  • Bundles where the seller reuses the main component's EAN and adds accessories your product does not include.
  • Variant collapse, where one EAN sits on a parent page selling four colours or three lengths beneath it.
  • Marketplace listings where a third party pasted a plausible but wrong EAN into someone else's product page.
  • Grey imports and regional packs with different plugs, manuals, warranties or fill volumes under the same brand and model.
  • Refurbished, B-stock and open box items sold on the new item's identifier.
  • Formulation changes, where the manufacturer kept the number and changed the product, or kept the product and changed the number.

The fix is not to distrust identifiers. It is to require a second signal to agree. If the EAN matches but the price differs from yours by more than a set factor, or the title contains a pack word your product does not have, that pair goes to review rather than into a repricing rule.

Normalising MPNs so they compare

  • Uppercase, then strip spaces, hyphens, full stops and slashes into a comparison key. Keep the original string untouched in a separate field.
  • Do not strip leading zeros. For some manufacturers 0450 and 450 are different parts.
  • Keep a per-brand dictionary of region and colour suffixes such as a trailing EU, UK, B or /2, and score matches with and without the suffix differently.
  • Never match on MPN alone across brands. Always key on brand plus normalised MPN.
  • Normalise the brand first. Bosch, BOSCH and Robert Bosch must resolve to one entity, with the aliases stored rather than overwritten.

What to do when there is no identifier

Build a composite key from the attributes that genuinely distinguish products in your category, and treat free text as a tie breaker rather than a decider. Titles are written by marketers and are the least stable field on any page. In order of the weight each deserves:

  • Brand, resolved through an alias table.
  • Model or line name, extracted as tokens rather than matched as one string.
  • The distinguishing attribute for the category: vintage and grower for wine, active ingredient and strength for pharmacy, dimension and grade for construction, size and colourway for fashion.
  • Quantity and unit converted to a base unit, with pack count held as a separate number.
  • Everything else, including the title, as a similarity score that can move a pair between review bands but never push it straight to accepted.

In wine the composite key is roughly producer, wine name, vintage and bottle size. Get any one of those four wrong and you compare a 2019 against a 2021, or a magnum against a bottle, and the gap looks like an opportunity when it is an error.

A pipeline that survives a large catalogue

Comparing every product against every listing is quadratic and pointless. The working shape has four stages.

  • Block: group candidates by something cheap and safe such as brand, category or the first tokens of a normalised title, and compare only inside a block.
  • Generate: produce a handful of candidate pairs per product, not a ranked list of thousands.
  • Score: combine identifier agreement, attribute agreement and text similarity into one number, and record which signals fired.
  • Route: auto accept above a high threshold, auto reject below a low one, and send the middle band to a human queue ordered by how much money the decision moves.

PriceRoom runs this shape across retail, construction, pharmacy and B2B distribution, and the pattern holds everywhere: the identifier layer is easy, the composite key layer is where the work lives.

Decisions worth writing down before you start

  • What counts as the same product for your business. A 500 ml and a 750 ml bottle are different. A 2019 and a 2020 vintage may or may not be, and your buyers will have an opinion.
  • Whether a bundle can ever match a single item. Usually not.
  • Whether condition matters. Refurbished against new is a different market.
  • Who may confirm a match, and whether the decision is stored as a reusable label.
  • What happens when a competitor's page changes. A match is a claim about two pages at a point in time, not a permanent fact.

Matching correctly is slower than matching quickly and it is the only version worth having. A wrong match feeds a wrong number into a pricing decision, and most of those decisions end with a price lower than it needed to be.