What is EDI? Electronic Data Interchange

Explore how Electronic Data Interchange (EDI) facilitates modern supply chain management.

Need Help?
Subscribed! Error
What is EDI? Electronic Data Interchange
Electronic Data Interchange for Supply Chain Management

Electronic Data Interchange (EDI) is a standardized method of automatically transferring data between computer systems.

As the supply chain becomes more digital, effective data exchange has become a must-have for any major company.

A supply chain diagram illustrating various stages and systems involved in logistics. The icons represent key entities such as a factory, a transportation truck, a warehouse, a delivery truck

In the complex network of suppliers and distributors, efficient data communication is critical.

As analytics experts, how can we use EDI technology to support the digital transformation of organizations?

They ensure the smooth flow of essential transactional data, such as purchase orders, invoices, shipping notices, and more.

A simplified diagram showing the relationship between a customer, a purchase order, an invoice, and a supplier within a supply chain. The customer initiates a purchase order, which leads to t

In this article, we will uncover the crucial role of Electronic Data Interchange (EDI) in driving supply chain operations and how it can empower data analytics.

We will illustrate how EDI messages translate into action in warehouse operations using Python scripts.

💡
Summary
I. EDI for Supply Chain Management
1. A must-have for any large business
2. More than 60 years of history
3. EDI Standards
4. Supply Chain Processes that use EDIs
II. Data Interchange & Operational Management
1. Warehouse Operations Simulation Model
2. Build a simulation model with Python
III. Why is Business Intelligence Significant?
1. What is the environmental impact of our operations?
2. Become a data-driven green organization
IV. What's Next?
1. EDI for ESG Reporting and GreenWashing
2. Conclusion

What is EDI for Supply Chain Management?


This is a must-have for any large business.

Electronic Data Interchange (EDI) was created to facilitate efficient, reliable, and secure data exchange.

After several decades, it has deeply imposed itself as a must-have for any large modern business.

It facilitates the automatic transmission of business documents in a standardized format.

A diagram illustrating two types of supply chain orders: a purchase order and a replenishment order. The purchase order begins with a supplier and involves delivering 120 boxes to a distribut

This allows diverse systems to communicate using a common language.

  • A company wants to send a supplier a purchase order with item(s) information, quantity and expected delivery date.
  • A warehouse wants to inform a carrier that a pallet is ready to be picked
  • A store sends a replenishment order to a central distribution centre

More than 60 years of history

Developed in the late 1960s, EDI initially served to transmit shipping and transportation documents.

A timeline diagram showing the evolution of Electronic Data Interchange (EDI) over several decades. Starting in the 1960s with shipping and transportation documents, the diagram traces how ED

Over the years, EDI expanded its capabilities to cover various industries, with more than 150k businesses focusing on supply chain management.

Considering the massive daily transactions, it is challenging to imagine international supply chains operating without EDI.

What are the EDI Standards?

EDI operates according to established standards used across industries and geographic locations.

A diagram showing different types of Electronic Data Interchange (EDI) standards across various industries and geographic locations. Icons represent different sectors such as retail, transpor

However, there are two predominant standards

  • ANSI X12: primarily used in North America
  • EDIFACT: created by the UN and used internationally

These standards define the string format and the information contained in EDI messages.

They are ensuring uniformity in data interpretation across various systems.

A side-by-side comparison between a traditional purchase order and an EDIFACT/EANCOM formatted order. The traditional purchase order contains supplier, customer, and order details, while the

In the example above, a purchase order is translated into an EDI message for transmission.

  • An order is created by the purchasing team and received by the supplier
  • Order information includes customer, supplier, delivery address and date, invoice address and detailed information about ordered items
  • Invoicing, delivery and company information are mapped using IDs (Company ID, Location ID, …)

What are the Supply Chain Processes that use EDIs?

With the complexification of supply chain operations, EDI messages form the backbone of communication for critical events like:

  • Inbound shipment arriving at a warehouse
  • A pallet is being put away
  • A picking order that is being executed
  • An outbound shipment that is cancelled
EDI messages keep the wheels of logistic operations turning.

To illustrate this idea, we will use Python to simulate creating and transmitting EDI messages for warehouse operational management.

Data Interchange & Operational Management


