Documentation

Create and import EDI specs

Article author
Admin
  • Updated

EdiNation allows you to create custom EDI formats, modify existing EDI formats, or import SEF (Standard Exchange Format) specifications. All EDI specs in EdiNation are represented in the OpenEDI JSON format for EDI standards. To create custom EDI specifications, you must be familiar with OpenEDI.

 

The OpenEDI format

All EDI messages in EdiNation are represented as EDI models that match the official EDI guidelines and can be downloaded in the OpenEDI format.

The OpenEDI format is based on the Schema object in OpenAPI 3 and is used to represent EDI messages across all available EDI standards in EdiNation. It is open-source under the MIT license and was invented by EdiNation.

The full specification is available on GitHub - The Open EDI format.

 

The EDI SEF format

EdiNation supports the SEF (Standard Exchange Format) format, and SEF-compliant specifications can be imported into EdiNation. The end result of a SEF file import operation is a new EDI model in our OpenAPI EDI format; i.e., the SEF file is converted to OpenEDI.

The level of support for SEF is detailed in the How to migrate from SEF article.

 

Custom EDI models

The purpose of the custom EDI models is to accommodate partners whose specifications may differ from the standard and require modification. 

Although you can create an OpenEDI specification from scratch, it is more practical to download an existing one and modify it to match your requirements. To showcase how to do that, we'll walk you through a simple step-by-step guide to get you started.

 

Create an OpenEDI model

Let's assume you need to make a change to the X12 4010 850 model (X12's purchase order), or, in other words, create a new version of X12 4010 850 for a specific partner, who expects the CUR segment at the top level to be mandatory. In the standard 4010 version, the CUR segment is optional.

Go to the EDI Spec Library and select the standard model for that transaction:

edi-spec-custom.png

 

Download the OpenEDI JSON by clicking the Download button. The EDI specification will be downloaded as a JSON file named en-josn.json.

edi-spec-custom-download.png

Rename the file to a meaningful name. The name will be used as the ID for the new model and must be globally unique across EdiNation. The name must be a combination of letters and numbers, .(dot) or _(underscore), to begin with, a letter, and not begin with "EdiNation". It is a good idea to prefix the name with your company or project name.

Rename the file to x12_850_import.json

Go to the EDI Spec Builder and click the import (+) button to select the JSON file that you renamed in the previous step:

edi-spec-custom-upload.png

If the file fails to upload, it's probably because it already exists in EdiNatio, e.g., was uploaded by another user. Either find the specification and delete it, or rename the file again to a name that is not present in the list of custom specifications. Then re-upload it.

After the upload, a success notification will be displayed. Find the imported EDI model by name and select it to load it into the JSON editor:

edi-spec-custom-x12-850.png

 

Although this guide suggests you modify the OpenEDI spec in the JSON editor, it is usually more convenient to open the specification file in the JSON editor of your choice (such as Notepad++ or VS Code) and modify it there.

Our requirement was to enforce the CUR segment at the top level to be mandatory, so find the definition of the message TS850 (the top level), and add the CUR segment to the array of required segments for this level, like below:

edi-spec-custom-cur.png

To finalize the new model's creation, click the Update button. This will upload the new specification into your subscription (if you configured a paid API key) or into the public free subscription. It will be ready for use straight away:

edi-spec-custom-update.png

A notification will be displayed when your new EDI model is successfully uploaded.

 

Import a SEF specification

To import a SEF file and convert it to OpenEDI, upload the SEF file (the file extension must be .sef and not blank or other) using the import (+) button. The specification will be imported and displayed just like any other OpenEDI model.

To learn about the details on how SEF is supported, go to the How to migrate from SEF article.

 

Delete a custom model

To delete an existing EDI model, click the Delete button:

edi-spec-custom-delete.png

The model is removed from the subscription and cannot be used any longer.

 

How to use the custom EDI models?

Once you create a custom EDI model, it won't be used automatically. You have to explicitly configure it in the Parser configuration.

Copy the model name (clicking on the model name automatically copies it to the clipboard):

edi-spec-custom-copy.png

Go to EdiNation and open the Parse custom model box. Paste the name of the custom model:

edi-spec-custom-save.png

Now every EDI file you parse or validate will use this model instead of the standard models available in EdiNation.

edi-spec-custom-use.png

 

EdiNation API or InHouse

To use custom EDI models with the Developer API or the InHouse API Read operation, specify the model query parameter, e.g.

POST https://api.edination.com/v2/read?model=x12_850_import

For all other API operations, populate the Model property directly in the JSON, as shown in the API Reference.

 

Next steps

To learn more about how to translate and validate EDI files with EdiNation, try these tutorials:

Share this:

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.