In Version 5.5.0.0 the preprocessor has been redesigned. Company- and contact person data are in one single file. Furthermore it is possible to import customAttributes.
Sample data:
Sample configuration:
<preProcessorSettings encoding="UTF-8" key="default" delimiter=";" sourceDirectory="ConfigurationItemImport\preProcessDir" fileMask="*.csv" templateFilePath="ConfigurationItemImport\format.xml" useHeaders="true" quote="QuotationMark" />
encoding: The Encoding of the csv file. E.g. “Unicode” or “UTF-8” possible. Import Encpdings
delimiter: Das separator of the values.
sourceDirectory: The folder, from which the files are imported.
fileMask: A filter, to allow just “*.csv” files.
templateFilePath: A Template-XML-File.
useHeaders: Defines if column headers are used (in the template file) othewise the culumns are named as following: column1, column2, columnN, …
quote: (5.5.17.0+)Defines the signs, that surround the value of a field in CSV file (before and after delimeter) Possible values:
| quote | Sample | Default value |
|---|---|---|
| NoQuotationMark | foo;bar;foo;bar oder foo;“ba”r;f“o”o;bar | |
| QuotationMark | “foo”;“bar”;“foo”;“bar” | x |
| SingleQuotationMark | 'foo';'bar';'foo';'bar' |
All field values can be modified before saving the data on importing an xml-file.
The mapping can be configured via database table “tbImportMapping”. The table has the following structure:
| Fieldname | Function |
|---|---|
| importName | The name of the import. e.g. “CustomerImport” or “ConfigurationItemImport” |
| fieldName | The name of the field. (see below) |
| currentValue | The fields current value. |
| nextValue | The fields new value. |
The “fieldName” is structured like the xml document.
Exception: The XML-Node “contactperson” is named “CustomerContactPerson”.
Examples:
CustomerContactPerson.attributes.test CustomerContactPerson.name status