Product Codes in EDI: Best Practice

EDI, News

Product Codes in EDI: Best Practice

A key principle for successful EDI is to use standards as much as possible. It can definitely help in case of product codes. Agreeing on which product codes to use in trade documents before starting EDI prevents a lot of potential problems later. 


Why do we need product codes? 

One might think that product names are clear enough so why do we need product codes? While names are much more understandable, they are often lengthy. Besides, the name for an item is rarely exactly the same in both supplier’s and buyer’s software programs. This is why the product name is not a reliable property for item identification by computers. 

Coding means assigning a unique number to a product or a service to quickly identify it. To make sure that the number is unique, the best practice is to use registered product codes like EAN, GTIN, or UPC.  These numbers can also be expressed as barcodes. A barcode can be scanned electronically, making it easier for products to be tracked, processed, and stored.

Use registered product codes for best results in automation of supply chain and using EDI without glitches. 

However, there are also other types of product codes in use. Let’s take a look at them and explain the pros and cons.


Suppliers’ internal product codes

Many suppliers/producers identify their products by their internal codes. Supplier’s internal product codes are created in supplier’s warehouse management systems. The codes might be generated automatically, but often producers are free to assign the codes themselves. 

If you are a producer/supplier, use the following best practice for coding your products:

  • every product and service should have a unique product code; 
  • products with different properties (eg. color, size) should have separate codes;
  • use numbers rather than letters, avoid diacritics and punctuation in codes;
  • keep it short.


Retailers’ internal product codes

In most retailers’ ERPs, every product automatically gets an internal code as well – i.e. retailer product code. If a retailer is assigning the product codes and not using the automatic generation, the same best practice rules apply as for supplier codes (see above). 

NB! It is not good practice to establish another coding system for products that already have codes (supplier codes and most often also GTINs). However, internal codes are needed for products and services that retailers themselves provide. 

In most retailer ERPs, it is possible to describe multiple product codes: in addition to internal codes, always add supplier codes. Best practice is to add and use GTIN codes as primary codes. 


Avoid using retailer product codes in ordering and invoicing:

While both suppliers’ and retailers’ ERPs automatically generate codes for products, it is always rational to prefer supplier codes (and best practice is to use GTINs). Always add supplier codes and GTINs to product cards in your ERP. If your ERP does not allow this, change your ERP.  


  • Every retailer’s internal product code for the same item is different. There are many retailers selling the product of one supplier. It is impossible to add product codes of all the buyers to an item card in the supplier’s software. On the other hand,  there is usually only one supplier for a particular item, and that supplier product code can easily be added to an item card in retailer’s software.
  • Of course, it is technologically possible to create supplier-buyer item code mappings on either side or by EDI operator, but it is an unnecessary, costly and error-prone practice. This should be avoided by simply using supplier codes, or even better, GTIN codes. 

For EDI to work flawlessly, use GTIN’s.


GTIN product codes

The global best practice is to use for product codes GTINs –  the global standard by GS1. GTIN stands for Global Trade Item Number and is a good relative of EAN (European Article Number). GTINs are issued by GS1, an international standards organization. GTIN is guaranteed to be globally unique and therefore the best identifier of a product. You can read more about it in our separate blog on understanding GTIN product codes.

Which product codes to use? 

Before implementing EDI, buyer and supplier must agree on which product codes will be used to identify products in EDI documents. Often, the documents will include several product codes, as GTIN codes may not exist for each item. 

When your partner sends you an EDI document containing multiple product codes, the order in which your software should identify the products is:

  1. GTIN – the best
  2. Supplier code – it is supplier’s product, so it is logical they code it (better than using the retailer code)
  3. Buyer code or something else – often leads to confusion and errors.

If your company is considering supply chain automation, using the right type of product code can make a big difference. Visit our blog to find out more about electronic document interchange and EDI best practices. If you still have questions, feel free to contact us.