Manage multidimensional data in a table

Summary

Overview

Sometimes, it can be useful to present product information in a table to ease the enrichment, improve the readability of the product sheet, and/or because it is required by law (for instance, to present the nutritional values of a product in the food industry).

This is why we've created a new attribute type: the Table attribute.

 

This attribute type is available in the Growth Edition and the Enterprise Edition.

 

 

How to create a Table attribute within Akeneo?

As for the other attribute types, you can create a Table by clicking on Settings > Attributes > Create attribute. Then, click on Table and choose among our templates, or build your own.

These templates are here to guide you. They are only presentation suggestions and can be edited to suit your needs. Choose the Empty table template to create your table from scratch.

 

 

 

Once the template is selected, a pop-in appears, asking you to choose a code, a label, and sometimes a standard, depending on the chosen template.

You'll discover a tab called Table structure, where you can define your columns.

 

 

Some columns have already been created for you, except for the Empty table template. You can add new ones simply by clicking on Add new columns.


For each new column, you must define a code, a label, and the type (select, number, text, or yes/no). The column label can be translated into your catalog locales. You can also change the order of the columns by clicking on the drag-and-drop area.

 

 

Finally, delete any column you don't need by clicking on the bin (appearing when hovering the row).

 

Imagine you sell food products worldwide, and you need to add nutritional value to your products. You know that nutritional table formats will differ between countries or continents and that national laws regulate them. Therefore, you'll need one nutritional table per geographical area: one for your American market, one for your European market, and a last one for the UK market. In this case, we recommend you create 3 nutritional tables with the locale-specific parameter to avoid having empty tables in some locales.

 

 

Let's discover the table attribute's particularities

We've defined several golden rules to structure a table attribute to leverage the power of the PIM and the Akeneo logic.

 

A table must contain at least 2 columns.

Each column is defined by a code, a label, and a type. The label can be translated into your catalog locales.

 

Once the table structure is defined and saved, it cannot be changed afterward.

It means that your columns are frozen once you've clicked on Save. If you need to change the code or column type, delete and re-create it.

 

The first column is always a select or a reference entity.

To structure your table, you can choose among 6 column types:

  • Select
  • Yes/No (boolean)
  • Number
  • Text
  • Reference entity (EE only)
  • Measurement

Nevertheless, the first column type must always be Select or Reference entity.

We will detail how these 6 column types work in the next section.

 

Specificity of each column type

 

Select column type

Same as for the Simple select and Multi-select attribute types, you can define options for your Select column type.


For instance, if your table attribute is used to list the ingredients of a product, each ingredient is an option of your Select column; this way, you can use it in the Product Edit Form. Check out our dedicated article to discover how to use rows on your product page. You create the options once and use them as much as you want in your product tables.

 

The sorting of the options in the manage options screen is based on their creation date to guarantee the best performances of your PIM.

 

 

Directly from the manage options screen, you can add options from a simple or multi-select attribute as an option for your table just by clicking on the Import from existing attribute button.

 

Note that imported options are not synchronized but are a one-shot copy of existing attribute options. Adding or removing options from the selected simple or multi-select attribute won't change the options of the table column.

 

 

If an option already exists on the table option list (same code), all the labels of this option will be replaced by the imported option.

Furthermore, if, while importing options, the table option list exceeds the 20000 options limit threshold, all the remaining options will be ignored and won't be imported.

 

 

Text column type

In the Text columns, you can define the maximum number of characters to control the length of your cells' content.


Of course, you cannot define a negative value, and moreover, you are limited to 100 characters by the system. In other words, this parameter lets you define a maximum number of characters between 1 and 100.

 

Number column type

In the Number column type, you can specify the minimum and maximum values and whether you allow decimal values.

 

Yes/No (boolean) column type

There are no validation parameters in this column type!

 

Reference entity columns type (EE only)

If you already use the reference entity feature to handle your ingredients, materials, or colors as records, you can easily use them in your table attribute. To do so, select the reference entity column type and choose the reference entity to link to get all the existing records as options.

 