Design of a Warehouse Operations Simulation Model

In our Python script, we will replicate several warehousing processes from the angle of EDI message exchange.

  • Inbound shipment messages containing details like SKU and quantity
  • Putaway confirmations with SKUs and putaway locations
A diagram of a warehouse illustrating the four key steps in order processing. Step 1: Orders are received by the admin team. Step 2: Orders are picked from racks by the picking team. Step 3:

These messages enable synchronisation of the ERP and Warehouse Management systems (WMS), drive efficiency and reduce errors.

  • Message 1: informing the warehouse teams that a shipment is coming for inbound via the WMS (ERP -> WMS)
  • Message 2: warehouse teams inform the distribution planning team that the pallet has been put in stock and is ready to be ordered (WMS -> ERP)
Let’s build our own EDI message simulation tool with Python.

Build a simulation model with Python

Let’s simulate these message exchanges using the EDI norm ANSI X12

  1. Inbound: goods are received at the warehouse
    An EDI message (Warehouse Shipping Order — 940) notifies the warehouse of an incoming shipment and its details.
  2. Putaway: after receiving, goods are stored at a specific location
    A confirmation EDI message (Warehouse Stock Transfer Receipt Advice — 944) is returned to the ERP to confirm the putaway.
  3. Picking: for an order, items are picked from storage locations
    This EDI message (Warehouse Shipping Order — 940) can instruct the warehouse on which items to pick.
  4. Outbound: shipping to the customer
    An EDI message (Warehouse Shipping Advice — 945) is sent to the ERP to confirm that the goods have been shipped.

Here is the simplified version of the Python script,

# Author: Samir Saci
# Note: this script has been simplified for educational purposes.

class EDIMessage:
def __init__(self, message_id):
self.message_id = message_id
self.content = ""

def add_segment(self, segment):
self.content += segment + "\n"

def get_message(self):
return f"ST*{self.message_id}*1\n{self.content}SE*2*1"

class Warehouse:
def __init__(self):
self.inventory = {}

def receive_inbound(self, message):
lines = message.content.split("\n")
for line in lines:
if line.startswith("N1"):
_, _, sku, quantity, unit = line.split("*")
self.inventory[sku] = self.inventory.get(sku, 0) + int(quantity)
print("Received Inbound Shipment:\n", message.content)

def process_putaway(self, sku):
message = EDIMessage("944")
if sku in self.inventory:
message.add_segment(f"N1*ST*{sku}*{self.inventory[sku]}*units")
print("Putaway Confirmation:\n", message.get_message())
return message
else:
print("SKU not found in inventory.")

def process_picking(self, message):
lines = message.content.split("\n")
for line in lines:
if line.startswith("N1"):
_, _, sku, quantity, unit = line.split("*")
if self.inventory[sku] >= int(quantity):
self.inventory[sku] -= int(quantity)
else:
print(f"Insufficient quantity for SKU {sku}")
print("Processed Picking Order:\n", message.content)

def process_outbound(self, picking_message):
message = EDIMessage("945")
lines = picking_message.content.split("\n")
for line in lines:
if line.startswith("N1"):
_, _, sku, quantity, unit = line.split("*")
message.add_segment(f"N1*ST*{sku}*{quantity}*boxes")
print("Outbound Shipment Confirmation:\n", message.get_message())
return message

Initiate the model and create your inbound order

  • Two different SKUs received in cartons
  • {Qty 1: 50 boxes, Qty 2: 40 boxes}
# Initiate the model
warehouse = Warehouse()

# Inbound Process
inbound_message = EDIMessage("940")
inbound_message.add_segment("N1*ST*SKU123*50*boxes")
inbound_message.add_segment("N1*ST*SKU124*40*boxes")
warehouse.receive_inbound(inbound_message)
print("Inventory of {}: {} boxes".format("SKU123",warehouse.inventory["SKU123"]))
print("Inventory of {}: {:,} boxes".format("SKU124",warehouse.inventory["SKU124"]))

And the output looks like this,

N1*ST*SKU123*50*boxes
N1*ST*SKU124*40*boxes

Inventory of SKU123: 50 boxes
Inventory of SKU124: 40 boxes

  • The two messages that have been transmitted
  • Inventories of received items have been updated with the received quantity

