A product code looks like a small decision. You type one when you create the product and never think about it again. Then it appears on every purchase order, every delivery note, every count sheet and every spreadsheet export for the life of the product, and a bad one causes a small error every time.
A good naming convention takes an hour to decide and saves that hour every month.
Code, SKU and barcode are three different things
The product code (often called the SKU, stock keeping unit) is your internal identifier. You choose it, and it should be unique within your organisation.
The barcode is a number printed on the packaging, usually an EAN-13 in Europe or a UPC-A in North America, issued through the manufacturer. It identifies the product to anyone’s scanner, not just yours. Two suppliers’ versions of the same product carry different barcodes; your own code can stay the same or not, as you choose.
The supplier’s part number is what the supplier calls the product. Keep it on the product record, so that orders use the supplier’s language, but do not use it as your code: it changes when you change supplier.
Seven rules
1. Unique, permanently. A code is never reused, even after the product is discontinued. Old movements, orders and documents still carry it.
2. Short enough to type, long enough to mean something. Eight to twelve characters is a good range. A code is typed on the phone in the warehouse and read aloud over the telephone.
3. Only letters, digits and hyphens. No spaces, no slashes, no accents, no symbols. Spaces are invisible when there are two of them, slashes break file names, and symbols confuse imports.
4. No letters that look like digits. Drop O, I and L, or the digits 0 and 1 next to them. “0” and “O” on a printed label are the same shape.
5. Fixed-width segments. If the code has a sequence number, pad it: 001, not 1. Then it sorts correctly everywhere, in every spreadsheet, in every list.
6. Structure in the first segments, sequence at the end. Put the most useful grouping first, so the list sorts into families on its own.
7. Meaning that will not change. A code that encodes the supplier breaks when you switch supplier. A code that encodes the shelf breaks when you move it. Encode what the product is, not where it is or who sells it.
Two formats that work
Category, family, attribute, sequence. Readable, sortable, and the usual choice for a catalogue with variants.
| Code | Reading |
|---|---|
| CBL-USB-C-100 | Cables, USB, type C, 100 cm |
| CBL-USB-C-200 | Same cable, 200 cm |
| MOT-2K-230-001 | Motors, 2 kW, 230 V, first in the family |
Short prefix and a plain sequence. Less readable, impossible to get wrong, and the better choice when attributes change often or products do not fall into neat families.
| Code | Reading |
|---|---|
| P-000417 | Product 417 |
| P-000418 | Product 418 |
In the second format the name carries the description, and the code carries nothing but uniqueness. Many businesses that start with the first format end up here once the catalogue passes a few thousand products and the categories stop fitting.
Avoid anything in between: codes where some products encode attributes and others do not, or where the same segment means colour on one line and size on another.
Variants
A product sold in sizes or colours needs one code per variant, because each variant is counted, ordered and valued on its own. Keep the family stem identical and vary only the last segment: TSH-BLK-S, TSH-BLK-M, TSH-BLK-L. Then a search for TSH-BLK shows the family, and a count sheet sorted by code keeps the sizes together.
Changing codes on an existing catalogue
Do it once, during a migration or an import, not product by product over months. Build the mapping from old code to new in a spreadsheet, keep the old code in a note on the product for the first year, and tell suppliers who have your old codes on file.
If a renumbering is not worth it, at least freeze the convention for every new product. A catalogue with two clean conventions is far easier to live with than one with twenty.
Codes in StockBold
In StockBold the product code appears under the product name on every list, movement and order, and the search finds a product by code or name. On import, rows that share a code can be merged into one product, with quantities and values added up, which is how a spreadsheet with the same product on three lines becomes one record. Barcodes are checked at import: an EAN-13 or UPC-A with a wrong check digit is flagged before anything is saved.
In the warehouse, your phone camera reads the barcode to find the product when you record a stock-out or a transfer. Shelf positions have their own codes, separate from the product’s, so a product keeps its code wherever it is stored.
Read more about inventory management in StockBold, or the help guide on adding your first product.