Use case: My company chops down trees and sells those logs to sawmills. We use shipping lines such as Hapag-Lloyd to send the logs to our overseas customers. Part of the process is telling the shipping line what information they need to tell customs agencies, what we're putting on their boat, and who the intended recipient is. We can automate all of that by sending
IFTMIN messages to the shipping lines. We can also automate the receipt and review of related information, such as the Bill of Lading that we must send to banks involved in the transaction, by receiving an
IFTMCS message from the shipping line.
> the messages standard provides a lot of options which are then made specific with message implementation guides removing some or many elements again
Yes, however:
- With the one partner I've worked with so far, they use the standard's messages exactly as described in the standard, with no customization of how specific fields are used. I expect that variations between the partners will be few.
- As for data elements that aren't used at all by the partner, defining data elements but not populating them doesn't cost me any time if I'm using a template that defines all the data elements out-of-the-box. Even if there were a need to explicitly remove them, removing them would be a lot simpler than defining them.
> you are typically mapping the standard format to an internal format very specific to your business so every mapping is unique
I'm trying to confine code that deals with EDIFACT and its idiosyncrasies to a minimal module that outputs the data in a format that abstracts over EDIFACT's structure and instead presents something like a "shipping_instruction" SQL table or JSON object. I want to work with an abstraction that:
- Uses descriptive names such as:
- "consigner" rather than "CO" (DE 3035)
- "measurement.value" rather than C174.6314
- Hides the concept of a "loop" entirely and just represents each instance of a loop as a table or object that has a many-to-one relationship with a parent.
I think it would be possible to define one such abstraction for each message type, and that abstraction application-independent. Application-specific code could then be written against that abstraction. This separation of concerns would allow me to--among other things--write the application-specific aspects of EDIFACT processing in Typescript, which is the language that 99% of my codebase uses.