Putaway confirmation

# Putaway Process
warehouse.process_putaway("SKU123")

This message sends a putaway confirmation for “SKU123”

ST*944*1
N1*ST*SKU123*50*units
SE*2*1

Picking orders and outbound shipments

  • The two SKUs are picked with quantities below their inventory level
# Picking Process (Picking goods for an order)
picking_message = EDIMessage("940")
picking_message.add_segment("N1*ST*SKU123*10*boxes")
picking_message.add_segment("N1*ST*SKU124*5*boxes")
warehouse.process_picking(picking_message)
print("Inventory of {}: {} boxes".format("SKU123",warehouse.inventory["SKU123"]))
print("Inventory of {}: {:,} boxes".format("SKU124",warehouse.inventory["SKU124"]))

# Outbound Process (Sending out goods)
warehouse.process_outbound()

Output,

N1*ST*SKU123*10*boxes
N1*ST*SKU124*5*boxes

Inventory of SKU123: 40 boxes
Inventory of SKU124: 35 boxes

ST*945*1
N1*ST*SKU123*10*boxes
N1*ST*SKU124*5*boxes
SE*2*1
  • 2 picking orders with 10 and 5 boxes for “SKU123” and “SKU124”
  • The inventory has been updated
  • The outbound orders are taking the quantities picked
How can we ensure smooth transmission?

Error Detection & Handling

We did not introduce this model solely for coding.

The idea is to understand how to create various checks to handle errors when writing or reading messages.

EDI is not exempt from data quality issues like

  • Missing data, incorrect data format, invalid codes, …
  • Logical inconsistencies are causing significant operational disruptions

Therefore, robust data checks and validations are crucial to ensuring the accuracy and reliability of Electronic Data Interchange.

Example of error handling for receiving orders

def receive_inbound(self, message):
lines = message.content.split("\n")
for line in lines:
if line.startswith("N1"):
try:
_, _, sku, quantity, unit = line.split("*")

# SKU or quantity is missing
if not sku or not quantity:
print("Error: SKU or quantity missing.")
return

# Quantity is an integer
quantity = int(quantity)

# Negative or zero quantities
if quantity <= 0:
print("Error: Quantity must be positive.")
return

self.inventory[sku] = self.inventory.get(sku, 0) + quantity
except ValueError:
print("Error: Incorrect data format.")
return

print("Received Inbound Shipment:\n", message.content)

This piece of code is:

  • Checking if quantities are missing or not in the integer format
  • Verify that all quantities are positive
  • Raise an error if needed
What’s next?

With Python, you can support your infrastructure team in automating testing to develop new EDI messages.

What is the Power of EDI for Data Analytics?

By connecting diverse computer systems, EDI supports daily operations and serves as a veritable goldmine for data analytics.

Each EDI transaction carries valuable information,

  • Time stamps, locations and reason codes that provide traceability of your shipments and measure process(es) performance
  • Quantity, Pricing, and Item information that can be used to model material, financial and information flows
Generate transactional data to monitor and improve a supply chain network.
A visual titled “Different Types of Supply Chain Analytics: Answer Four Kinds of Questions” showing four categories of analytics: Descriptive, Diagnostic, Predictive, and Prescriptive. Each c

This valuable source of data can be used to

  • Describe past events: Descriptive Analytics
  • Analyze defects and incidents: Diagnostic Analytics
  • Predict Future Events: Predictive Analytics
  • Design Optimal Processes and Decisions: Prescriptive Analytics

Let’s dive deep into each type of analytics to understand how it relies on good EDI infrastructure.

Descriptive and Diagnostic Analytics

Descriptive analytics is about understanding what has happened in the past.

With a properly configured EDI setup, we can map historical transaction data to gain insights into past performance.

A process flow diagram outlining the stages of the end-to-end delivery chain. The left side shows the order process, from “Order Creation” to “Truck Leaving” the warehouse. The right side sho

For instance, EDI messages can be status-updated at each stage of your distribution chain.

  1. Each event is linked with a time stamp (from Order Creation to Store Delivery)
  2. Actual Time Stamps can be compared with Expected Time Stamps
  3. Delays can then be analysed to find the root cause
