logo
McFadyen Digital is powering the platform revolution one marketplace at a time by offering organizations the strategic and technical capabilities to evolve their digital commerce experience

Marketplace Strategy and Technology

Ecommerce Strategy and Technology

Ongoing Innovation Services

Digital Marketing

User Experience and Interface Design

Contact Us

(703) 226-3800

info@mcfadyen.com

8229 Boone Blvd. Suite 820, Vienna, VA 22182

Top

How To Integrate Multiple Mirakl Instances With A Single Adobe Commerce Multi-Store Instance

Introduction

The Mirakl marketplace platform can be integrated with Adobe (Magento) Commerce platform to create an end-to-end online marketplace. Mirakl provides a Magento connector to speed up the integration process covering all the standard marketplace process flows. This connector allows you to automatically synchronize data between Mirakl and Magento. It also provides an example front-end module demonstrating how you can customize pages to offer Marketplace features powered by Mirakl.

By default, the connector is designed to integrate a single Mirakl instance with a single Magento instance. However, for a multi-country rollout, there can be a situation where each country has its own Mirakl instance but a single Magento instance serves all countries with multiple storefronts. In this scenario, the default connector behavior has to be overridden in order to integrate each Mirakl instance with its specific Magento store instance. We have successfully implemented this for one of our clients on their B2B marketplace. The following changes are made to support this scenario. Refer to the figure 1.1 for more details on how multiple Mirakl instances work with a single Adobe Commerce multi-store instance.

Fig 1.1 Architecture Diagram of Multiple Mirakl Instances with a Single Adobe Commerce Multi-store Instance


Global configuration changes:

Separate URL and Secret Key have to be configured at a store view level for each Mirakl instance. We achieved this by overriding the config helper class to configure the API end points at the store view level. The Console class responsible for handling synchronization scripts was overridden to handle store view specific synchronization scripts based on store id being passed as parameter.

Taxonomy Sync:

Taxonomy synchronization between Magento to Mirakl is achieved using the Mirakl H01 API call. This API is invoked to export Magento categories to Mirakl. But with a multi store implementation, we have to ensure that each Magento storefront exports the taxonomy to its specific Mirakl instance only. We achieved this by overriding the concerned Mirakl connector helper class to map the Mirakl instance to its specific Magento storefront.

Product Import:

Similar to the taxonomy sync, product imports also require mapping from the Mirakl instance to the specific storefront in Magento. The following

The following components were overridden to achieve this:

  • Command classes to import the delta products into respective store view where the store id has been passed as part of cli commands.
  • Interceptor plugins, used to set the store id during product import process, we had to set the root category.

Offer Import

The OF51F API is used to import Mirakl offers into Magento. With a multi store implementation, the offer import synchronisation script has to be overridden to import store specific offers.

OOTB tables were modified to map offers with store id, Custom Cron Jobs were written to cater to store specific offer imports based on the store id which was being passed as a parameter.

Attribute Import:

Mirakl connector uses the PM01 API call to export product attributes from Magento to Mirakl. For the multistore implementation we have overridden the synchronisation scripts to ensure that the attributes of a particular Magento store are exported to the mapped Mirakl instance only.

Attribute Value lists Import:

Mirakl connector uses VL01 API call to export attribute value list from Magento to Mirakl. For the multistore implementation, we have overridden the synchronisation scripts to ensure that the value lists of a particular Magento store are exported to the mapped Mirakl instance only.

Shop Import:

Mirakl shops are imported into Magento using the S20 API. For the multistore implementation, we have overridden S20 synchronisation scripts to synchronize store specific shop information from Mirakl to the mapped store view.

Shipping Information

There are no specific Cron jobs available in the Mirakl connector to import and store shipping information in the Magento database. The values are retrieved using SH01/SH02 at different points in the user journey where shipping charges were to be displayed.

Frontend modules were extended & customized to retrieve the shipping charges at different points like PLP, PDP, cart, checkout, order history and order details pages. Based on store specific request shipping charges were retrieved from the mapped Mirakl instance and displayed.

Order Synchronization

The OR01 API is used for order creation and OR11 API for order status synchronisation between Mirakl and Magento.

The following pages were extended and customized to cater store specific implementation.

  • Order confirmation page
  • Order History Page
  • Order Details Page

Order placement flow has been modified to export the store specific order to the mapped Mirakl instance. Mirakl connector and Magento core classes were customized to cover order creation in respective Mirakl instances. Frontend modules were extended and overridden to address store specific order status display in order history and order details pages.

Quote Creation & Synchronization

Mirakl connector does not implement the B2B quotation scenarios. We extended the connector functionality to introduce new features for creation, update and synchronisation of store specific quotes from Magento to mapped Mirakl instance & vice versa.

Seven API calls were implemented, from Q01 to Q07, to cover the complete quote functionality of the B2B marketplace.

Price, Currency & Locale Configurations

Magento provides store specific locale and currency configurations. Since we had multiple Mirakl instances, each one had its own specific locale, currency & prices.

Connector helper config classes were overridden to set up the store specific sync.

Admin grid changes

The admin grid related Cron jobs were extended & customized to support store specific synchronisation details. It works fine for the default store, but with additional stores, this section had to be extended to display the store specific synchronisation updates.

Frontend Module

Frontend components related to Breadcrumbs, PLP’s, PDPs, mini cart, cart, checkout, order history, order details, quote creation & quote details pages were customized to handle the multi store functionality.


Wrap Up
The key to a successful implementation strategy is to be able to map Magento storefronts to specific Mirakl instances. We used the store id as a unique way to identify the data related to a particular store. All connector code related to data synchronization between Magento and Mirakl got impacted in this multi store scenario. Except for Quotation flow, we did not have to write any new classes, extending and customizing helped us achieve our goal. Our implementation covered integration of two Mirakl instance with one Magento instance. But the same design can be extended to integrate more Mirakl instances. While we did not see any performance issues due to this, it does remain to be explored if performance gets impacted as we increase the number of unique storefronts, each with its own Mirakl instance.

About the Author

Siddhartha Shankar is a Technical Architect at McFadyen Digital. He loves all things marketplace and technology. An avid traveler and lover of music, he stays with his wife and six-year-old daughter in Bengaluru. Sid has been part of some big-ticket eCommerce/ marketplace implementation projects during his long stint with McFadyen Digital.