Set an SKU and barcode for a product variant in Shopify
An SKU is the short code you use to track a variant in your own stock records, and a barcode is the code a scanner reads at the till or in the stockroom. This tutorial sets both on each Trail Crew Tee variant, so a scan or a stock count points at exactly one size and colour.
Written · Shopify admin, desktop steps · 5 minutes read
The worked example
| Product | Trail Crew Tee |
| Variants | 6 |
| SKU pattern | TCT-S-R and so on |
| Barcodes per variant | Up to 20 in a CSV file |
| Where to set them | Variant details page |
Download the record: trail-crew-tee-sku-barcode.csv (248 bytes).
An SKU and barcode record for the 6 Trail Crew Tee variants. Use it to check shelf labels against the admin before a stock count.
1Open the product and pick a variant
From your Shopify admin, go to Products, click Trail Crew Tee, then click the variant in the Variants section, for example Small, Red. The variant details page is where the SKU and barcode live.
2Enter the SKU
In the Inventory section, find the SKU field and enter TCT-S-R. Use a short code that reads the same on a shelf label and in a stock list: product, size, colour.
3Enter the barcode
In the Barcode field, enter the barcode printed on the shirt label, for example 012345678905. A barcode with no type is treated as a Custom barcode; a GTIN or UPC can be marked with its type when you import by CSV file.
4Save the variant
Click Save. The SKU and barcode are stored on that variant only, so the Small Red shirt and the Small Blue shirt keep different codes.
5Repeat for the other five variants
Open each of the other five variants and enter its own SKU: TCT-M-R, TCT-L-R, TCT-S-B, TCT-M-B, and TCT-L-B, with each variant's own barcode. Six variants need six different SKUs, or your stock counts will mix variants together.
6Check the list reads back correctly
Go back to the product page and open the variant list. Each row should show its own SKU. If two rows share a code, fix it now, before the next stock count.
The arithmetic
| Figure | Number |
|---|---|
| Variants needing an SKU | 6 |
| SKUs entered | 6 |
| SKUs shared between variants | 0 |
| Barcodes allowed per variant in a CSV file | 20 |
Six variants need six SKUs, and the file lists six, with none shared. A CSV file can hold up to 20 barcodes for one variant, separated by semicolons.
Held at the counter
An SKU is not a barcode. The SKU is your own tracking code; the barcode is the printed code a scanner reads. Typing the same value in both fields is fine if that is your system, but do not assume a scanner will read an SKU.
A blank SKU cannot be searched. If you use a custom fulfilment service, the SKU column cannot be blank. Enter an SKU for every variant that service handles, or the service cannot match the order to the item.
Changing a barcode type needs the CSV format. In a CSV file, mark the type before the value, such as GTIN:00012345678905. A barcode typed into the admin without a type is stored as a Custom barcode.
Sources
- Using CSV files to import and export products — Shopify's help pages: the SKU column, the Barcodes column with its 20 barcode limit and type format, and the rule for custom fulfilment services.
- Adding variants — Shopify's help pages: SKUs, barcodes, and locations can be set for new variants after they are made.