Cigarette marking. The structure of the marking code

In this article I will try to clarify the technical part and composition of cigarette labeling.

Forgive me Habr readers for the shortened review.



What are labeled cigarettes?



Labeled cigarettes are those cigarettes, on the consumer packaging of which identification means are applied in compliance with the requirements of Law No. 381-FZ and the regulatory legal acts of the Government of the Russian Federation adopted in accordance with it.

Thus, for the recognition of goods as labeled, the following conditions must be met:



  1. The goods must be marked with means of identification (marking code)
  2. The information monitoring system must contain information about the application of identification means on cigarettes (this is done by the cigarette manufacturer)
  3. The information monitoring system must contain reliable information about the goods


We remind you that the presence in the information monitoring system of information on the circulation of cigarettes is not a condition for the recognition of products as labeled.

For those buyers who purchased labeled cigarettes on paper before 07/01/2020, there is no need to worry and submit the leftovers somewhere. Cigarettes put into circulation by the manufacturer before 07/01/2020 are registered in the monitoring system as "temporarily untraceable" and in accordance with the Rules, their further circulation is allowed.



It must be remembered that during the experiment period for manufacturers (2018-07.2019), the composition of the labeling changed. Cigarette manufacturers have worked with the CRPT operator to find acceptable solutions. All marked products manufactured during this transition period were also marked.



Let's take a look at the structure of the cigarette marking code in force today.

By the way, it is a copy of the cigarette marking code in some European countries. That is why, for transnational companies, labeling has become a competitive advantage over Russian manufacturers.



80 characters are used to encode the serial number of cigarettes and MRP (maximum retail price):

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!”%&’*+-./_,:;=<>?
The coding-decoding algorithm of the MRC is based on the conversion of the size of the MRC in kopecks to the 80-ary number system using the following alphabet: Alphabet for encoding



Encoding Encoding

procedure

  1. We convert the MRC to kopecks, for example
  2. We find the integer part and the remainder of dividing the MRC by the base of the number system (in our case - 80)
  3. We take a character from the alphabet at an index equal to the remainder and write it to the beginning of the resulting string
  4. 2 3 0
  5. 4 0 (“A”)
= 146 30, = 14630


  1. 14630 80: 182 70
  2. 70 : “.”
  3. 0, 182 80: 2 22
  4. 22 : “W.”
  5. 0, 2 80: 0 2
  6. 2 : “CW.”
  7. 0, : “ACW.”










  1. , 80, , , 0,
“ACW.”


0.



1. : “A”2. “A”: 03. 80 3 ( , 4 ) 0, 04. 0 : 05. : “C”6. “C”: 27. 80 2 2, 128008. 12800 : 128009. : “W”10. “W”: 2211. 80 1 22, 176012. 1760 : 1456013. : “.”14. “.”: 7015. 80 0 70, 7016. 70 : 1463017. = 14360 14630


mrp encoder on ++
using System;
using System.Text;

namespace SharedUtil.Mrp
{
    public static class MrpEncoder
    {
        public const string Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"%&\'*+-./_,:;=<>?";

        public static string Encode(uint value, byte paddingLength = 4)
        {
            var builder = new StringBuilder();
            long result = value;
            do
            {
                long rmdr;
                result = Math.DivRem(result, Alphabet.Length, out rmdr);
                builder.Insert(0, Alphabet[(int) rmdr]);
            } while (result > 0);

            return builder.ToString().PadLeft(paddingLength, Alphabet[0]);
        }

        public static uint Decode(string value)
        {
            uint result = 0;
            for (int i = 0; i < value.Length; i++)
            {
                var characterIndex = Alphabet.IndexOf(value[i]);
                if (characterIndex < 0)
                {
                    throw new ArgumentException(string.Format("Invalid character: '{0}'", value[i]));
                }
                result += (uint) (Math.Pow(Alphabet.Length, value.Length - 1 - i) * characterIndex);
            }

            return result;
        }
    }
}
Since in practice MRC (maximum retail price) is rounded to rubles and has a range from 60 to 500 rubles, we can conclude: MRC in 80-ary encoding always starts with “A” and ends with one of four characters “A”, “ U "," o, "8". You can use this to check the validity of the MRC in the package marking code.



MRC coding table.


Let's consider the marking on the example of Cigarettes with the T&W filter ORIGINAL COMPACT MRC 106 "



This is how the marking on packs and blocks looks like:

Labeling of cigarettes on packs and blocksSorry, I did not find a block with MRC 106, I took 115 for the photo. Pack



marking:

DataMatrix bundles

04610030141527 00000Hd AB0o OnE1



String 29 characters long , contains:

  • GTIN-14 (14 ). «0» EAN-13 «» . EAN-13, .
  • (7 ) . ,   80 .     EAN.
  • (4 ). , 80- .
  • (4 ). « » . . , , .
GTIN-14 (14 ). «0» EAN-13 «» . EAN-13, .
« » GTIN EAN13.




Block marking:

