EDI Specs
EDI specs enable the definition of the agreed-upon structure and rules of the EDI documents that trading partners exchange. They define the structure of an EDI document, including the transaction set code, version, and the structure of the document message. EDI specs are used automatically whenever you use an EDI File Processor to process an EDI Document. The correct spec is determined using a combination of the trading partner, transaction set code, and version. EDI File Processors then use the relevant spec to validate and map the EDI document to/from the canonical model defined in the spec.
Each EDI Spec is associated with a specific EDI Template which serves as the starting point for the spec.
EDI specs can be edited and customized to meet a trading partner's specific needs. For example, when a spec validates an EDI document, it converts the EDI document into the canonical model defined in the spec. So, the ANSI X12 formatted EDI is transformed into a human-readable JSON structure with a structure and property names as defined in the EDI spec. Other X1 components, such as translators, can further process and transform the document.
Conversely, when an EDI Spec is used to generate an ANSI X12-compliant EDI document, users translate their source documents into a representation that matches the canonical model defined in the EDI Spec. This enables the spec to transform the canonical representation of the EDI document into the ANSI X12 format expected by the trading partner.
The EDI Specs page is where you can view and add your EDI specs.
On the EDI Specs page, view the list of EDI specs.
Search for an EDI spec
On the EDI Specs page, you can search for a specific EDI spec using the default search fields.
In the top right corner of the page, select New EDI Spec.
On the EDI Spec Details page, enter the EDI spec information
In the top right corner of the page, select Save.
See the "New EDI Spec Field Descriptions" below for more information about the EDI spec fields.
New EDI Spec Field Descriptions
Section and Field | Description |
---|---|
EDI Spec Details | |
Name | Enter a unique name for the EDI spec. |
Trading Partner | The trading partner associated with the EDI spec. |
EDI Type | The EDI document standard: EDIFACT or ANSI X12. |
EDI Transaction Set Code | The X12 transaction set code that identifies the type of EDI document. NoteThis value cannot be edited after you save it. |
EDI Version | The X12 version of the EDI document. NoteIf you don't enter an X12 version, X1 will set it to 4010 by default. NoteEntering the transaction set code and X12 version automatically loads the structure of the EDI document from the related EDI Template. This enables you to create a new EDI Spec for a specific transaction set and X12 version and have the structure of the EDI document automatically populated. You can then change your EDI spec to match the specific requirements of the trading partner you're working with. NoteThis value cannot be edited after you save it. |
Terminator | The character used to terminate segments in the EDI document. This is typically a tilde ~ character. |
Separator | The character used to separate elements in the segments in the EDI document. This is typically an asterisk * character. |
Composite Separator | The character used to separate composite elements in the segments in the EDI document. This is typically a colon : character. |
Usage Indicator | How the EDI spec will function: Production or Test
|
Map Data Elements? | The EDI Spec will automatically map to an EDI Data Element when being parsed, or to an EDI Element code when being generated. |
Document Spec | The Document Spec of an EDI Spec is the container for the EDI components that comprise the EDI Document. The Document Spec is created automatically from the related EDI template and can be further customized to meet the specific needs of the trading partner. See the Add Child entry below in this table. |
Test Document | Enter or upload an EDI or JSON document for testing. NoteAfter you enter or upload the test document, you can test it by selecting Test in the top right corner of the page. The Test Result dialog box displays to inform you if the test passed or failed. If the tests pass, select View Output to view the translated document. |
On the Document Specs tab, drag and drop the document specs to arrange them in any order you want.
Note
Optionally, you can select
next to a document spec, and then select either Add Before or Add After to arrange it.
In the top right corner of the page, select Save.
A segment contains elements and can occur one or more times in a sequence.
At the bottom of the Document Spec tab, select Add Child. A new loop entry displays by default in the Document Spec section.
Note
In this procedure, you'll be changing the default loop entry to a segment entry.
Select
next to the new loop.
Enter the segment information.
Select
to collapse the new segment information.
In the top right corner of the page, select Save.
See the "New Segment (EDI Spec) Field Descriptions" below for more information about the new segment fields.
New Segment (EDI Spec) Field Descriptions
Field | Description |
---|---|
ID | Select a unique ID for the segment. This ID is used to reference the segment in the EDI document. It should match the ID as defined in the ANSI X12 standard as well as that of the EDI file that will be processed. |
Name | Select the "canonical" name for the segment. This name is used to map to and from the ANSI-compliant EDI and is used by translators when translating to and from EDI format. |
Type | This is set to loop by default. Select the drop-down arrow, and select segment. |
Min | The minimum number of times the segment can occur in a sequence. |
Max | The maximum number of times the segment can occur in a sequence. |
Is required? | Determines if the segment is required or not. NoteIf the segment is required, it must occur at least one time regardless of the minimum value. |
An element contains the data of the EDI document and can only occur within a segment. Elements can occur only one time and their min/max values determine the length of the data in the element.
On the Document Spec tab, select
next to a segment to expand it. The Child Components list displays for the segment.
At the bottom of the Child Components list, select Add Child. The new element entry displays in the Child Components list.
Select
next to the new element.
Enter the element information.
Select
to collapse the new element information.
In the top right corner of the page, select Save.
See the "New Element (EDI Spec) Field Descriptions" below for more information about the new element fields.
New Element (EDI Spec) Field Descriptions
Field | Description |
---|---|
ID | Optional: Select a unique ID for the element. This ID is used to reference any EDI Data Elements that the data should be validated against. If you provide an ID, X1 validates the data in the element against the list of valid codes for the element. If the data in the element isn't found in the list of valid codes, the EDI document is rejected with an error that notifies the sending party that the value is not valid for the data element. |
Name | Select the "canonical" name for the element. This name is used by translators when translating to and from EDI format. |
Type | This is set to element by default. |
Min | The minimum length of the data in the element. |
Max | The maximum length of the data in the element. |
Is required? | Determines if the element is required or not. |
You can optionally add conditions to an element.
Conditions specify if and when the element must have data or is allowed based on other elements in the segment.
On the Document Spec tab, select
next to a segment to expand it. The Child Components list displays the elements for the segment.
In the Child Components list for the segment, select
next to an element.
In the Child Components list for the element, select Add Child. The new condition entry displays in the Child Components list.
Select
next to the new condition.
Enter the conditions.
In the top right corner of the page, select Save.
See the "New Condition (EDI Spec) Field Descriptions" below for more information about the new condition fields.
New Condition (EDI Spec) Field Descriptions
Field | Description |
---|---|
Element At | Enter the condition. The condition requires the index (1-based) of the element in the segment when to apply the condition and what the condition is. |
Exists? | Determines if the element at the index must exist or not. |
Requirement |
|
A loop contains other loops and segments and can occur one or more times in a sequence.
At the bottom of the Document Spec tab, select Add Child. A new loop entry displays by default in the Document Spec section.
Select
next to the new loop.
Enter the loop information.
In the top right corner of the page, select Save.
See the "New Loop (EDI Specs) Field Descriptions" below for more information about the new loop fields.
New Loop (EDI Specs) Field Descriptions
Field | Description |
---|---|
ID | Optional: Select a unique ID for the loop. This ID should match the ANSI X12 standard, if provided. |
Name | Select the "canonical" name for the loop. This name is used by translators when translating to and from EDI format. |
Type | This is already set to loop by default. |
Min | The minimum number of times the loop can recur (the number of loops) in a sequence. |
Max | The maximum number of times the loop can recur (the number of loops) in a sequence. |
Is required? | Determines if the loop is required or not. NoteIf the loop is required, it must occur at least one time regardless of the minimum value. |
On the Document Spec tab, next to a document spec, select
, and select Remove.
In the top right corner of the page, select Save.
Next to an EDI spec, select
. The Delete EDI Spec dialog box displays.
Select Delete.
Note
After you delete an EDI spec, if an EDI that matches the transaction set code and X12 version of the deleted spec is received, the system won't be able to validate the EDI document, so it'll throw an error.