Generating internal barcodes

3 min read ·Updated

Items with no factory barcode? Define one formula in catalog settings, then generate a correct internal barcode for each item from its own window. This article covers formulas, types and notes.

On this page
  1. Why an internal barcode?
  2. Defining a formula
  3. Generating from the item window
  4. The note and the barcode unit
  5. Which type?
  6. After generating

Why an internal barcode?

Produce, bakery goods, local products and clothing often arrive with no barcode, or with the same barcode on different items. An internal barcode solves that: a unique number you generate, print on a label, and scan at the register like any factory code. Sahl generates it from a formula you define once, so nobody types numbers by hand and nothing repeats.

Defining a formula

Open Items, then Catalog settings (the last entry of the Items menu) and under "Barcode generation formulas" press Formula:

  1. Name: what appears in the "Generate barcode" menu inside an item, such as "Shelf label" or "Clothing".
  2. Key: a fixed Latin word derived from the name. The sequence is tied to it, so do not change it once you start generating.
  3. Type: EAN-13 (13 digits, read by every scanner and scale), EAN-8 (8 digits for tiny labels) or Code 128 (letters and digits, any length).
  4. Prefix: the fixed leading characters of every barcode. Digits only for EAN; letters, digits and dashes for Code 128.
  5. Sequence digits: computed automatically for EAN (12 or 7 minus the prefix length); for Code 128 you choose 1 to 12.

Next to each formula you see the first barcode it will produce, check digit included. Save the page and the button becomes available in items.

A safe EAN-13 prefix

Barcodes starting with 2 are reserved worldwide for in-store use, so they never collide with a real manufacturer code. A prefix like 200 leaves 9 sequence digits: a billion barcodes. If your scale also prints labels starting with 2, pick a different prefix from the scale's (for example 21) so the register never confuses them.

Generating from the item window

  1. Open the item, then the Barcode aliases tab.
  2. Press Generate barcode and pick the formula. A new row appears with the barcode filled in and the note "Generated: formula name".
  3. The item's first barcode becomes the primary automatically. Save the item.

Every click reserves the next number immediately, even if you close the window without saving; gaps in the sequence are normal and harmless. The generator also skips any number already used on another item.

The note and the barcode unit

Each barcode has a free note that helps when an item carries several codes: "supplier label", "old pack", "carton of 12". The note is never printed or scanned; it is for you and your team.

The unit field no longer appears in the window: a barcode is recorded on the item itself and the cashier sets the quantity. Older barcodes that were tied to a unit keep working as before.

Which type?

TypeWhenWatch out
EAN-13The default for everything: every scale and scanner reads itDigits only, 13 of them, the last being a computed check digit
EAN-8Very small labels (jewellery, perfume, accessories)Only 7 digits for prefix and sequence together
Code 128You want letters in the code: CT-00042Longer on the label; some scales do not read it

Do not edit the key or type after you start

Changing a formula's prefix or type produces new numbers from the same sequence; old barcodes stay valid but will not follow the new shape. If you want a different shape, add a new formula with a new name and leave the old one alone.

After generating

Print the barcode as a label from Printing barcode labels. Weighed items whose labels come from the scale need no generation; see Barcodes and units.

Frequently asked questions

I generated a barcode and then did not save the item. Is the number lost?

Yes, it was reserved and will not be reused. The gap in the sequence affects nothing; the next barcode takes the following number.

Does a scanner read a generated barcode like a factory one?

Yes. A generated EAN-13 is a standard barcode with a correct check digit; scanners and scales treat it like any product code.

I have many items without barcodes. Can I generate in bulk?

Generation is currently per item window. Use CSV import for new items with the barcode column empty, then generate for each item the first time you print its label.

Can I type an internal barcode by hand instead of generating?

Yes, type it directly in the barcode row. The generator skips used numbers, so the two never collide.

Was this article helpful?