CSV file import detailed overview
Now that you have an import profile set up, we can discuss the specifics of the actual files containing the data you wish to import. There is a total of 8 .csv files that can be used to import data to Ergonode (and that are created with each export as well). These files, in turn, need to be compressed into a .zip archive in order to be acceptable for import into Ergonode.
The above statement is true for the Cloud version of Ergonode. The Open Source version does not support multimedia folders and uploading multimedia this way, therefore the total of .csv files is 6 instead of 8. Both files from the Multimedia Data segment will not be present.
It was found, that the default compression tool on MacOS creates a hidden folder within the compressed archive that causes the import to fail. Keep this in mind when creating a .zip archive for the purposes of importing data.
It is best to use CSV UTF-8 encoding for your import as this properly encodes characters outside the English alphabet. Please also be advised, that the import documents must be comma separated, other separators, such as semicolons will cause the import to fail.
We have broken the files into related segments for ease of reading and they are as follows:
Template Data
This segment contains two files that together contain all data related to product templates: • templates.csv - templates.csv - this is a very straightforward file. It contains two columns: _name and _language. These columns need to have headers with these names, and they contain the names of the templates you wish to use and the languages they are associated with.
templates_elements.csv - this file contains the names of templates you wish to upload along with some additional elements. Keep in mind, that if you have template names and languages specified in the templates.csv file, they will need to also be featured in this file. The additional elements contained in this file are - types of elements (either attribute in the case of attributes or ui in case of widgets), the language the template corresponds to, the positioning of each element on an x,y axis (with the top row corresponding to y=0 and the left side corresponding to x=0 and x increasing to the right and y increasing towards the bottom.), the size of the element (with a single cell on the template designer corresponding to width of 1 and height of 1), system name of an attribute, if the element specified is an attribute, designation of requirement for completeness in case of an attribute (TRUE meaning it is required, FALSE stating it is not) and label, which is the display name of each element for a specified language. Keep in mind, that any attributes specified here as elements of your templates must also feature in the attributes.csv file or be present in the system for the import to succeed.
Attribute Data attributes.csv - this file contains a list of attributes you wish to import. They are listed under the first column, labelled _code (this column must be first and named in this way), using the unique system name of each attribute. The following column, _type (it's position and name are also required), states the type of the attribute (one of the 12 currently available in Ergonode). The next column on specifies the language of the attribute - you need to have at least one language specified for the import to work. If you only import attributes in one language, you can use translations from within Ergonode to create versions for other languages you require. The next column is _name, which denotes the display name for each language used for an attribute, but is not required for a successful import, as is the case with the following two - _hint and _placeholder. These two correspond to the similarly named tabs in Ergonode while editing an attribute. The next column, _scope, is also required, as it defines whether the attribute is local or global in scope. Additional columns are format, which is used to specify the format used by the DATE attribute type, currency, which is used to specify the currency used by the PRICE attribute, rich_edit, which uses the TRUE or FALSE values to define if the TEXTAREA attribute is to use rich text editing, and unit, which is used to define the type of units utilized by the UNIT attributes.
options.csv - all SELECT or MULTI SELECT attributes you wish to upload must have their options defined here. The format is quite simple - the first column, labelled _code, contains the system name of any given option, the following column, labelled _language, denotes which language uses the specified option, the _label column denotes the display name of each option for the specified language, and the _attribute column links each option to a specific attribute, which must be denoted here using its system name.
Category Data categories.csv - lists all categories you wish to upload to Ergonode. The structure is simple - the _code column denotes the system name of each category used, the _name column indicates the display name of a category in each language, which is specified in the last column - _language.
Product Data products.csv - this is the file that lists products you wish to upload. Firstly, please note, that the following columns, their labels, and order must be input EXACTLY as listed here for the import to work - _sku, _type, _language, _children, _categories. The first three of these must be filled in for the import to work. _sku is straightforward, this will be the unique identifier for your simple products, which is one of three product types listed in the next column, _type. The third column specifies the language for which the product will be listed in the system. _children is an attribute used for variable products and lists all simple products comprising the variable products. _categories specifies the categories to which each product will belong to. While this column is necessary for the import to work, it does not have to be filled in. However, if you do input values here, make sure they correspond either to the categories you specified in the categories.csv file, or are already present in the system. The only other column required for the import to work (in case of simple products) is _template. Its position is not relevant for the upload to work, but all products you upload must have a template specified, the value input here must be identical to a template's system name as defined by you either in Ergonode, or in the templates.csv file that you wish to upload. Any other columns you wish to add can be anything you want, but keep in mind, that these will be attributes connected to products and as such they already need to have a corresponding entry, either in the system itself, or the attributes.csv file and if they are SELECT or MULTI SELECT type attributes, their options must be defined in the options.csv file as well.
Bear in mind, that the requirements listed above are for simple products only. Products with variants and grouping products have additional requirements that will be discussed further in this document.
Multimedia Data multimedia_folder.csv – this file allows you to create folders that will hold any multimedia you upload. This has one column required – _name, which specifies the name of the folder or folders.
multimedia.csv – this is the file where you specify the URLs of multimedia that will be uploaded to folders within Ergonode that you create with the previous file (or manually, as all elements created via imports can also be created that way). This file has four required columns, which are: _language, which specifies the language the media will be assigned to, _alt – this contains the alternate text for translations associated to the media, _url, where the URLs with your media need to be provided, and _name, which will give each piece of media a unique name in the system.
Keep in mind, that multimedia folders and uploading multimedia this way is only available in the Cloud version of Ergonode. The Open Source version lacks this feature.
Please note, that if you have any custom units created in your Ergonode environment, they will not be imported in any way, attributes that use them will not be imported successfully and the entire import may fail. These custom units must be manually created in any environment you will be importing your data into before you start the import.
Copy link