Barcode Masks

Barcode Masks

The Problem with Complex Barcodes

Most retail barcodes do one thing: identify an item. A cashier scans a barcode, the system looks up the item code, and the price and quantity come from the item master. This works well for standard packaged goods where the barcode is purely an identifier.


But many products — particularly in grocery, fresh produce, delicatessen, bakery, pharmaceuticals, and manufacturing — use barcodes that carry more than just an item identifier. These barcodes encode additional data directly in the barcode string itself: the price of a pre-weighed item, the weight or quantity of a product measured at the time of packaging, a serial number for a regulated product, or a batch number for traceability. A single scan is meant to convey all of this information at once.


Without a mechanism to interpret this embedded data, the POS treats these barcodes as standard identifiers and ignores everything except the item lookup. Cashiers then have to manually enter the price or weight, which is slow, error-prone, and inconsistent. In high-volume environments like a deli counter or a busy produce section, this friction adds up quickly.


Barcode Masking in iVendNext POS solves this problem by giving retail managers the tools to define exactly how complex barcodes should be decoded — without any developer involvement.




What Barcode Masking Is

Barcode Masking is a pre-processing layer that sits in front of iVendNext POS's existing barcode resolution engine.


When a cashier scans a barcode, the masking system intercepts it first. If the barcode matches one of the store's configured mask templates, the masking engine parses it — breaking the barcode string into its component segments and extracting the embedded data. That data is then applied directly to the cart line. The existing barcode resolution engine handles the item lookup as usual.

If the scanned barcode does not match any configured mask, it passes straight through to the existing barcode resolution flow without any change. The masking layer is completely transparent to the cashier — scanning a masked barcode looks and feels identical to scanning a standard barcode. The only difference is that the cart line populates with the embedded price, quantity, or serial number automatically, rather than requiring manual entry.


This design means that barcode masking can be introduced incrementally. A store can configure masks for its complex barcode formats while leaving all other scanning behaviour exactly as it was.





The Start Sentinel

The mechanism that determines whether a barcode should be processed by the masking engine is the start sentinel — a two-character prefix at the beginning of the barcode string.


Info
Every barcode mask template is defined with a unique start sentinel. When a barcode is scanned, the masking engine reads the first two characters and checks them against all active mask templates. If the first two characters match a mask's start sentinel, the masking engine applies that mask to parse the rest of the barcode. If no match is found, the barcode goes directly to standard resolution.


This two-character sentinel approach is both efficient and flexible. The lookup is fast — checking two characters against a list of active sentinels adds negligible processing time. It is also flexible because the sentinel can be any two characters, which means masks can be designed to match the specific barcode formats used by different suppliers, product categories, or internal labelling systems.


Alert
No two active masks can share the same sentinel. This ensures that every barcode is unambiguously routed to the correct mask template when it matches.




The Two Mask Types

iVendNext POS supports two types of barcode mask, each suited to a different kind of barcode format.


Fixed-Length masks are used when the barcode has a predictable, unchanging structure. Every segment occupies the same number of characters in every barcode of that type. For example, an item barcode might always occupy characters 3 through 12, the price might always occupy characters 13 through 17, and the quantity might always occupy characters 18 through 20. The mask definition specifies the exact character length of each segment, and the parser extracts each segment positionally.


Idea
Fixed-Length masks are common in grocery and produce environments where barcode formats are standardised across a supplier or a product category. GS1-compatible price-embedded barcodes, for example, follow predictable positional formats.


Delimiter-based masks are used when the barcode's segments are separated by a specific character rather than having fixed positions. Different segments may vary in length from one barcode to the next, but a consistent separator — a semicolon, a pipe character, or any single character — divides them. The mask definition specifies the delimiter character and the order of segments. The parser splits the barcode string by the delimiter and maps each resulting token to its configured segment in sequence.


Idea
Delimiter-based masks are particularly common in vendor-specific barcode formats and in internal labelling systems where flexibility in segment length is needed.




What Data Can Be Embedded

Barcode masks can extract six types of data from a scanned barcode, corresponding to the six segment value types available in the mask configuration.


Item Barcode — the segment contains the item's barcode value, which is passed to the existing barcode resolution engine to look up the item.


Item Code — the segment contains the item's internal code directly, bypassing the barcode resolution lookup and going straight to the item master.


Price — the segment contains the item's selling price, encoded as an integer. A scale factor converts the raw integer to the actual price. For example, if the barcode encodes price in cents, a factor of 100 converts 0250 to 2.50.


Quantity — the segment contains the item's quantity or weight. A scale factor handles decimal precision. For weighed items, a factor of 1000 converts 05000 to 5.000 kilograms.


Serial or Batch — the segment contains a serial number or batch number, which is pre-populated on the transaction line for traceability.


Skip Characters — the segment contains characters that carry no useful data — check digits, padding, or filler — and should be discarded during parsing.


Image suggestion 2: Table or annotated barcode diagram showing a sample barcode string broken into labelled segments: sentinel (2 chars), item barcode (10 chars), price (5 chars), quantity (3 chars), with the parsed values shown below each segment — e.g., sentinel "99", item barcode "1234567890", price "00250" → $2.50, quantity "003" → 3 units.




Why This Matters for Retail Operations

For retail formats that handle complex barcodes, masking is not a nice-to-have — it is an operational necessity. Without it, cashiers scanning pre-weighed produce items must manually enter the price for every item. In a busy grocery checkout, this adds several seconds per item and introduces pricing errors. A produce item labelled at $3.47 per kg and pre-weighed at 0.752 kg requires the cashier to read the price off the label and enter it manually. With barcode masking, a single scan captures the item identity, the weight, and the price all at once.


Notes
In a pharmacy or medical supplies environment, batch numbers must be captured for every regulated item sold. Without masking, this means a separate manual entry step for each item. With masking, the batch number is extracted from the barcode at the point of scan and applied to the line automatically.


The result is faster checkouts, fewer errors, and cleaner transactional data — and all of it configured by the retail manager in iVendNext Desk, without requiring any development work.




    • Related Articles

    • Masks at the Lane

      What Cashiers Experience From a cashier's perspective, scanning a masked barcode is indistinguishable from scanning any other barcode. There is no extra step, no confirmation prompt, and no visual indicator that a mask was applied. The cashier scans ...
    • Barcode and Label Printing for Retail Items

      Overview This article walks through the complete workflow from barcode assignment to professional label production. 1. Setting Up Item Barcodes 1.1 Basic Barcode Assignment Navigate to: Home > Retail > Item Open the item record (e.g., "CM-1001 Coffee ...
    • Building a Mask

      Who Creates Barcode Masks Barcode masks are created and managed by users with the Retail Manager role in iVendNext Desk. No developer access or technical coding is required. The mask definition interface is a standard form with clearly labelled ...
    • Managing Peripherals: Barcode Scanners, Cash Drawers, and Displays

      Overview This article gives you an overview of configuring POS peripherals in iVendNext, including barcode scanners, cash drawers, and customer displays. 1. Prerequisites Before configuring peripherals, ensure the following are set up: POS Terminal: ...
    • Linking UoM with UPC Codes for Accurate Inventory Management

      Overview In retail, Units of Measure (UOM) and Universal Product Codes (UPC) work together to ensure accurate tracking and management of items. While UOMs define how an item is measured (e.g., by weight, volume, or quantity), UPCs uniquely identify ...