What makes EDI so hard?
stedi.com
stedi.com
> Since each business has multiple trading partners, and each of its trading partner operates on different business systems, “point to point” integration of these transactions (that is, mapping Walmart’s internal database format directly to the QuickBooks JSON API) would require the recipient to have detailed knowledge of many different transaction formats – for example, a company selling to three customers running on NetSuite, SAP, and QuickBooks, respectively, would need to understand NetSuite XML, SAP IDoc, and QuickBooks JSON. Maintaining familiarity with so many systems isn’t practical; to avoid this explosion of complexity, businesses instead use commonly-accepted intermediary formats, which are broadly known as Electronic Data Interchange – EDI.
One thing I do hate with a passion still is the AS2 transmission later that some vendors used. My god, what a shitshow that is. No stable clients, discrepancies between implementations and all for what? Essentially transferring files. Ugh.
I've also heard that MDNs hold up in a court of law; no idea if that's been tested. But it's a great way to confirm delivery of the payload without having to worry about parsing errors.
I would love finding the system was able to export a slightly more helpful CSV somewhere in a hidden menu that would enable me to gradually remove my spaghetti code or reduce the number of CSV imports.
PO1**1*2P*0.0001*PE*GE*EDI Core~
didn’t require memorizing a huge compression dictionary just to work with.1) syntax - we are using XML which has weird element names and values and it's mixed camel case with other styles. It's not nice or possible to read without a manual/reference
2) brokers - you connect to others throught "EDI brokers" (dunno the right name in english). Basically you don't connect with other directly but it always goes through one or more brokers which are part of some EDI union or whatnot. So for example order from chain to a producer goes like this Supermarket -> Broker -> Producer. What this means is that different brokers pass you the orders in different way. So i guess it can vary a lot. Our broker is maybe the largest in the country and yet the only way how to programatically get messages from him is invoking a Java program, which downloads the message from his servers and that is possible to do exactly once. Then it's up to you to distribute it in your company as you wish. God forbid if you corrupt the message or something. This is very bad because you have to do a lot more work than just do a few REST requests to deal with anything. It prolongs basic integration by a lot.
Each transaction type had a grammar, so each starting tag could mean different things depending on its position within the grammatical structure of the transaction. We were new to EDI and had to roll out a bunch of partners fast, so we bought $60K software to help us. Turned out, that software had no understanding of the grammar; you had to use a cumbersome GUI to essentially write code from scratch to pull out what you wanted, with the only control structure available being GOTOs. Just pulling out a dozen important fields looked like a significant engineering effort.
Then our partners said they required us to display to the user everything they sent. I ended up ditching the $60K software and writing my own tool with a proper parser, so I could input the grammar of a new transaction type in an hour and sort everything out right. After that it was easy.
We didn't have to deal with brokers at least, we connected to everyone directly. I think the company became one of the brokers after I left.
The discipline of dealing with other people's systems is a great learning point.
The last person I integrated with was totally bemused by my huge list of questions. They always seem to assume that the way their system exports orders is the norm!
A:"When do you export orders, as soon as they are placed or on some schedule?"
B:"As soon as they are placed".
Some time later in the conversation...
B:"You needn't run it that early, we don't export orders until after 7.30am".
You really can't trust anything in EDI until you have seen the orders!
The company must have implemented a design internally to spawn a new process to deal with each new order. The first I noticed was that the log file it spat out was not in order, it had messages about different parts of different orders all intermingled... then 1 day I put 700 orders in and it launched 700 processes and the server ran out of swap space and crashed.... Their support team felt I was unreasonable! I had to rate limit afterwards with my system drip feeding the orders! It is funny to think that it is still in use I understand, and busier than ever!
Semantics are embedded at different layers of different systems and machines don't have the common sense to notice different semantic schemas.
From the medical side; we had a pathology system, an ADT (admission, discharge, transfer) system, a clinical system, and a billing system. The semantics of what constitutes a demographic update of a patient record vs. an update of an encounter (visit) is bad enough when the same data may be denormalized in messages in both streams. Even with an established interchange format (HL7) each system encodes patients, their visits, their billing codes, and their results in slightly different ways. Sure; the pathology system and clinical system both understand HL7 and ICD9, but do they agree on what it means when a modifier gets added to one of the codes during an update? Or does an interface engine MITMing the connection have to generate a delete/insert in one direction to synchronize the semantic meaning in the downstream systems? Or what exactly does "gross description" mean to a pathologist vs. a clinician (not to mention a biller or admission clerk or me), not to mention the systems that are supposed to store this information in a meaningful way (it turns out the best quantifiable semantic representation of the latter is plain ASCII, or maybe a rich text formatted document).
Hopefully Stedi can make adopting EDI easier and increase its popularily over the next 50 years and there isn't such a demand to create alternative systems.
One thing - in the past the EDI integrations just had to be simple, the feature set was so small - there wasn't room to go totally crazy.
Once they mandated full ehealth records and exploded the complexity of the medical IT side, clinician productivity (face to face with patient) went way down. Integration pain went way up. The old tab separated value row turned into GIGANTIC XML monstrosities for the smallest things - now thousands of these blobs in a document. If you put even 10,000 XML blobs in an exchange vs tab separated values - very quickly appreciated the old way of doing things. One annoying thing, even the person on other end you are dealing with lost all ability to troubleshoot issues.
For some reason in some areas - no EDI in the traditional sense is being used (ie, govt contracts with idiots who build latest buzzword filled solutions - total annoyance to interact with).
In the bigger EDI space UBL was supposed to be the XML standard that was going to crush the "old" standards - but I haven't seen it take over yet - but not close enough to space, someone else probably knows better if UBL or similar is the clear dominant player these days.
What makes it super complicated and frankly pisses me off are the "exclusive" deals retailers have. Want to work with Target? Too bad, you have to work with CommerceHub. Macy's? Nope, gotta use SPS Commerce. This is why I like Shopify or even Amazon Vendor Central, which uses EDI. Wayfair was fortunately open to the idea of anyone linking to their EDI servers so long as there's a proper onboarding process.
My company, which is an ERP for wholesalers, doesn't have a way to directly work with the retailer. It always has to go through one of these middleware companies.
I build and integrate EDI solutions for small/mid and retail juggernauts.
The x12 argument was fine 5-10 years ago. Certainly not now. There are much better structures available.
Even though it should be a standard, you can't just e-mail a file to someone and except it to work. There's always integration work needed on both sides. Even then, errors frequently occur where you have to manually adjust something. I work on the operational side, but have become quite the edifact expert just to be able to do my work.
> What we’re seeing here is that while a standard can be opinionated about the structure of a document and the naming of fields, it cannot be opinionated about the contents of a business transaction – the contents of a business transaction are dictated by the idiosyncrasies of the business itself.
Maybe it's the engineer in me speaking, but this seems like a pretty unfortunate stance to take. Sort of similar to saying, "we have the concept of HTTP status codes, but we cannot possibly opine on the codes themselves."
A bit hyperbolic for sure, but not having opinions on critical multi-party information has led to things like the reluctance of financial services to support non-ASCII values for customer names.
Maybe I've been lucky in my travels, but none of them were terribly difficult, so long as you had a spec doc in front of you. (As a C# Dev, I'd usually use some form of FileHelpers alongside of MultiRecordEngine, if you're having to deal with things like 'correction' records, treat the resulting records as an eventstream and use those to build the final dataset.)
What gets -nasty- is when companies violate a spec in a subtle way. In one case, the 'response' file for ACH transfers from one bank 'reused' the leftmost digit in a certain field for their own code. This however made it extraordinarily difficult to reconcile to the original check due to the relative shortness of this identifier.
complexity of those industries is giant
I set up our company with EDI through sps commerce - we didn't want to build a tight integration so we exchange flat files on SFTP.
I only had to interact with EDI once or twice, but I remember when I discovered that BizTalk shipped with a huge set of premade schemas for most of the X12 and EDIFACT message types, plus extra pluggable components that were "enhanced" versions of the regular translator components that handled the more complex aspects that most "plain" flat files didn't have, mostly stuff around batching/splitting/validating I think. Many of the schemas were gigantic and unbelievably complicated.