DataMatrix blockHuman readable copy of the marking code

(01) 04610030141534 (21) 00000! & <FNC1> (8005) 106000 <FNC1> (93) yikZ



A string of at least 41 characters and contains a code in GS1 format. Brackets have been added for clarity. Contains GS1 <FNC1> symbols

  • (01) GTIN-14 (14 numeric characters). Contains the leading "0" and EAN-13 code for the unit of measure "block". Similar to the usual EAN-13 printed on the block.
  • (21) Serial number (7 characters). Manufacturer-generated identification code from a set of 80 characters. Conceived as unique for the specified GTIN-14.
  • (8005) (6 digital characters). Maximum retail price in kopecks for a block. In our example, 1060.00 rubles for a block (106 for a pack)
  • (93) (4 ). « » . .
Additional data may be included in the code, but codes 01 and 21 should go first. Boxes



marking:

Box marking as GS1-CODE128

(01) 14610030141524 (21) 0011986 <FNC1> (8005) 106000 <FNC1> (37) 50



A string of at least 25 characters. Contains mandatory codes 01 and 21 in GS1 format. Each manufacturer himself determines the composition of the marking code for transport packaging. Does not have a crypto tail. Can be applied as GS-1 DataMatrix code.

Often manufacturers duplicate GS-1 (CODE-128) and GS-1 DataMatrix, here is an example:

Other manufacturers sometimes do not indicate the MRC, and some add element 240 to indicate the manufacturer's internal nomenclature code.

Let's take a look at an example of a code for marking a transport package "box":
  • (01) GTIN-14 (14 ). IFT-14 «». IFT-14, .
  • (21) (7 ). , IFT-14 .
  • (8005) (6 ). , – «».
  • (37)  (2 ). .
Additional data can be included in the code, but codes 01 and 21 should go first. Pallet



marking:

Pallet marking

(00) 94610030141 0004634



A string of 20 characters. Contains the prefix 00 and the mandatory pallet (container) logistic code SSCC.



All packages, except packs, bear both a machine-readable code and its human-readable equivalent. This allows you to manually enter the marking code if for some reason the code is not scanned by the scanner.



Aggregation and Disaggregation.

The labeling system incorporates features such as aggregation and disaggregation of packages. Until recently, aggregation was carried out only at the factory. From the factory, information is transmitted to the system not only about the applied marking codes, but also about its aggregation. The JSON file transferred from the factory to the BMS contains a structure in which it is impossible to send the marking data without the factory aggregation data. At the factory, the aggregation of blocks / boxes / pallets is performed by re-scanning the marking from each nested element and packaging codes. This ensures that the code is readable and guarantees correct aggregation , i.e. compliance of the codes included in the package with the code of the package itself.

Therefore, try to keep the original packaging until the last moment. Having opened the factory box, it is no longer possible to guarantee that all the blocks belong to this particular box. Hello to all retail chains that check nested blocks and open factory boxes for this;)



Recently, the cigarette aggregation function appeared in the API for trade organizations. We see a great perspective here for shipment of pallets from logistics warehouses.



Disaggregation is performed automatically as soon as the unit enclosed in the package has been used in the documents of disposal or change of ownership. In other words, if you sell a pack of cigarettes, the block in which it was located is automatically disaggregated into packs, and the box in which this block was located is disaggregated into blocks, etc. It will be impossible to use further disaggregated codes of the block, box, pallet. This is a very elegant solution. Today, the box / block is disaggregated only if the nested unit is disposed of on the side of the current owner. If a third-party counterparty tries to sell your cigarettes from your box, this will not lead to its automatic disaggregation, since according to GIS MT, the counterparty was not the owner at the time of scanning the label when submitting information on disposal.



, , , ,



(14 ) (7 ) (4 )



: 00000046198532%J_zMZ401er

(14 ) (7 )



: 00000046214805ltCeK2L



01 (14 ) 21 (7 ) 8005 (6 )



: (01)04600266012586(21)E'd8ZnM(8005)100000

: 010460026601258621E'd8ZnM8005100000

01 (14 ) 21(7



: (01)04600266012586(21)E'd8ZnM

: 010460026601258621E'd8ZnM

: 1+2+3

• 1

01 (14 )

02 , (14 )

• 2

11 (6 )

13 (6 )

• 3

21 ( 20 )

:

02046002660125991302071921E'd8ZnMZx



01046002660125861101071921E'd8ZnM

pallets, containers:

serial shipping packaging code, SSCC (20 characters) (standard GS1-128 , indicated with application ID AI (00))

example: 00177102981700000049

Please note: In the example, the symbol "FNC1" (code 29) is not used anywhere. It is cut out when substituted into the FRT.



The UPD file generated for the submission of information must have a marking sign in its name - "MARK"



PDF: Official methodological recommendations for the registration of the UPD / UPDi / UKD.



EUPD samples:



XML. Sample EPD from Megapolis.



XML. Sample EPD with different types of packaging.



XML. Sample notice of invoice clarification.






All Articles