EDI Configuration Files and Schemas
This topic lists configuration and schema files that are available in an EDI collection and shows how to upgrade older configuration files. An EDI collection contains several configuration files that can be edited in an XML editor (e.g., Altova XMLSpy). Possible configuration files are listed below.
This file defines all message types of a particular EDI collection. You can edit this file to add or remove message types. See Add/Remove Message Types.
|
This file defines the structure of an EDI component. It is not recommended to edit this file.
|
The EDI collection directory must include one or several <Message>.Config files. One such file corresponds to an EDI message type and contains group and segment definitions used in that message. The <Message>.Config files are referenced in EDI.Collection. You can edit <Message>.Config files if you want to modify the structure and/or validation rules of fields of a particular message. Note that changes to these files apply only to that specific message (local customization).
|
This file defines data elements, segments, composites, and subcomposites of EDI files and is used when an EDI file is parsed. You can edit .Segment files if you want to modify the structure and/or validation rules of a field (data element) in all messages where it occurs. Changes made to this file are global.
|
This file defines EDI code values that MapForce uses to validate EDI input and output files. The code values defined in this file correspond to those defined in the respective EDI standard. You can edit .Codelist files if you need to change the default validation rules (e.g., to add new codes that are not defined in the EDI code list). For more information, see Incomplete Validation and Full Field Validation.
|
This file is related to X12 and HIPAA X12 only. It defines the structure of ParserErrors_Message and ParserErrors_Group items in an EDI component. These items contain information about parse errors and can be used to create X12 997 (Functional Acknowledgement) and X12 999 (Implementation Acknowledgement) messages. For more information, see Validation of X12 and HIPAA Components.
|
EDI configuration schemas
Whenever you change a configuration file (see list above), it is important to validate the file against its XML schema. The schema is available in the MapForceEDI directory of your application folder and can be one of the following:
This configuration schema was introduced in MapForce 2011 Release 2. If you have configuration files that use a schema prior to Version 3, the schema must be upgraded. For more information, see Upgrade Older Configuration Files below.
|
This configuration schema was introduced in MapForce 2011 Release 3. It contains multiple enhancements to the original EDIConfig.xsd schema, including the ability to define custom recursive hierarchies which might be necessary when you map data to or from X12 and HL7 formats.
|
This configuration schema was introduced in MapForce 2017. This schema allows you to define a data element that has incomplete validation rules. With this schema, it is possible to define character-level validation.
|
This configuration schema was introduced in MapForce 2018. This schema allows you to map data to or from NCPDP SCRIPT components.
|
This configuration schema was introduced in MapForce 2021. This schema allows you to map data to or from SWIFT MT components.
|
Upgrade older configuration files
EDI configuration files contain a reference to and are validated against one of the XML schemas available in the MapForceEDI directory (see EDI Configuration Schemas above). MapForce recognizes custom EDI configurations that are based on EDIConfig.xsd Version 3 or later. Compared to the previous versions, this schema adds the ability to map data to or from multiple message types in the same EDI component. If you use custom EDI configuration files that have a schema version prior to Version 3, MapForce will inform you that the selected EDI collection supports only a single message type per component.
The instructions below explain how to upgrade the schema of an EDI configuration file from EDIConfig.xsd Version 2 to EDIConfig.xsd Version 3. In our example, we use the ORDERS message (EDIFACT).
1.Copy Envelope.Config from the original configuration folder (e.g., EDIFACT) to the folder containing your customized EDI collection.
2.Open EDI.Collection in a text editor and change the value of the root element's Version attribute from 2 to 3 (highlighted yellow below).
3.Add <Root File="Envelope.Config"/> after </Meta> (highlighted yellow):
<?xml version="1.0" encoding="UTF-8"?>
<Messages Version="3">
<Meta>
<Version>D</Version>
<Release>22A</Release>
<Agency>UN</Agency>
</Meta>
<Root File="Envelope.Config"/>
<Message Type="ORDERS" File="ORDERS.Config" Description="Purchase order message"/>
</Messages>
4.Open ORDERS.Config and change the value of the root element's Version attribute from 2 to 3.
5.Add <Format standard="EDIFACT"/> (the actual value depends on the EDI standard) after </Meta> (highlighted yellow below).
6.Change <Group name="Message"...> to <Group name="Message_ORDERS"...> (the actual value depends on the message type) and remove the outer group levels (Envelope, Interchange, and their segments) as shown below:
<?xml version="1.0" encoding="UTF-8"?>
<Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="3">
<Meta>
<Version>D</Version>
<Release>04B</Release>
<Agency>UN</Agency>
</Meta>
<Format standard="EDIFACT"/>
<Include href="Admin.Segment"/>
<Include href="EDSD.Segment"/>
<Include href="UNCL.Codelist"/>
<Message>
<MessageType>ORDERS</MessageType>
<Description>Purchase order message</Description>
<Revision>14</Revision>
<Date>2004-11-23</Date>
<!-- DELETED TEXT -->
<Group name="Message_ORDERS" maxOccurs="unbounded" info="UNH - Message header">
<Segment ref="UNH"/>
<Segment ref="BGM"/>
<Segment ref="UNT"/>
</Group>
<!-- DELETED TEXT -->
</Message>
</Config>
If your mapping was open while you were editing the configuration file, the mapping must be reloaded. The connections will change automatically from Message to Message_ORDERS.