Shample Intel
Menu
Catalog quality guide

Review a missing UPC-A leading zero without guessing

Run a reproducible 11-to-12-digit UPC example, inspect the inferred repair, and learn why a passing checksum still needs source confirmation.

IdentifiersUpdated Guide slug: fix-excel-stripped-leading-zeros-upc

The issue to look for

An identifier column imported as numbers can lose a leading zero. A short value is not enough evidence to reconstruct a product identifier: first establish that the original field was UPC-A, not an MPN or another format.

What this check can tell you

This fixture exercises the actual one-zero inference and records its repair count. It distinguishes mathematical validity from recovery of the original supplier value.

A transparent review

  1. Keep an untouched export and identify the expected field format from its specification.
  2. Run the synthetic CSV with default UPC repair enabled; compare 12345678905 with the inferred 012345678905.
  3. Inspect the repair record rather than accepting the valid-identifier count alone.
  4. Confirm the complete identifier against the original source before replacing your working column.

How to read the result

  • The current cleaner adds exactly one zero to an 11-digit value only when the resulting UPC-A passes its check digit. It does not verify brand ownership, pack identity, or whether that was the original identifier.
  • An 11-digit field could instead be a body without a check digit. Adding a leading zero and calculating a trailing digit are different operations; a declared source format is necessary to choose between them.

Limits to keep in view

  • A checksum-valid inference is not a verified product match.
  • Set repairUpcs to false when you need an unchanged short value flagged for review.
  • No original significant digit is reconstructed.
Illustrative sample

Synthetic fixture: synthetic-single-zero.csv

This small synthetic example makes the transformation and observation visible. It is an educational illustration, not a claim that a supplier file or external registry was verified.

Fixture ID
single-zero
Published fixture reference
single-zero
Filename
synthetic-single-zero.csv
Encoding
UTF-8
Options
{"repairUpcs":true,"removeZeroStock":false,"removeZeroCost":false}

Input

UPC,SKU
12345678905,ZERO-1

Output

{
  "checks": {
    "validIdentifiers": 1,
    "repairCount": 1
  },
  "cleanedRows": [
    {
      "UPC": "012345678905",
      "SKU": "ZERO-1"
    }
  ]
}

Observation: The default repair option infers 012345678905; the checksum passes, but the source must still confirm the identifier.

Download synthetic fixture

Sources