Cloud Software Group, Inc. EBX®
Data Exchange Add-on Documentation > User Guide > Advanced Data Exchange Options > Advanced Mapping Topics
Navigation modeData Exchange Add-on Documentation > User Guide > Advanced Data Exchange Options > Advanced Mapping Topics

Custom data mapping

User-defined XML mapping for export

Certain use cases require you to create custom data mappings. The options may vary, but the process is similar for mapping between different source and target formats. This section provides an example using XML and you can apply the same principals to create custom mappings for other formats.

The following section describes a user-defined data mapping.

XML export

To export an XML file with a data structure that is not compliant with the Default XML type, you can manually configure a user-defined data mapping.

To facilitate the configuration, the add-on can automatically analyze your XML file to generate the XML configuration as illustrated below. In most cases the XML file you want to get already exists, and you can reuse it as a template to automatically feed the configuration.

/custom_xml_mapping_1.png

First, a new XML type application has been created manually. In the following image, this is the Sales application. Since the type is XML (not Default XML), the add-on's Generate models service is available and allows you to get the XML configuration automatically.

The add-on allows you to enter the XML file that will be used to create the XML configuration.

/custom_xml_mapping_2.png

Then you select a node path in the XML file from which the XML configuration must be applied.

/custom_xml_mapping_3.png

The result of the configuration is displayed below. The Sales XML type application is now declared with the fields corresponding to the XML tags existing in the file.

/custom_xml_mapping_4.png

The configuration of a field with its XML path can be adapted manually as illustrated below. You can change the name, the path, etc. Conversely, in the case of a configuration based on the Default XML, the names and paths cannot be modified and are under add-on control.

/custom_xml_mapping_5.png

To make the export process available from the EBX type application (Sales dataspace) to the Sales application, the Interface between both must be declared as follows:

/custom_xml_mapping_6.png

Now, the export UI displays the Sales target application as an option:

/custom_xml_mapping_7.png

The options are already described in the previous section. However, when executing the export process based on the above configuration an error is raised.

Indeed, even though the XML field configuration is done, the Table mapping and Field mapping are not yet configured. The table mapping is declared as follows by creating a new record in the Table mapping table:

/custom_xml_mapping_8.png

A new execution of the export process entails a useless result because the fields are not exported until the Field mapping is configured:

/10000000000001C4000001547D5DA0B8.png

For every field, the mapping from the source to the target is declared as follows:

/custom_xml_mapping_9.png

Now, the export process integrates the fields that have been configured (in this example only the name is declared in the Field mapping table).

/10000000000001CB0000017353F3BC86.png

To change the path of a field, a direct modification in the path configuration can be done as illustrated below. The initial path /Client has been changed into /clientName.

/custom_xml_mapping_10.png

Now, an export process execution generates the following result (new path clientName):

/1000000000000214000001AA667E0863.png

High-level overview of XML import with custom mapping

To import an XML file with a data structure that is not compliant with the Default XML configuration, you can manually configure a user-defined data mapping using the same process described in the previous XML export section. You can use the XML import file as a template to automatically generate the XML configuration.

Then you create an Interface from the source XML type application to the target EBX type application Sales.

/custom_xml_import_1.png

The Table mapping and Field mapping must also be configured:

/custom_xml_import_2.png

Special notation:

/100002010000000E0000000E86672C34.png

The under-terminal node is child of complex and multiple occurrences node. It will be ONLY imported/ exported if mapping of its parent node is declared in the configuration