DataMatrix or how to label shoes correctly

Starting July 1, 2019, compulsory labeling of a group of goods was introduced in Russia. From March 1, 2020, shoes were to fall under this law. Not everyone managed to prepare, and as a result, the launch was postponed to July 1. Lamoda is among those who did.

Therefore, we want to share experience with those who have yet to label clothes, tires, perfumes, etc. The article describes a number of industry standards, some regulatory documentation and personal experience. The article is intended primarily for integrators and developers who only have to understand this project.

image

Please note that the regulatory framework often changes, and the author does not have the opportunity to constantly update the material. Therefore, by the time of reading, some of the information may already be out of date.

The author gained personal experience both in the framework of the work on the Datamatrix project in Lamoda, and in the development of his own free application for labeling BarCodesFx.

Since July 1, 2019, the law on mandatory labeling has been in force in Russia. The law does not apply to all groups of goods, and the dates for the entry into force of mandatory labeling for product groups vary. Now tobacco, fur coats, shoes, and medicines fall under mandatory marking. In the near future will be introduced for tires, clothes, perfumes and bicycles. Each group of goods is regulated by a separate government decree (PPR). Therefore, some statements that are correct for shoes may be incorrect for other product groups. But we can hope that the technical component will not vary greatly for different product groups.

Marking
— . , . , . .

Common Terms and Concepts


FEP - a participant in the turnover of goods.
MTCT is a center for the development of promising technologies. Private company, the only state. labeling contractor. It works under the scheme of public private partnership (PPP). Unfortunately, there is no information about other bidders for the project, as well as about the tender itself.
TG - commodity group. Shoes, clothes, tires, etc.
GTIN - in fact, the article, taking into account the color size. Issued in GS1 or the national catalog for each importer or manufacturer for its goods. The manufacturer or importer must first describe this product.
PPR - Decree of the Government of the Russian Federation. For shoes - 860.
KM- marking code. A unique character set assigned to a specific item. For shoes, it consists of GTIN, serial number, verification code and crypto-tail.
GS1 is an international organization issuing GTINs. Also, compilers of a number of marking standards.
The national catalog is an analogue of GS1, developed by CRPT.
Crypto - tail is an analogue of a digital signature confirming the legality of KM. Must be in the datatrix on the brand. Text storage is prohibited. After printing, the stamps must be removed according to the agreement with the MDCT. Not a single case of real use is known.
CPS - order management station. The system in which KMs are ordered for a product.
EDO - electronic document management.
UKEP - enhanced qualified electronic signature.

Terms and concepts in the frame of this article


ChZ is an honest sign.
LK - personal account.
Stamp - printed marking code.

The process is as follows: first, the participant (FEP) issues an electronic signature (UKEP), is registered in a badge (CHZ), describes the goods in the national directory or GS1, receives GTINs for the goods. On the site of the honest sign, these steps are described in detail, so we will not dwell on them.

Ordering and receiving codes


After receiving the GTINs, the participant (UOT) makes the order of codes (CM) in the CPS system.
Important, but not obvious.

  1. In one order, you can request codes for a maximum of 10 GTINs. In principle, an incomprehensible restriction. An importer with 14,000 GTINs has to create 1,400 orders.
  2. In one order, a maximum of 150,000 codes can be requested.
  3. There is a limit on 100 orders in work. That is, at the same time in processing can be no more than 100 orders. If there are more than 100, then the API will start returning an error instead of a list of orders. The only way to resolve this error is to close some orders through the web interface. The API does not provide a parameter for partial display of orders.
  4. There is a limit on the number of calls - no more than 10 requests per second. According to my data, this limitation does not appear in the documents, but it does exist.

From personal experience working with orders of KM marking codes through the CPS API.

  1. ( json) - . . , json. .
  2. . , . , . , . - . , . - “”. , .

    , . . , - . , .
  3. — . . . , () . , , .
  4. () API . . . API . 10 .
  5. API . API . . GTIN = . , . -1. . .


So, the codes are ordered and generated. They can be taken via api in text form, in pdf as labels for printing and as a csv file with text.

About the API has already been written above. As for the other two ways. Initially, the CPS allowed you to pick up codes only once. And if a pdf file was taken, then you could get the codes in text form only by scanning all the datatrix from pdf. Fortunately, they added the ability to pick up codes several times, and this problem was solved. Within two days, the codes are still available for re-download.

If you pick up in csv format, then never, under any circumstances, open it in Excel. And do not let anyone. In Excel there is an autosave function. At the time of saving, Excel can modify your codes in the most unpredictable way. I recommend using notepad ++ to view codes.

If you open a file from the CPS in notepad ++, you can see lines of this kind. The third code is invalid (it does not have GS separators).

image

Partners gave us codes for labeling their product. With the naked eye you can see which files were formed using Excel - up to 5% of the codes were invalid.

