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 11 .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 some import features, therefore the total of .csv files is 6 instead of 11.

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 or semicolons, other separators will cause the import to fail.

More in-depth knowledge can be found in technical documentation >>

https://docs.ergonode.com/v/ergonode-transfer/

We have divided the files into related segments for ease of reading:

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, and 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 the width of 1 and height of 1), system name of an attribute if the element specified is an attribute, designation of the 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.

Section Template Data

section_templates.csv - this file only has one column which is _code. Code is the name (code) of a given template. The max length is 128 chars.

section_templates_elements.csv - _code is a place to enter the template name (code) of an existing template or one specify in section_templates.csv, _type (available values: attribute, ui) is one where you need to specify the type of element, _x (value numeric 0-3) & _y (value is any positive number) are positioned on x,y, axis so it means where this element will show up, _width (value 1-4) and _height (value 1-10) is its size, attribute (fill it only if _type column is set as an attribute) tells the system what attributes needs to be in this section (use attribute name (code), require (fill it only if _type column is set as an attribute) - tell the system is this section is required or not to fill in (values can be true or false), label - is a label (fill it only if _type column is set as ui and max length of 255 char).

Attribute Data attributes.csv - this file contains a list of attributes you wish to import. They are listed under the first column, _code (this column must be first and named in this way), using the unique system name of each attribute. The following column, _type (its position and name are also required), states the type of the attribute (one of the currently available in Ergonode). The next column 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 (depreciated, _placeholder will be removed from file in future releases). 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, and rich_edit, which uses the TRUE or FALSE values to define if the TEXTAREA attribute is to use rich text editing, and the 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, _code, contains the system name of any given option, the following column, _language, denotes which language uses the specified option, and 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, and the _name column indicates the display name of a category in each language, which is specified in the last column - _language.

category_trees.csv - this file contains the category trees you wish to upload. To create the import file you will need the following data structure - _code column using the unique system name of each category tree, you can also add the _name column indicates the display name of the category tree; if the _name column is displaying _language column is required to specify the language of the given category tree.

category_trees_elements.csv - the category tree configuration contains parent-child relations between categories. The structure is simple - _code column to specify the system name of the category tree, _parent column to indicate the root category, _category one of the existing categories which is the child category

Product Data products.csv - this is the file that lists the products you wish to upload. Please note, that not all columns are required, so they may or may not be included in the CSV file. Required columns are: _sku, _type, _language, _template, nonrequired ones that can be used are: _children, _bindings, _categories, attribute_code(!)

_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 in which the product will be listed in the system.

The only other column required for the import to work (in the case of simple products) is _template. 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.

_children is an attribute used for variable products and lists all simple products comprising the variable products.

_bindings applied for variable product type only. Only existing attribute codes can be used here.

_categories specify the categories to which each product will belong. 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. 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.

attribute_code(!) This one is a specific one, it can be one or they may be many of them, and instead of "attribute_code(!)" it will be named exactly like the attribute name (code) of attributes created in the system. So if you have an attribute named "s" that you would like to import you may do it like that.

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 – which contains the alternate text for translations associated with 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 are only available in the Cloud version of Ergonode. The Open Source version lacks this feature.

Last updated