Mapping

Mapping Instructions

Data in CSV or XLSX format is validated, after which you are redirected to the second page of the import mapping.

For data supplied as XML or JSON, an additional analysis and conversion to an internal CSV-format is needed. In the first step we analyze the file structure, so we know how this file should be converted to CSV. The hierarchy is determined and also the elements that will later be used as column headers.

The XML and JSON files often contain a hierarchy, for example an invoice with invoice lines. For DirectLink it is not always easy to determine what the Object element (invoice) is and the Line element (invoice line). Also, multiple objects will often be supplied as an array in the import file.

To simplify the analysis and make it less prone to errors, as a user you must specify the name of the Object and the Line element in the first page of the import mapping.
The image below is an example of an invoice import file. The name of the array is <invoices>, the object is <invoice> and the line is <invoiceLines>. In order to access the object element, it is necessary to place the array name, separated by a period, before the object name. In this case, the object name becomes invoices.invoice. In the object, the lines can be recognized by the repeating line name invoiceLines.

 

In some import files, the object name is not specified and the file is constructed from
an array of unnamed objects. An example of such a file is shown in the figure
below. In this case, the object name should be left empty and the line name is
Element.Lines.

Notes

It is important to realize that both XML and JSON are case sensitive, so
‘invoicelines’ is not the same as ‘invoiceLines’.

In the import mapping, only the first object is analyzed and used to convert the other
objects. Therefore, it is important that the first object in the definition
file contains all of the required elements that must be mapped.

If you need support mapping your JSON or XML data. Contact our support via support@directlink.nu.

× Heb je een vraag?