System Design :👈 👉:HPACK QPACK

EDI - Electronic Data Interchange

EDI Transactions – Electronic Data Interchange

1. What is EDI?

EDI stands for Electronic Data Interchange.

EDI is the electronic exchange of business documents between two different organizations or computer systems in a standardized format, without requiring manual data entry or paper documents.

In simple words, EDI allows two companies to exchange business information automatically from one application to another.

Example: When a retailer orders 100 laptops from a supplier, the retailer's system can automatically send a purchase order to the supplier's system using EDI.

2. Real-World Example of EDI

Suppose there are two companies:

  • ABC Retail: A company selling electronic products.
  • XYZ Supplier: A company supplying laptops.

The following process happens:

  1. ABC Retail creates an order for 100 laptops.
  2. ABC Retail sends an EDI 850 Purchase Order to XYZ Supplier.
  3. XYZ Supplier receives and processes the order.
  4. XYZ Supplier sends an EDI 855 Purchase Order Acknowledgment.
  5. XYZ Supplier ships the laptops and sends an EDI 856 Advance Ship Notice.
  6. XYZ Supplier sends an EDI 810 Invoice.
  7. ABC Retail receives the invoice and processes the payment.

3. Common EDI Transaction Types

EDI uses standardized transaction codes. Each code represents a particular business document.

EDI Code Transaction Name Purpose
850 Purchase Order Buyer orders products from a supplier.
855 Purchase Order Acknowledgment Seller confirms the purchase order.
856 Advance Ship Notice Seller provides shipment details.
810 Invoice Seller sends an invoice to the buyer.
820 Payment Order / Remittance Advice Provides payment or remittance details.
846 Inventory Inquiry / Advice Shares inventory information.
940 Warehouse Shipping Order Requests a warehouse to ship products.
945 Warehouse Shipping Advice Confirms warehouse shipment.
997 Functional Acknowledgment Confirms receipt and basic processing status of an EDI interchange.
214 Transportation Carrier Shipment Status Provides shipment status updates.

4. How EDI Works

The typical EDI process involves the following steps:

Step 1: Create a Business Document

A business document is created in an ERP or business application.

Example: A purchase order is created in an ERP system.

Step 2: Convert into EDI Format

The application converts the purchase order into a standardized EDI format such as ANSI X12 or EDIFACT.

Step 3: Transmit the EDI Document

The document is transmitted using communication protocols such as:

  • AS2
  • SFTP
  • VAN (Value Added Network)

Step 4: Receive and Validate

The receiving company's EDI system validates the document structure and required information.

Step 5: Convert into the Receiver's Application Format

The EDI document is mapped into the receiving ERP or application database format.

Step 6: Process the Transaction

The receiving application processes the purchase order and may send an acknowledgment to the sender.

5. EDI Architecture

Sender ERP / Application EDI Translator Converts data into EDI Communication Layer AS2 / SFTP / VAN Receiver EDI Translator Converts EDI into data Receiver ERP / Application

Example:

A company uses SAP, while its supplier uses Microsoft Dynamics 365.

EDI allows both systems to exchange purchase orders and invoices even though they use different software.

6. Important EDI Standards

Different standards define how EDI documents should be structured.

Standard Description
ANSI X12 Widely used in the United States.
EDIFACT Widely used internationally.
TRADACOMS Historically used in UK retail.
RosettaNet Used in technology and electronics supply chains.

For example, EDI 850 belongs to the ANSI X12 standard.

7. EDI vs REST API

Both EDI and REST APIs allow systems to exchange information, but they work differently.

Feature EDI REST API
Purpose Business document exchange Application-to-application communication
Format X12, EDIFACT JSON, XML
Communication AS2, SFTP, VAN HTTP / HTTPS
Processing Often batch-based Often real-time
Structure Standardized business documents API-defined requests and responses
Example EDI 850 Purchase Order POST /api/orders

Important: EDI is not necessarily batch-based. Modern EDI integrations can also operate near real-time.

8. How to Implement EDI in .NET / ASP.NET Core

If you are developing an e-commerce application using ASP.NET Core, you might integrate EDI to exchange orders and invoices with external suppliers or retailers.

Possible Implementation Components

Component Responsibility
ASP.NET Core Web API Receives application requests.
EDI Translator Converts JSON/XML into EDI and vice versa.
EDI Mapping Maps application fields to EDI fields.
SQL Server Stores orders and transaction records.
RabbitMQ Handles asynchronous processing.
AS2 / SFTP Transfers EDI documents.
Background Service Processes incoming and outgoing EDI files.

Example EDI Integration Flow

Customer Places an Order ASP.NET Core Web API Order Service EDI 850 Generator EDI Translator AS2 / SFTP Supplier System

9. Important EDI Terms

  • Trading Partner: An organization with which you exchange EDI documents.
  • EDI Mapping: Converting application data into EDI fields and vice versa.
  • EDI Translator: Software that converts data between application formats and EDI formats.
  • AS2: A communication protocol used to securely exchange EDI documents over HTTP/HTTPS.
  • VAN: Value Added Network, a service that facilitates EDI document exchange.
  • Acknowledgment: A response indicating receipt or processing status.
  • Interchange: A formatted EDI transmission containing one or more transaction sets.

10. EDI Interview Questions and Answers

Q1. What is EDI?

EDI stands for Electronic Data Interchange. It enables organizations to exchange standardized business documents electronically between different computer systems.

Q2. What is EDI 850?

EDI 850 represents a Purchase Order document used by buyers to place orders with suppliers.

Q3. What is EDI 856?

EDI 856 is an Advance Ship Notice that provides shipment details before the goods arrive.

Q4. What is the difference between EDI and API?

EDI exchanges standardized business documents, whereas APIs expose application functionality and exchange data using defined endpoints and formats.

Q5. What is AS2?

AS2 is a secure communication protocol used to exchange business documents over HTTP/HTTPS.

Q6. What is EDI Mapping?

EDI mapping is the process of converting data from an application's internal structure into the fields required by an EDI standard, and vice versa.

Q7. Can EDI integrate with .NET applications?

Yes. ASP.NET Core applications can integrate with EDI translators, mapping engines, messaging systems and AS2/SFTP communication services.

11. EDI Integration in nopCommerce

EDI is particularly useful when integrating a nopCommerce e-commerce platform with large retailers, suppliers, warehouses and logistics companies.

For example, a nopCommerce store can:

  • Send EDI 850 purchase orders to suppliers.
  • Receive EDI 855 purchase order acknowledgments.
  • Receive EDI 856 shipment notifications.
  • Receive EDI 810 invoices.
  • Exchange inventory information using EDI 846.

Example nopCommerce EDI Architecture

nopCommerce E-commerce Store Order Service EDI Plugin EDI Document Generation EDI Mapping EDI Validation EDI Translator AS2 / SFTP Supplier System

Important: EDI is a business-document exchange standard and integration process, not a programming language or a .NET framework.

🔙
System Design :👈 👉:HPACK QPACK

Comments and Discussion