Meet Edi AI

AI agents that work with your business data.

Operations and supply chain

Barcode creation: from product mapping to label testing

Identify the product, variant and packaging unit before creating a barcode. Choose the data carrier, then use worked examples to check the printed label, scanned data and transaction result.

A worker holds a handheld scanner toward a small cardboard box on a warehouse bench.
In this article
  1. 1. Decide where the barcode will be scanned
  2. 2. Separate product identity from the barcode image
  3. 3. Prepare the data, then choose the barcode type
  4. 4. Test printing with the actual label and packaging
  5. 5. Follow the scanned code through to the recorded transaction
  6. 6. Correct the problem at the right stage and record the retest

Creating a barcode involves more than turning a number into bars or a two-dimensional symbol. You need to establish which product, variant and packaging unit the label represents, encode the data in a format the receiving system accepts, and then test it on the actual package.

A beep from the scanner is only part of the picture. The label on a box containing eight items may scan successfully, yet the transaction may record just one item. Printing a darker label will not solve that problem: the error lies in how the code maps to the product and unit.

Organize barcode preparation around three independent acceptance checks: correct identification and mapping, a suitable data carrier, and the correct transaction result from the actual label.

1. Decide where the barcode will be scanned

Your first decision concerns the workflow, not the barcode's appearance. Are you preparing a code for receiving goods in your own warehouse, for boxes sent to a customer's warehouse, or for sales at a retail checkout? These environments may accept different identifiers, data formats and scanning equipment.

For a label used only within your business, establish how the relevant application will recognize your internal product code. For a label going to another business, successful scanning on your own equipment is not enough. Confirm in advance which product identifier the recipient expects, which barcode types they accept, and what record their system should create after a scan.

When documenting the requirement, give specific answers to these four questions:

  • Who will scan the label, and during which operation?
  • Is the scanned object an individual item, a multipack or a box?
  • Which identifier and data format does the receiving system expect?
  • Can the intended scanner and application work together to process this barcode type?

For example, do not assume that an internal code used to receive boxes in your warehouse will also work at a retail checkout. Likewise, a phone's ability to read a two-dimensional code does not show that a point-of-sale application can process its data as a product sale. Hardware decoding the symbol and software interpreting the data are separate matters.

By the end of this step, your expectation should be testable. Instead of simply stating that a barcode must be printed, specify that it will be scanned when receiving a box, identify the correct variant, and record the box contents using the correct unit.

2. Separate product identity from the barcode image

Keep three concepts distinct. An internal stock code, or SKU, is the identifier your business uses in its product records. A GTIN is a trade item identifier. A barcode symbol is the image that carries data in a machine-readable form. Creating an image with a barcode generator does not automatically allocate a global product number to you.

Start by reviewing existing records. If the product already has an identifier for the intended trading context, confirm that it belongs to the correct product and packaging level rather than generating a new number. If a new trade item identifier is needed, complete the relevant allocation process separately. Do not assume that an external recipient will accept your internal stock code; assess the need for a GTIN in the context of the intended use.

Do not check identity by product name alone. Put the blue and black variants of the same model on separate rows, and distinguish an individual item from a box of eight. Each row should clearly identify the product, variant, packaging being scanned and unit used in the transaction.

The following table is a hypothetical internal test setup. The codes are not real GTINs; they are used only to illustrate the mappings in this example.

Internal test code Product and variant Unit carrying the label Expected meaning of one scan
blue-each Blue pen Individual item 1 blue pen
blue-box8 Blue pen Box containing 8 items 1 box, equivalent to 8 blue pens in the base stock unit
black-each Black pen Individual item 1 black pen

Prepare this table before creating the barcodes. It lets you check whether the same code has accidentally been linked to two different variants or whether a box code is being treated as an individual item.

What does a check digit validate?

A check digit is used to check arithmetic consistency within the relevant numbering scheme. A correct check digit does not, however, prove that the number belongs to you, is linked to the correct product, or is not already used in another record.