It's impossible to create records from a table attribute.

 

 

Measurement column type

In the Measurement column type, you will first be asked to choose the Measurement family your column will inherit from. Then, you will be able to define the Default unit.

 

Note that the Measurement family cannot be changed once the column has been saved, but the Default unit can.

 

 

Scalability of a table attribute

To ensure that the PIM keeps running, we have defined some limits.

  • You can create up to 25 columns in a single table.
  • You can have up to 300 characters in text cells.
  • You can create up to 20000 options within a Select column.
  • You can have up to 100 rows per table attribute in a product sheet.
  • You can create up to 50 table attributes in your PIM.
  • You can have up to 8000 filled cells in a product sheet (including all table attributes)

 

History tab

Just like the other attribute types, there is a History tab.  
In this tab, we track the activity on your attribute, such as:

  • any change in the attribute properties tab
  • or any change in the table structure tab, except if you update the option's labels (within a select column).
  • or any change in the label translations tab

 

Import/export your table data

Import/export the table structure

 

Import/export the columns

You can import/export a table attribute, like any other attribute types, using the attribute import or attribute export profiles. But, the structure of your table (i.e., the columns of your table) must be written in a JSON format and inserted in the dedicated column of your import/export file, called table_configuration.

 

The JSON format is not ideal, but there is no other easy way to proceed today. If you need to make some changes via XLSX or CSV files, we recommend exporting your attributes first, fixing errors and re-importing your file.

 

 

If you prefer to use the API, please note that the table configuration is part of the Attribute endpoint. To learn more about it, you can refer to our API documentation.

 

We've developed dedicated import/export profiles for the options of your select column types 😉.

 

Import/export the options of your “Select” columns

Because it would have been a nightmare to mix up the columns configuration and the options of the select columns in the same file, we've created distinct import and export profiles for the options: the table option import and table option export; in CSV or XLSX format. To know more about imports, please check out the dedicated article, and for exports, everything you need to know is in this article.

 

And if you are comfortable with the API, you can retrieve the table options within the Attribute that exceeds endpoints, as seen in our API documentation.

 

 

When exporting many options in XLSX, please note that the export will fail if the number of characters exceeds 32,767 per cell.

 

 

Import/export the table values of a product

As with other attribute types, you can import and export your products with table attributes. CSV and XLSX formats are structured as tables. Therefore, to import the Akeneo PIM table attribute value, it must be formatted in a single cell of your import using the JSON format. This way, it’ll be imported along with other regular attribute values. It’s faster but more technical.

 

Using “product data table values” import/export jobs

There is another way, more readable and easier to configure using dedicated export and import jobs for the table attribute. It will only handle table attribute values and will be formatted as they are in the product edit form.

These dedicated jobs are:

  • Product table values import and export (CSV and xlsx)
  • Product model table values import and export (CSV and xlsx)

We recommend you create one import profile per table attribute to import/export. Indeed, these jobs enable you to import/export the table values of several products sharing the same table attribute. 

For imports, as each table attribute can have a different structure, we don’t want to import files mixing up tables with different structures. For exports, you need to choose a single attribute for each job.

For example: your composition is managed with a table attribute in your "food" family. You can create a new import profile called food composition that uses the product data table values job to import the composition values of several food products at a time.

 

What about completeness?

You can define that a table is required for the completeness of a channel. Check out our dedicated article for more information.

We consider a table complete once one cell is filled. You can go further by defining the completeness at the column level by making it required for the completeness of the attribute.

 

 

This way, you can easily define three different levels of completeness:

  • the table is complete if every cell is filled (you should have checked the completeness option in every column)
  • the table is complete if every cell of at least one column is filled (you should have checked the completeness option for one or several columns)
  • the table is complete as soon as one cell is filled. In that case, only the completeness option of the first column should be checked. This is the default behavior.

Now that you know all the secrets of the Table attribute type, let's discover its capabilities in the Product Edit Form!