The May 21 release of OIC brings lots of new features to B2B. This post will focus on the new UN EDIFACT support, but will also detail our new auto-generation of - send/receive pre-processor integrations - feature.
The usual caveat from me at the outset - I am not an EDI/EDIFACT expert - many folks tasked with creating such integrations are also not, so this is for you!
Version 1 of B2B in OIC supported X12, now we are also providing UN EDIFACT support. So what is the difference between the 2, apart from the fact that the latter is mainly used in Europe?
Apparently X12 has made inroads into the healthcare market (HIPAA), whereas UN EDIFACT has not. Both standards are used in areas such as supply chain, government etc.
This post begins with an introduction to the format of an order in UN EDIFACT, it is rather pedestrian, if fact probably boring for most of you, who are at home in EDI. I go through the order document line for line, this I am mainly doing for my own benefit, so that I actually understand the values being sent.
The post continues with a short introduction to the transport protocol I will use, AS2. Finally, we get to the section that covers the implementation of a simple UN EDIFACT orders based B2B transaction in OIC.
As already mentioned in my previous OIC B2B post from February - I like to think of the concept of pre-processing and processing of the EDIFACT Order. The "pre-processing" does the transport validation and business message validation. For example, is the Order document from a registered trading partner. The May 21 release of B2B will auto-generate the "pre-processing" send/receive integrations, allowing us to concentrate on implementing the backend business logic to take that EDIFACT order, convert it into xml and process it accordingly; in my case - creating a Sales Order in Netsuite.
UN EDIFACT - ORDER document
So let's begin with an introduction to the UN EDIFACT ORDER format -
I have an example of such a file -
Now to an explanation of the Segments and fields -
UNB - think of this as the message envelope - it contains identifiers for the sender and recipient.
UNG - Functional group header e.g. to group multiple issuers in one transmission file with invoices.
UNH - Message Header - must contain message type code and version e.g. Orders and 96A.
BGM - Beginning of Message - identifying the order - document name, number etc.
DTM - Date - i.e. order date
FTX - Free Text
NAD - Name and Address
LIN - Line Item
PIA - Additional Product Id
IMD - Item Description
MEA - Measurements i.e. physical measurements of the item ordered
QTY - Quantity - i.e. quantity ordered.
PRI - Price details
SCC - scheduling conditions i.e. for delivery
UNS - Section control to separate the detail and summary sections.
UNT - Trailer - This segment ends the message. It details the total number of segments in the message and the control reference number of the message.
UNZ - the interchange trailer
Let's look at the UNB in more detail - here is a simple example -
Then we see the separator :
+ Now to the sender identifier, in my case SENDER1
:14 - Sender Qualifier
+ Recipient identification - RECIPIENT1
:14 - Sender Qualifier
Now to the Date of Message - 210428 (YYMMDD)
:Time - 0121 (HHMM)
+ Interchange Control Reference - 1234 - a unique value, assigned by the sender
+ Recipient's Password reference - ORDERS
Next comes the Functional Group Header - UNG -
Now to the header -
+ ORDERS - Message Type Identifier
:D:96A - Message Type and version number
:UN - Controlling agency
:EAN008' - Association assigned code.
Now the BGM (Beginning of Message) segment - this is optional.
::9 - code list 9 = EAN
+ Document number - 123 - e.g. PO reference nr
+ 9 - message function code number
Now the DTM segment - Date Time
PUR refers to Purchasing information.
UC - Ultimate Consignee
+++WINDSBACH - store name, think of a retail shop in the town of Windsbach.
+Hauptstrasse 1 - street and house number
+WINDSBACH - town or city
+91575 - Postcode / zip
+DE- Country code
:EN - Item loading count - Number type code. Default value is EN.
7290005554759 - EAN code for the product EAN - type of barcode that encodes article number (European Article Number)
Now to segment QTY - quantity -