If your identification scheme requires a check digit, validate it using the rules of that scheme. Do not treat a successful result from a validation tool as approval of the product mapping. Keep number validation separate from checks on the product, variant and unit.

3. Prepare the data, then choose the barcode type

A barcode symbology is the encoding scheme that determines how data becomes a symbol. When choosing between one-dimensional and two-dimensional options, consider more than the space they occupy on a label. Base your choice on the data format the recipient accepts and compatibility between the scanner and application.

First, finalize the exact data string to be encoded. Do not remove leading zeros from an identifier or arbitrarily change required separators or data structures. When transferring data from a spreadsheet to another program, in particular, compare the displayed value with the value entered into the barcode generation tool. Treating an identifier field as a number for calculation can introduce seemingly minor changes that affect the mapping.

Generate the symbol in this order:

  1. Start with validated data. Do not generate labels from a list whose product and packaging mappings have not been approved.
  2. Select an accepted barcode symbology. Do not substitute the tool's default option for the recipient's requirements.
  3. Enter the data in the selected format. Check how the tool's settings handle the check digit and data fields so that you do not accidentally add the same information twice.
  4. Place the symbol in the label template. Preserve the dimensions and quiet zones required for the intended application.
  5. Check the data decoded from the generated symbol. Confirm consistency between the human-readable text on the label, the encoded data and the product record.

For example, the label text might say blue-box8 while the symbol encodes blue-each. Looking only at the text will not reveal that error. Conversely, the symbol may carry the correct data while the product description beside it is wrong. Check both fields separately.

If the recipient supports more than one barcode type, make your choice by testing the intended data on the actual packaging. Do not replace an existing one-dimensional symbol with a two-dimensional symbol simply because it looks newer. Changing the data carrier also requires you to repeat the data-processing and transaction-result tests.

4. Test printing with the actual label and packaging

A symbol that looks correct on screen may not perform the same way once printed and attached to packaging. Barcode dimensions, the surrounding quiet zone, contrast, print quality and placement affect readability. No single measurement in millimeters or printer resolution applies to every symbol and operating environment.

When designing the label, do not treat the required quiet zone around the barcode as spare space for other text. Borders, product descriptions and cut lines must not intrude into it. Cropping the area around the symbol when reducing a label's size is not a safe way to save space.

Do not judge contrast solely by its appearance on screen, either. Check it using the actual label material, print and packaging surface. Look for reflections, curvature, wrinkles or damage, and check whether the symbol sits across a package seam or a section that folds.

Do not assume that stretching or compressing a pixel-based barcode image in a design program is safe. If the dimensions need to change, regenerate the symbol with suitable settings and test the new print again. A file that looks sharp on screen is not, by itself, evidence of print quality.

Run the trial with the printer, label material, template and packaging that will actually be used. Do not stop at scanning the label on a flat sheet of paper; attach it in its intended position. For example, do not assume that a layout that works on a box will also suit a differently shaped package.

Select test samples to reflect the conditions your business will encounter. Assess different packaging types or receiving environments separately. Do not conclude from one successful trial that every label will scan under all conditions.

5. Follow the scanned code through to the recorded transaction

Run transaction tests in a controlled environment that will not affect live records. Write down the expected result before scanning. Changing the expectation after seeing the result can lead you to accept an incorrect mapping without noticing it.

Check in this order:

  • Decoded data: Is the exact value transmitted by the scanner the same as the value you intended to encode?
  • Matched record: Did the application select the correct product and variant?
  • Unit and quantity: Did the scanned packaging translate into the correct transaction quantity?
  • Recorded result: Once the transaction was completed, did the relevant record change as expected?

If a code is unknown, do not link it to the product with the closest name just to move the transaction forward. Establish which product the code belongs to, validate the mapping and then repeat the test.

Example: A box of eight scans, but stock increases by only one item

In this hypothetical test, the opening stock balance for blue pens is 40 items. One box arrives at the warehouse, containing eight pens. Scanning the blue-box8 label once should record a receipt of one box as eight items in the base stock unit:

40 + 8 = 48 items.