We strongly recommend reading about the standards GS1. In the description of the standard there are answers to many questions on the formation of DataMatrix.

The identification code consists of a GTIN and a serial number. According to the GS1 standard, application identifiers (PIs) 01 and 21 correspond to them. Please note that application identifiers are not part of the GTIN and serial number. They indicate that after the application identifier (IP) comes the GTIN or serial number. This is especially important when programming cash registers. To fill the tag 1162, it is precisely GTIN and serial number that are needed, without application identifiers.

For UPD (universal transfer document) and other documents, on the contrary, most often you need a whole record with application identifiers.

image

The GS1 standard states that GTIN has a fixed length of 14 characters and can only consist of numbers. The serial number is variable in length and is described on page 155 of the standard. There is also a link to a table with characters that may appear in the serial number.

Since the serial number has a variable length, the GS separator indicates its end. It has code 29 in the ASCII table. Without this separator, no program will understand at what point the serial number has ended and other data groups have begun.

You can read more about the marking code (KM) in the official documentation .

For shoes, the serial number is fixed at 13 characters, however, its size can be changed at any time. For other product groups (TG), the length of the serial number may vary.

DataMatrix Generation


image

The next step is to convert the data into DataMatrix code. In the Decree of the Government of the Russian Federation 860 GOST is specified, according to which it is necessary to form DataMatrix. Also in PPR 860, the mandatory use of application identifiers is indicated. Note that there is no concept of “application identifiers” in the DataMatrix standard. They are only in the GS-1 DataMatrix standard. It turns out that the PPR 860 implicitly requires the use of GS-1 DataMatrix. Fortunately, the standards are similar. The main difference: in GS-1 DataMatrix, the first character must be FNC1. The GS symbol should not come first in the DataMatrix, only FNC1.

FNC1 cannot simply be taken and added to a string as a GS. It should be added by the program generating the DataMatrix. The resources of the Alliance Forts posted several mobile applicationswith which you can verify the correctness of the generated DataMatrix codes.

Important. The honest sign application accepts invalid DataMatrix. Even QR codes. The fact that the brand is recognized and product information is displayed is not an indication that the DataMatrix is ​​formed correctly. Even when replacing a crypto-tail, the CH application recognized the brand and displayed data on the product.

Later, Chez issued an explanation of how to correctly generate codes. Due to the large number of codes with errors, they recognized codes without FNC1 as valid, but, nevertheless, they recommend generating the GS-1 DataMatrix.

Unfortunately, a fairly large percentage of datatrixes from partners came with errors. Thanks to the explanations from ChZ, the question “Is it possible to trade such goods after July 1 or not?” Was completely resolved. Spoiler - you can.

Print


Pay attention to the stamp printing method. When printing on a thermal printer, the brand quickly fades, and this product can no longer be sold. An unreadable mark is a violation of PPR 860. Which leads to the seizure of goods, fines, criminal liability.

Use thermal transfer printing. In this case, the brand is not so prone to fading. The label material also determines how susceptible the mark is to mechanical damage. If the code is not read due to mechanical damage, this is equivalent to the absence of a mark with all the ensuing consequences.

image

Choose your printer from your planned print volumes. Desktop printers are not designed to print 100,000 labels per day.

Stopping and starting printing increases printer wear. Some programs send a print job one label at a time. It is better not to use such programs.

Work with documents


After the stamps are printed and pasted, all further operations with them occur through documents or a personal account of an honest sign.

When working with a large number of codes, you can create xml files in which the required codes will be, and download these files through the API or the web interface of your personal account.

The XSD scheme can be downloaded in the “help” section in LC ChZ.

Pay attention to the following points.

  1. Xsd schemas in LC ChZ contain errors in TIN validation and string length restrictions. Only after correcting errors, you can use the schemes. Fortunately, the errors are obvious, so this is not difficult to do.
  2. — . . .
  3. XML, , . 4 .
  4. 150 000 . 30 000 ..
  5. Xml “ xml”, .
  6. , , , .
  7. . 860.
  8. 60 . , «» 60 . , . «», 60 . .


When developing my free BarCodesFX labeling application, integration with the CPS API was initially done. When an honest sign a second time unexpectedly changed the logic of the API, the integration had to be abandoned. I hope that in the future ChZ will be able to stabilize the development and API, because For a non-commercial product, it’s very expensive for me to check every day to see if there are any changes in the API, and to quickly refine them.

When introducing labeling, carefully read the regulatory documents for your TG product group, correctly print the GS1-DataMatrix and be prepared for any unforeseen changes on the part of the honest CE mark.

The Fort Alliance has created an information space ( wiki , chat in a telegram, seminars, webinars), where you can find useful and relevant information on labeling in all sectors.

All Articles