
The sea-green mug and the oat mug arrive under different supplier SKUs. Both rows carry the same barcode number. Its check digit is correct. Which mug does it belong to? That is a question for the supplier before either row goes into Friday’s catalog.
A Global Trade Item Number (GTIN) identifies a trade item. Its last digit helps catch errors when a number is keyed or copied. For a weekly supplier CSV, run that quick check across the delivery, then look for numbers shared between variants that should have separate assignments. Send back a short list that identifies the exact product and the evidence you need.
For this delivery, each row represents one distinct, sellable variant, and the supplier says every variant has an assigned GTIN. Keep three columns: supplier_sku for finding the row again, variant for identifying the color or size, and gtin for the supplied number. Keep the original CSV. If you open a copy in a spreadsheet, import the GTIN column as text so that a value such as 012345000058 retains its first digit.
Agree on the row definition before flagging duplicates. The same item might legitimately appear once for each warehouse in a stock feed. In this catalog, sea green and oat are separate products a customer can order. A shared number between those rows needs an answer.
Accept a string of 8, 12, 13 or 14 digits for the arithmetic check. Set the last digit aside. Starting at the right of the remaining string, multiply the digits alternately by 3 and 1 and add the results. The check digit is the amount needed to reach the next multiple of ten, or zero if the sum already ends in zero. For 012345000058, the weighted sum is 42. Adding 8 makes 50, so the supplied final digit passes. For a single number, use the GS1 US check digit calculator.
Keep that result separate from evidence of which item carries the number. For a disputed assignment, ask for the number on the exact variant’s packaging or the supplier’s authoritative record. Verified by GS1 can identify the assigning company and, when available, the registered product details. Recalculating a last digit cannot tell you which earlier digit someone mistyped.
Download the sample supplier CSV, exception report and Python checker. The tin uses a GS1 demonstration number. The other populated examples use GS1’s 952 demonstration prefix. Keep these identifiers in the exercise. GS1’s guidance on example identifiers explains their intended use.
From the extracted folder, run this command with Python 3. The checker uses the standard library, leaves the input alone and requires a new output filename. Use the supplied exceptions.csv as a reference.
python check_feed.py supplier.csv reviewed-exceptions.csv
Our local run read five rows and wrote four exceptions. It preserved the supplied values in the report. For duplicate comparisons only, it compares the numbers in a common 14-digit representation so that different amounts of leading padding cannot hide a match.
9520000000159 fails the check digit. The report retains it and asks for the complete number from that pack or its supplier record. Editing the last digit would obscure the original error.9520000000233. Each report row names the other SKU. Ask the supplier for the SKU-to-GTIN mapping for both colors. Hold both assignments until the answer distinguishes them.When the replacement arrives, rerun the checks on a fresh copy and compare the affected SKUs with the supplier’s reply. Keep both reports beside their source deliveries. A cleared exception means the row can return to normal catalog review. The example did not query a product registry or submit a marketplace feed.
One catalog editor can run this example on a workstation. If several feeds arrive before the same cutoff, record their combined row count and the time spent reading the files, checking the numbers and writing the exception lists. Track the wait for supplier replies separately. If the processing queue regularly delays review, use those measurements with the CPU VM buying guide to evaluate a shared worker. The five-row example gives no estimate of production capacity.
Pick one AI, compute, or storage workload and see the difference for yourself. Spin it up in minutes, or let our team map your fastest path to production.