To set up master data import, the importer must be activated and configured. This article explains how to do it.
The Import Module
The module can be accessed via the administration interface. The menu item is called: Importer. There are several setting options in this area. Field mapping is essential at first.
The field mapping was created using the JSON language.
Import Code, Field Mapping
{
„excel“: {
„indexRow“: 1
},
„uniqueKey“: “IRC“,
„product_country“: “de“,
„1“: {
„source“: “irc“,
„target“: “masterdata.IRC“,
„transform“: false,
„error“: “log“
},
„2“: {
„source“: “title“,
„target“: “product.title“,
„transform“: false,
„error“: “log“
}
}
JSON Formatter and Validator
This application can validate imported JSON. This means the validator can detect, for example, if a bracket is missing or if there are too many. Simply copy the above code into the validator and start.
Definition of the Title Row
indexRow here refers to row 1 as the title row.
„excel“: {
„indexRow“: 1
},
Definition of the primary key and the destination country
The primary key or key, here uniqueKey, is the ID, e.g., an article number, PZN, GTIN, etc. In the brackets „“IRC““ is the code of this master data field of the PIM system. Care must be taken to ensure that this code is identical.
product_country defines the target country. Here Germany = de.
„uniqueKey“: “IRC“,
„product_country“: “de“,
Mapping of master data fields
Each import field routine begins with an arbitrary sequence number, here 1, 2, 3 etc.
Source refers to the title of the source, i.e., the import file. This is the column header in the Excel file.
target = masterdata.IRC defines a Master Data field. .IRC in turn the code of the field in question.
transform = false means that the data will not be manipulated before import.
error = log means that errors are shown in the log file.
product.title defines a different field. Here is a field from the product view, the title.
„1“: {
„source“: “irc“,
„target“: “masterdata.IRC“,
„transform“: false,
„error“: “log“
},
„2“: {
„source“: “title“,
„target“: “product.title“,
„transform“: false,
„error“: “log“
}
Provided the fields are not calculated or manipulated, the importer can thus also be set up from scratch by non-technical users.
The importer's basic settings
Name = Any importer name
Input Driver = Upload of the file or drag from a server, e.g., sFTP
File Excel or CSV
Status = active or inactive
Schedule = if the importer is to run nightly, for example, the file must be stored on a server and simply replaced.
Our conclusion
Currently, a simple graphical user interface is missing. Nevertheless, administration is easily possible with this guide.
Important
The validator must always be used, as it's easy to copy and paste one bracket too many or too few, which immediately invalidates the importer's full functionality.