How to configure the Akeneo Advanced Imports Connector

This Akeneo extension can be considered as a toolbox that will bring you all the features you need to import products from files and increase your productivity. With the help of the Advanced Imports Connector module, you can configure your job profiles to adapt the structure or values of your files.

This extension can be really useful when you need to make the first initialization of your product catalog without modifying your files manually. It can be also used to transfer product data coming from other systems using files & will save you a load of time of development & manual modifications.

Features:

  • Import your products & product models in .xlsx or .csv files.
  • Add mappings with Akeneo formatted values & columns of your files.
  • Create automatically attribute options while importing your products.
  • Add new columns with default values (ex: unit columns, categories).
  • Replace values in your files by Akeneo values/attribute codes.
  • Fasten the configuration by importing your mappings in CSV files.
  • Add new categories to your products without replacing the existing ones.

Requirements:

  • This module works with Akeneo 3.2.x. Download Akeneo from here
  • This module uses the Custom Entity Bundle made by Akeneo: here
  • It uses PhpSpreadsheet bundle: here

The extension is available to download here.

Installation:

Step 2 — Add these two lines in the registerProjectBundles() function in app/AppKernel.php to declare the module:

Step 3 — Add the following code snippet in the app/config/routing.yml to declare the bundle routes:

Step 4 — To simplify the next steps for you, I have added an installation script that will do everything for you. The only thing you need to do is to launch the following command at the root of the project:

bash bin/advanced_imports_installation.sh

Create & configure an import profile using the Advanced Imports Connector:

Add a unique code that you may keep in mind, we will use it in a next step.

Depending on your file extension and the type of product you want to import, you will be able to choose between 4 import types :

Step 2 — Configure:

Enter a valid file path. It will be left untouched as the mappings will be applied on a temporary file that will be removed.

As this extension improves the default Akeneo imports, the default configurations are present and useable. But for now, let’s focus on the new tools that bring you these advanced import jobs.

By clicking on the “Advanced Imports” tab you will have access to all the new configurations :

Apply value mappings: This will replace the values from the file by the associated data during the import

Apply column mappings & default value columns: This will replace the columns from the file by the associated data during the import

Enable the attribute options auto creation: This will create new attribute options by slugifying the value from the file.

Select the attributes to create options for: Select for which simple or multiple select attributes you want to create options

Enable the categories merge: This will add categories to the product instead of replacing them.

Select the default locale for the attribute option automatic creation: This option is used to create the label of the option created.

Delimiter for multi-value fields: Character used in your files to delimit values for multi-select attributes or categories.

Configuring the mappings:

  • By importing them with CSV files, which will allow you to integrate many mappings at the same time or to duplicate easily configurations between import profiles.
  • Directly from the interface, which will allow you to quickly modify/add values.

1- Importing the configurations with CSV files

  • [AI] Column mappings import
  • [AI] Value mappings import
  • [AI] Default values import

These 3 import profiles need specific import files which are described below:

Common notes:

  • The first line contains the required fields to add in your configuration import file and the other lines are examples.

Column mappings :

code;attribute;job;title
mapping1;sku;csv_advanced_product_import;identifier
  • attribute: the Akeneo formatted column title
  • title: the current column title you want to replace

Value mappings :

code;attribute;job;optionCode;fileValue
mapping1;sku;csv_advanced_product_import;identifier
  • attribute: the Akeneoattribute code
  • optionCode: the Akeneoattribute option code
  • fileValue: the current file value you want to replace

Default values :

code;fileColumn;job;fileValue
mapping1;default_categories;csv_advanced_product_import; erpCategoryTree
mapping2;weight-unit;csv_advanced_product_import
  • fileColumn: the Akeneo formatted column title
  • fileValue: the default value to add

2- Edit/create new entries from the UI:

Conclusion:

Support

If you have a question/query, please send an email at contact@nicolas-souffleur.com. I will do my best to answer as quickly as it is possible. I’m always happy to help you.