A process flow diagram outlining the stages of the end-to-end delivery chain. The left side shows the order process, from “Order Creation” to “Truck Leaving” the warehouse. The right side sho
  • Expected Times are calculated using target lead times agreed upon with operational teams
  • ERP, WMS, Freight Forwarder Systems and Store Management Systems are all communicating timestamps using EDI

You can collect and process these timestamps to create automated reports that track shipments along the distribution chain.

💡 For more details,

Automated Supply Chain Control Tower with Python
Optimize your Supply Chain Network with an automated solution to follow your shipments and evaluate the risk of late deliveries
What if we want to simulate events or failure in our logistic chain?

Digital Twin in Supply Chain Management

These computer models represent various supply chain components, including distribution centres, transportation networks, and manufacturing facilities.

Visual representation of a supply chain flow, featuring a factory, warehouse, and store connected by transportation, with Python logos indicating different scripts for simulating processes at

EDI transactions can help you provide real-time data to keep the digital twin updated.

A supply chain digital twin diagram created with Python depicting the flow from production to replenishment. The flow includes factories, transportation, warehouses, and stores, with Python i

Let us assume that you have built a simple digital twin, including

  • Models replicating transportation, store, warehouse and factory operations
  • Connection along the chain replicating the information and goods flows
How can we exploit this data?

You can connect your EDI flow with:

  • The warehouse model to estimate the time of picking up the batch of orders received in the EDI message
  • The factory model compares the order quantity with the actual production capacity

This is a great tool for simulating and analysing different scenarios using real orders communicated via EDI without disrupting actual operations.

💡 For more details

What Is a Supply Chain Digital Twin?
Use python to create a model representing your supply chain network to optimize your operations and support strategic decisions.
What is Supply Chain Analytics?
Use data analytics with python to improve operational efficiency by enabling data-driven diagnostics and decisions at strategic and operational levels

Conclusion

💡
If you have any question, feel free to here: Ask Your Question

Understanding the role of Electronic Data Interchange (EDI) in supply chain management helps us appreciate how data transmission is critical to modern business operations.

This pivotal technology provides the foundation for efficient communication between various computer systems.

What are the impacts on reporting?

Impact on Sustainability Reporting: ESG and Greenwashing

Environmental, Social and Governance (ESG) reporting is a method companies use to disclose their governance structures, societal impacts and environmental footprint.

A visual representation of the three pillars of ESG. Each pillar is displayed in a separate colored house-shaped section. The “Environmental” pillar covers carbon footprint reduction, climate

This non-financial reporting became a strategic aspect for companies, as it may affect consumers' perceptions and access to investments.

How can Electronic Data Interchange ensure data consistency and support auditing?

ESG reporting can be problematic due to the need for greater standardisation and the difficulty of ensuring data accuracy.

What happens if you feed your ESG report with wrong data?

Audits can become a risk for any company that wants to report this score officially.

A diagram illustrating the data flow for ESG reporting. At the center is a “Data Lake” receiving data from multiple sources: factory systems (production management, utilities bills, waste inv

Advanced Business Intelligence solutions can support data processing automation; EDI capabilities can help you ensure data traceability.

This can support the fight against greenwashing.

Greenwashing is the practice of communicating a false image of sustainability by making misleading claims about a product's environmental benefits.

The graphic displays five “sins” of greenwashing, represented by icons and corresponding labels: “Lies” (a figure with a lying gesture), “Vagueness” (a question mark over a dollar symbol), “P

As general public awareness increases, companies have to put more effort into ensuring the accuracy of their calculation.

This relies on the proper collection, transmission and processing of transactional data supported by EDI technologies.

For more information about ESG reporting and greenwashing,

What is ESG Reporting?
Leveraging Data Science for Comprehensive and Effective Environmental, Social and Governance reporting of a company.
What is Greenwashing? How Can We Use Analytics to Detect it?
Explore how data analytics can help us to detect and prevent greenwashing to promote genuine sustainability.

About Me

Let’s connect on LinkedIn and Twitter. I am a Supply Chain Engineer who uses data analytics to improve logistics operations and reduce costs.

For consulting or advice on analytics and sustainable supply chain transformation, feel free to contact me via Logigreen Consulting.

Need Help?