Creating a Custom EDI Collection
An "EDI Collection" is a directory which contains configuration files applicable to a specific EDI standard. Each EDI collection contains a file named "EDI.Collection" and various other files referenced by it, directly or indirectly. The last directory on the path is the name of the EDI collection as it appears in the graphical user interface of MapForce when you add an EDI component to the mapping (for example, "UN/EDIFACT", "HL7, "ASC X12", and so on).
After installing MapForce, several built-in EDI collections exist at the following path: C:\Program Files\Altova\MapForce2022\MapForceEDI. If you run 32-bit MapForce on a 64-bit operating system, adjust the directory path to C:\Program Files (x86)\Altova\MapForce2022\MapForceEDI.
By default, the directory above contains only the built-in EDI collections. You can download all the supported versions of each EDI collection from the Altova Download Center (https://www.altova.com/mapforce/download#mapforce_libraries).
There are three ways to create custom EDI collections in MapForce:
1.Create a custom EDI collection in the following directory: C:\users\<name>\Documents\Altova\MapForce2022\MapForceEDI. For example, if you copy C:\Program Files\Altova\MapForce2022\MapForceEDI\EDIFACT to C:\users\<name>\Documents\Altova\MapForce2022\MapForceEDI\EDIFACT.Custom, the "EDIFACT.Custom" collection will appear in the list of EDI collections when you add an EDI component to the mapping.
Typically, your custom EDI collections should be distinguishable from the built-in EDI collections. For this purpose, they should not have the same name as the built-in collections. For example, the directory of your custom EDI Collection should not be called "EDIFACT", because this name is already used by the built-in collection from C:\Program Files\Altova\MapForce2022\MapForceEDI\EDIFACT.
However, if you specifically need your custom EDI collection to take precedence over a default EDI collection from C:\Program Files\Altova\MapForce2022\MapForceEDI, then name your custom EDI collection in the same way as the built-in EDI collection.
2.Designate a custom directory where your EDI collection is to be stored. For example, you can copy C:\Program Files\Altova\MapForce2022\MapForceEDI\EDIFACT to C:\EDIFACT.Custom. Next, click the Add Custom EDI Collection button on the dialog box above and browse for C:\EDIFACT.Custom. To make the path of the EDI collection relative to the mapping (.mfd) file, select the Save all file paths relative to the MFD file check box.
Custom EDI collections added this way affect only the current EDI component on the mapping.
3.(Not recommended) Create your custom EDI collection in the C:\Program Files\Altova\MapForce2022\MapForceEDI directory. Note that making changes in this directory requires administrative rights. This approach is supported only for backward compatibility and is not recommended.
It is not recommended to alter the contents of original files and folders in the C:\Program Files\Altova\MapForce2022\MapForceEDI directory, unless you want to override, at your own responsibility, the default EDI validation and processing in MapForce. Instead, use either the first or the second approaches described above. This will also make it easier to migrate your custom configuration to a newer version of MapForce.
To view the configuration (EDI Collection) used by any EDI component:
•Double-click the title bar of the component on the mapping. (Alternatively, right-click the component title bar, and select Properties from the context menu.) The EDI Component Settings dialog box appears.
The EDI Configuration property indicates the path to the configuration (EDI Collection) used by the component. If this path begins with altova://edi_config/, then MapForce will look for the respective configuration in the following directory (the order is important):
1.In your user's profile directory on Windows (C:\users\<name>\Documents\Altova\MapForce2022\MapForceEDI\). If the configuration is found at this path, then it takes precedence over the one from C:\Program Files\... (see the next bullet).
2.In the C:\Program Files\Altova\MapForce2022\MapForceEDI directory.
If the EDI Configuration property indicates a standard Windows path, then the EDI Collection at the respective path is used by the component.
For step-by-step EDI customization examples, see: