Select Page

Setting up the Akeneo Connector in Magento 2: Part 1 – Initial Configuration

January 22, 2021

The Akeneo company has built and currently supports 2 Akeneo Connectors for Magento 2. One connector is for Akeneo Community Edition and the other is for Akeneo Enterprise Edition. Both connectors are maintained by the Akeneo company to make sure they remain up to date with any Akeneo and/or Magento 2 updates. The connector is easy to set up and to use. Although Akeneo does have good instructions for setting up the connector, there are some issues that may arise during the setup process that the Akeneo documentation does not cover.

INSTALLATION

The Akeneo installation documentation is a very good resource to use during the installation process. Before you start the installation, you must meet a few requirements. First, you need to have SSH access to your Magento 2 server. Second, Composer must be installed on that server. Once those two criteria are met, you can follow the steps in the above link.

CONFIGURATION

After the module is installed on Magento 2 you will need to open the pathway between Akeneo and Magento. The configuration for the module can be found in the Magento Admin Panel at Stores > Settings > Configuration > Catalog > Akeneo Connector. Within the configuration, you will want to open the Akeneo API Configuration section.

The first five fields of the configuration require values generated by your Akeneo instance. The first field Akeneo base URL is simply the URL of your Akeneo instance. The next four fields must be generated by creating a Connection in Akeneo. To do this navigate to System > Connections > Create in your Akeneo installation. Simply choose a relevant “code” and “label” value to identify the connection and choose the option Data Destination for the Flow Type field (this will add extra data validation when Magento 2 retrieves your Akeneo data). Also, be sure to copy the Password value right away. After you leave the page you will no longer be able to view the password for security reasons. You can also configure the permissions of the Connection. It is important to make sure the Role selected has Web API permissions enabled.

Use the generated Username, Password, Client ID, and Secret to fill out the Magento fields Akeneo Username, Akeneo Password, Akeneo API Client ID, and Akeneo API Client Secret, respectively. Simply copy and paste the values from Akeneo to Magento. You should now be able to hit the Test button and receive the message, “The connection is working fine.”

If you do not get the “The connection is working fine” message you may need to make one of the following changes:

  • If you experience a Gateway Timeout you may need to adjust the firewall on the Akeneo server. Magento needs access to the Akeneo API to pull the data. If it cannot reach the API, the connection will timeout without throwing an obvious error.
  • The connector requires that you have a valid SSL Certificate on your Akeneo instance. If you do not have an SSL Certificate setup, an easy (and free) tool you can use is CertBot. Instructions for installing Certbot can be found here.

After getting the test connection to work, three fields remain that require setup: Pagination Size, Admin Website Channel, and Website Mapping.

Pagination Size does not need to be changed. It controls the batch size for the API calls made to retrieve data. I recommend leaving this at 100. It will work well even for very large datasets.

Admin Website Channel is the channel in your Akeneo instance that contains the data to be used in Magento. After successfully testing the connection this drop down should be automatically populated. Simply select the correct channel from the drop down.

Website Mapping controls which website within Magento the products are being assigned. Again, these drop downs will be automatically populated. Simply select the correct website and channel. If you have multiple websites and/or channels, use the Add button to add a mapping for each.

Once the aforementioned configurations are set, you can run the jobs from the Magento 2 user interface. The jobs are located at System > Akeneo Connector > Import in the Magento Admin Panel. From there you will see buttons for the following jobs: Category, Family, Attribute, Option, and Product.

Alternatively, you can run the job from the command line. It will look something like:

/usr/bin/php /home/magento/magento/bin/magento akeneo_connector:import --code=product

Running the jobs in their current state may not be the exact behavior you want. The connector offers the ability to filter and map your data to make sure everything is placed correctly in Magento. For more information about running properly mapped and filtered data migrations stay tuned for part two of this article.

You May Also Like…