Magento 2.x: integration guide
About this guide
This guide describes ChannelEngine's Magento 2 plugin, how to install it, how to configure it, and more.
Table of contents
ChannelEngine's Magento 2 plugin relies fully on Magento 2's API, which means that ChannelEngine does not have to apply frequent updates to the plugin because it uses Magento's internal code.
The downside is that some data can only be retrieved by making separate API calls per product, like stock, as no bulk endpoint is available. If you are working with a lot of products, this can increase the load on your system.
|Product data||External fulfillment orders|
|Orders||Returns (only supported by Magento's Commerce Cloud/Enterprise Edition)|
Below you can find the requirements to install ChannelEngine's Magento 2 plugin:
- Magento 2.0 or higher (2.3 or higher is recommended)
- Access to the Magento admin
Download the plugin
You can find the Magento plugin in its various forms on ChannelEngine: webshop integrations. Select the package or method you want to use and download it.
For a guide on how to install the Magento plugin as a zip file, check out How to Install Modules Manually in Magento 2.
Connect the plugin to ChannelEngine
ChannelEngine's Magento plugin uses the new Magento 2 integrations feature. This makes integrating with ChannelEngine both easy and fast.
- Install the plugin through composer or the web installer.
- Go to System, Integrations, navigate to the ChannelEngine integration and click Activate.
- In the ChannelEngine dialog box you now see the different endpoints that we request to use. Click Allow.
- If you are not yet logged into ChannelEngine, a popup redirects you to the ChannelEngine login page.
- If you have multiple ChannelEngine environments, you can now select the ChannelEngine environment to integrate with Magento 2.
- If you have multiple store views, you can now select the store view that you want to integrate with.
Set up and activate the plugin
Once you have connected Magento 2 with ChannelEngine, a Magento merchant plugin is created on ChannelEngine. If this is not yet visible, contact your Integration Coordinator or Customer Success Manager to verify the installation.
- On the dashboard, on the left-hand side, click the Magento 2 plugin.
- The required settings should already be entered under Setup by Magento 2's integration flow, but do double-check if the correct Store URL and Store view code are filled in. If they are empty, ChannelEngine's plugin cannot connect to your Magento shop and import or export data.
The plugin settings:
- Store URL - the URL where the main store for Magento is located. E.g.: https://www.myshop.com/.
- Store view code - the store view code of the store view you wish to connect with. E.g.: default.
- OAuth consumer key - the key necessary for communication with the Magento 2 API.
- OAuth consumer secret - the secret necessary for communication with the Magento 2 API.
- Access token - the access token necessary for communication with the Magento 2 API.
- Access token secret - the token secret necessary for communication with the Magento 2 API.
- URL suffix - the URL suffix for product pages on Magento 2. If you use the default URL rewrite in Magento, this field can remain empty. If pages show .html at the end, it needs to be included.
- Submit order prices excluding VAT - if you have enabled VAT calculation (i.e.: so your webshop's orders are placed without the default VAT), make sure to enable this setting to prevent double VAT calculation on marketplace orders.
- Canceled order line handling - determines how ChannelEngine handles canceled order lines, e.g.: from a cancelation request. The options are: include these order lines in the export to Magento; exclude these order lines in the export to Magento; or automatically cancel unknown orders – and not export them to Magento. The default value is to include these order lines.
- Magento stock endpoint - determines if ChannelEngine should get the stock from Magento and, if so, from which endpoint or attribute. The options are: do not import any stock (so stock must come from an alternative source, like a product feed); import from the Salable quantity attribute (note that enabling this doubles the number of API calls necessary to get the stock); or import from the normal Stock item. The default value is Stock item.
There are also hidden settings, visible only to ChannelEngine's employees. If any of these need to be changed, please contact ChannelEngine's Support, your Customer Success Manager, or Integration Coordinator.
- API async batch size - the number of simultaneous API calls ChannelEngine makes to your Magento server. Most servers are configured to handle a limited number of calls and block the rest. The lower this value of this field, the longer the import of product data takes.
- Attribute code for EAN field - the name of the attribute you use on Magento where the EAN/GTIN can be found. This is usually the default attribute EAN_code but there are custom alternatives. Changing this setting to an invalid value can result in products unavailable on marketplaces, hence it is hidden.
- Inventory management stock ID - if you are using Magento's own inventory management system and have multiple stock locations set up, use this setting to enter the correct warehouse ID. The default value is 1.
- On the Activation tab, switch the Activate synchronization for Magento toggle to activate the Magento 2 plugin.
- Once the plugin is activated, data import and export tasks are scheduled and executed automatically. You can see the latest performed and scheduled tasks under the Dashboard tab of the plugin's settings.
- If you run into issues during any of these steps, contact ChannelEngine's Support team or check out the Magento 2: common integration issues article.