Suppose the scanner correctly transmits blue-box8, but the application's mapping treats that code as one blue pen. The result is then:

40 + 1 = 41 items.

The difference between the expected and actual stock balance is 48 − 41 = 7 items. The label was read successfully; the problem is the box-to-item mapping, not the print.

There is an important distinction here: a quantity of “1” on screen is not necessarily an error. If the unit is “box” and the conversion is eight items, the result may be correct. If the transaction records “1 item” and stock increases by only one item, the mapping is wrong. Check the unit and the recorded stock impact together, not just the quantity field.

To correct the problem, confirm that the box code is linked to the correct variant and a packaging unit containing eight items. Then restore the controlled starting conditions and scan the same physical label again. Check that the resulting balance is 48 items. Also test that blue-each still selects one blue pen and black-each selects one black pen. This checks that correcting the box mapping has not disrupted the other mappings.

A scan test is not the same as print verification

A trial with an ordinary scanner shows that the data can be read by that device under those conditions. Technical barcode verification evaluates print quality using a suitable verifier. One successful scan is not a substitute for a technical verification report or evidence of compatibility with every recipient's system.

Establish the recipient's technical verification expectations at the outset. Even if print verification has been completed, do not skip the product and unit mapping tests: a well-printed symbol can still be linked to the wrong record.

If a two-dimensional symbol carries a web address, check the destination separately. Reading the code, opening the page and displaying the correct product or variant are different acceptance points. Reaching the correct web page does not, on its own, prove that a sales or inventory application processes the same code correctly.

6. Correct the problem at the right stage and record the retest

When a test fails, identify the stage at which the error occurs rather than changing every setting at once. If the code cannot be read, examine the physical symbol and scanner compatibility. If the data is correct but the product is wrong, examine the mapping. If the product is correct but the quantity is wrong, examine the unit conversion.

For example, suppose a template was reduced in size, cropping the required quiet zone and leaving the label unreadable. Restore the quiet zone, reprint the label and test it again in the same position on the package. If the problem continues, assess other factors such as contrast, size, print damage and scanner support. Correcting the quiet zone does not establish that all other conditions are suitable.

In another test, suppose blue-each is read in full but the application selects a black pen. Instead of changing the print, examine the product record linked to the code. After correcting the mapping, rescan both the blue and black product labels. Also check that the label attached to the physical product belongs to the correct variant.

A practical internal test record

The completed record below is hypothetical. It is a suggested working record for tracking the correction, not an official certificate.

Record field Example entry
Operating environment and receiving system Warehouse goods-receipt test environment; handheld scanner and receiving application
Expected identifier, product, variant and unit blue-box8; blue pen; 1 box = 8 items
Encoded and scanned data Encoded: blue-box8; scanned: blue-box8
Label, template, printer and packaging Label material E1; template S2; printer Y1; packaging K1; print settings attached to the record
Actual transaction result Opening balance: 40 items; balance after first test: 41 items; expected balance: 48 items
Error and correction Box code mapped to one item; box-to-item conversion corrected
Retest result Opening balance reset to 40 items; balance after receiving one box using the same label: 48 items; individual blue and black pen code mappings also checked

Add the tester's name, the actual test date and the reference for the transaction reviewed to your own record. Rather than simply writing “works,” specify which label produced which result under which conditions.

When the printer, printhead, label material, print settings, template or label position on the packaging changes, repeat the affected physical checks. Reassess technical verification after relevant printing changes as well. When the product mapping or box contents change, return to the identity and quantity tests. If the scanner or receiving application changes, retest data decoding and the transaction result.

At the end of barcode preparation, you should have more than an image file: an identifier whose meaning is clear, an accepted data carrier, and a transaction result checked using the actual label. Make the decision to put the label into use dependent on completing all three checks together.

Topics in this article

Put this into practice with Inventory

See how your team can use Inventory and share records across departments in Enter ERP.

Stay up to date with our latest news and articles

New guides, checklists and product notes in one short email. You can unsubscribe with one click.