How to configure the Akeneo Advanced Imports Connector

Nicolas Souffleur
Mar 12 · 5 min read

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:

  • Stop modifying your files manually. Take control of your imports from the interface.
  • 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:

  • The Advanced Imports Connector is compatible with Community Edition, Enterprise Edition, & Cloud (PaaS/Flexibility) Edition of Akeneo.
  • 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 1 — Unzip the respective extension zip, then merge “src” and “bin” folders into your Akeneo project root directory.

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:

Step 1 — Create your first import profile:

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:

Configuring these mappings can be a long and repetitive work for your team if your products have many attributes and values. To simplify this management and improve your productivity, the extension offers you two ways to add new configurations :

  • 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

3 import profiles have been created during the installation to allow you to import each type of configuration :

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

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

  • For all these CSV files, the code values have to be unique for the specific mapping. It can be a number or a concatenation of the other information. The job information is the unique code added during the import profile creation step.
  • 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:

You can add, edit and delete configurations directly on the interface. For that, 3 new items have been added in the “Settings” menu :

Conclusion:

Voila! Your imports are now configured to integrate your files and you saved a lot of time doing manual modifications on your files or in the code.

Support

The 4.x version support will be available soon.

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.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade