PHP EDI X12 Parsing

etriad picture etriad · Jan 14, 2012 · Viewed 9.7k times · Source

I have a project to implement an EDI solution into an existing ecommerce-like website. There are only three EDI documents involved and only one company to transfer files with. They have strictly defined the X12 documents, and will be responsible for all of the GET/PUT's to an FTP site. The three documents are the Inventory Advice (inbound), Shipment Notification (inbound), and Invoice (outbound).

We do not want/need to implement a full-blown EDI management solution. My question is, am I crazy to think that this is a relatively simple parsing task using PHP? Does anyone know of any existing PHP libraries that might be useful (maybe X12 to XML)? My searches have come-up empty. I'd like to get started on my own right away if it is a realistic goal and no other resources are available.

Answer

Francis Upton IV picture Francis Upton IV · Jan 14, 2012

The designer for the Oakland Data Transformer is free and this allows you to really understand the structure of the X12 document in the context of your sample document. You will need to contact Oakland Software support to get the required EDI definitions.

Depending on what you need, if you are just parsing the documents you should be able to do it pretty easily with PHP and understanding the context using the above product will take the mystery out of it for you.

Full disclosure: I run Oakland Software.