Skip to main content

Barcode Nomenclature

A nomenclature is the rule book for how to read a scanned code. It does not find the record and it does not decide what happens. It only says: these characters are the lot, these are the weight, and this code is about a lot.

Where
Barcode Nomenclature (OSBN)
Who uses it
The implementation consultant
When
At setup, and whenever the company starts using a new code shape
Needs first
Nothing. Two nomenclatures are delivered

What it is for​

A scanner hands the system a string. The nomenclature turns that string into named parts and names the kind of thing it stands for. Everything after that, finding the record and acting on it, uses those parts.

There are two kinds of rule book, and the Kind field on the header chooses between them.

  • gs1 - the code follows the GS1 standard. It is a chain of Application Identifiers, each a short number that announces what the next characters are: 01 product, 10 lot, 17 expiry. The rules list which identifiers this rule book knows and how long each value is.
  • pattern - the code has a shape of your own. Each rule is a pattern the whole code is tested against. Rules are tried in Sequence order and the first one that matches wins. The named groups in the pattern become the named parts of the code.

Which nomenclature applies​

When a code is scanned: the Nomenclature on the screen's process line in Barcode Assignment, and if that is empty, the one called DEFAULT.

When a code is generated: the Nomenclature on the process line, and if that is empty, the Default Nomenclature on Legal Entity, and if that is empty too, DEFAULT.

Every field, in plain words​

FieldWhat it meansWhat to put in itNotes
NomenclatureThe code of the rule bookA short code, such as DEFAULT or GS1Required. Must be unique
PurposeWhat this rule book is forA sentence a colleague will understand
Legal EntityThe company it was made forA company, or emptyRecorded on the rule book. A nomenclature is picked by its code, so two rule books cannot share a code even across companies
KindHow the rules are appliedgs1 or patternRequired. Anything other than gs1 is read as a pattern rule book
Group Separator (hex)The invisible character that ends a variable-length value in a GS1 codeTwo hex digitsUsed by gs1 only. Empty means 1D, the GS1 standard separator
ActiveThe rule book is in useTick itUnticked, the rule book is not loaded at all

Rules grid​

FieldWhat it meansWhat to put in itNotes
SequenceThe order the rule is tried in1, 2, 3Decides everything in a pattern rule book: first match wins
Rule NameA name for the ruleLot / Package, Product EAN-13In a pattern rule book it is reported back as the rule that matched
Application IdentifierThe GS1 identifier this rule reads01, 10, 3103gs1 only. Two, three or four digits
Rule Type CodeThe logical type of what the rule readsproduct, lot, weight, price, expiry, locationCarried on every part the rule produces
SymbologyThe printed form this rule is meant forean13, upca, anyDescriptive. Reading does not depend on it
Value KindHow the value is shownnumeric, alnum, date_yymmdddate_yymmdd turns six digits into a readable date
UnitThe unit of a measured valuekgAttached to weights and prices
PatternThe shape the whole code must haveA regular expression with named groupspattern only
Variable LengthThe value has no fixed lengthTick for lots and serial numbersgs1 only. The value runs to the group separator, to Max Length, or to the end of the code
Data LengthThe exact length of a fixed value14 for a GTIN, 6 for a dategs1 only, when Variable Length is off
Max LengthThe longest a variable value may be20 for a GS1 lotgs1 only, when Variable Length is on
Decimal PlacesHow many of the digits are decimals3 for kilograms to the gramgs1 only
Combine FieldThe name of a part built from two groupsweightpattern only. See the weighted product example below
Combine Integer GroupThe group holding the whole numberintpartUsed with Combine Field
Combine Decimal GroupThe group holding the decimalsdecpartUsed with Combine Field
Check DigitThe check the code must passnone, gs1, mod10, ean8, upca, ean13, gtin14, sscc18A code that fails is refused. In a pattern rule book the next rule is not tried
Check Digit GroupWhich named group the check is run onproductpattern only. Empty means the whole code
Entity TypeThe kind of thing this code stands forITEM, LOT, LOCATION, PACKAGE, SERIALThis is what Barcode Identity and the action lines of Barcode Assignment match on
Resolve GroupWhich named group is the key to look the record up bylot, productEmpty means the whole code is the key

How to configure it​

  1. Open the delivered DEFAULT nomenclature first and read its rules. Most needs are already covered.
  2. If the company has a code shape nothing covers, add a rule line rather than a new nomenclature. Give it a Sequence that puts it before any broader rule that would also match.
  3. Write the Pattern so that it describes the whole code, start to end, and name the group that carries the key.
  4. Set Entity Type to the kind of thing it is, and Resolve Group to the group holding the key.
  5. Tick Active on the header, save, and refresh the application configuration so the server loads the change.

Scenarios​

The batch label: how DEFAULT reads a lot​

The delivered DEFAULT nomenclature carries this rule at sequence 4, named Lot / Package:

^06(?<lot>[0-9A-Za-z._-]+)$

Read it left to right. The code must start with 06. Everything after that is captured under the name lot, and may be made of digits, letters, dots, underscores and hyphens. The rule's Entity Type is LOT and its Resolve Group is lot.

So a batch label is simply 06 followed by the batch number. Batch B2401 is printed as 06B2401. Scanned back, the engine answers: this is a LOT, and its key is B2401.

The rules above it are tried first: a code starting 21 or 22 in the weighted and priced product shapes, and a location code starting 05. The broad rule at sequence 7, Internal reference, would also match 06B2401 as an item. It never gets the chance, because the lot rule sits above it. That is why sequence matters.

A batch number with other characters

The lot rule allows digits, letters, dot, underscore and hyphen. A batch number containing a slash or a space does not fit it, and no other DEFAULT rule fits either. Picking List Registration still accepts such a label because it reads the batch number itself, but a screen relying on the rule would not. If the company's batch numbers use such characters, widen the character set in the rule.

A weighted product from the scale​

Rule 1 of DEFAULT reads a 13-digit scale label: 21, then five digits of product, three of whole kilograms, two of decimals. Combine Field weight, Combine Integer Group intpart and Combine Decimal Group decpart fold the two groups into one value. A label carrying 012 and 50 gives weight 12.50 kg. The product digits are the key, because Resolve Group is product.

A supplier sends GS1 labels​

Name the delivered GS1 nomenclature on the process line of the receiving screen. It knows SSCC 00, GTIN 01, lot 10, production date 11, best-before 15, expiry 17, serial 21, count 30, net weight in kilograms 3103 and amount payable 3922. A code with an identifier it does not know is refused with "Unknown Application Identifier at position N". Add a rule line for that identifier.

What it is connected to​

  • Barcode Assignment names the nomenclature each screen reads with.
  • Legal Entity names the company's default for generated codes.
  • Barcode Identity takes the Entity Type and the key a rule produced and finds the record.

If something looks wrong​

  • "no nomenclature rule matched" - the code fits no Pattern in the rule book. Add a rule or widen one.
  • "Unknown Application Identifier at position N" - a gs1 rule book has no rule for the identifier at that place in the code.
  • "The code is read as an item when it is a lot" - a broader rule sits above the specific one. Lower the Sequence of the specific rule.
  • "The code is refused although a later rule would fit" - the first rule that matched has a Check Digit and the code failed it. A failed check stops the scan. It does not move on to the next rule.
  • "I changed a rule and nothing changed" - the server still holds the old rule book. Refresh the application configuration.
  • "The rule book is ignored" - Active is off on the header, or the process line names a different nomenclature.