EDI Templates
An EDI template is an object that defines the structure of an EDI document, including the transaction set code, version, and the structure of the document message.
EDI templates are the starting point for EDI specs, which validate and map EDI documents. When a new EDI spec is created for a specific transaction set and version, it is populated with the structure of the related EDI Template.
The EDI Templates page is where you can view and add new EDI templates.
On the EDI Templates page, view the list of EDI templates.
Search for an EDI template
On the EDI Templates page, you can search for a specific EDI template using the default search fields.
Creating an EDI template creates a new document type for the EDI document defined in the template. This document type is created automatically from a combination of the transaction set code and version, which must be unique per the EDI Template.
In the top right corner of the page, select New EDI Templates.
On the EDI Template undefined page, enter the template information, and select Save in the top right corner of the page.
See the "New EDI Template Field Descriptions" below for more information about the EDI template fields.
New EDI Data Element Field Descriptions
Section and Field | Description |
---|---|
EDI Template Details section |
|
Name | Enter a unique name for the EDI template. |
EDI Type | The X12 transaction set code that identifies the type of EDI document. |
EDI Transaction Set Code | The X12 version of the EDI document. |
EDI Version | xxxxx |
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. |
Document Spec tab | The Document Spec is the container for the EDI components that comprise the EDI Document. See EDI Specs for more information. You can select Upload to upload an ANSI X12 schema definition to the EDI template. |
Edit the EDI template information.
In the top right corner of the page, select Save.
Note
You can edit all the fields except the following:
Transaction Set Code
X12 Version
If you want to refresh the EDI Specs associated with the EDI template:
Select Propagate in the top right corner of the page. The EDI Specs dialog box displays.
Select the EDI Specs you want to refresh, and select Propagate.
You can select Import EDI XSD to import an ANSI X12 XSD to the EDI Template. After the upload is completed, the document spec for the template is created from the imported XSD.
You can select Upload to upload an ANSI X12 schema definition to the EDI template.
After you edit the EDI template, any specs created from the template after the edits will reflect the changes to the EDI template.
In the Document Spec section, 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.
At the bottom of the Document Spec section, 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 Template) 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. |
Note
You can add an element only in a segment.
In the Document Spec section, 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 Template) Field Descriptions" below for more information about the new element fields.
New Element (EDI Template) 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. |
Default Value | (Hey Field. Can you please provide a definition for Default Value? Thanks!) |
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.
In the Document Spec section, 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 Template) Field Descriptions" below for more information about the new condition fields.
New Condition (EDI Template) 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 |
|
At the bottom of the Document Spec section, 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 Template) Field Descriptions" below for more information about the new loop fields.
New Loop (EDI Template) 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. |
In the Document Spec section, next to a document spec, select
, and select Remove.
In the top right corner of the page, select Save.
If you want to create a new EDI template, and all or most of its information will be the same as a current EDI template, you can clone the current EDI template. Cloning is a convenient way to avoid entering the same EDI template information multiple times.
Next to the EDI Version column for an EDI template, select
. The EDI Template Details page displays for the EDI template clone.
Enter the EDI template information. See Edit an EDI template for more information.
Next to the EDI Version column for an EDI template, select
. The Delete EDI Template dialog box displays.
Select Delete.
Note
When you delete an EDI template, its related document type is also deleted.