With a market cap of +$10bn, CP Axtra Public Company Limited, is the number one wholesale operator in Thailand with their chain of Makro centers. The company operates over 155 outlets in 5 countries. CP Axtra chose Medusa for their online platform, Makro PRO, which processes hundreds of individual and business orders from stores across Thailand every hour.
With Medusa’s building blocks, the Makro team simplified complexity and automated order management for Makro PRO, and they are now expanding the use of Medusa as their omnichannel order orchestration solution across all digital sales.
Complexity at scale
Makro PRO offers thousands of products across various categories such as food, home appliances, and electronics. Customers can access the store through Makro PRO mobile app and website. Orders are dispatched from over 100 stores across Thailand every hour. This expedited service requires efficient routing of fulfillments to nearby stores and third-party distributors.
In addition to the complex fulfillment handling, Makro PRO needed a commerce backend that would support:
- High order volume: The solution needs to handle more than 5,000 orders daily, some of them including hundreds of line items, without compromising performance.
- Custom-built stack: The solution must seamlessly integrate with their custom-built services, enabling them to retain control over essential elements like checkout, payment, and product services.
- Scalable: The solution needs to handle orders from a product assortment curated across hundreds of Makro shops in Thailand along with its 3rd party distributor network.
From monolith to modular
Makro PRO initially used a leading proprietary solution as their commerce backend but found their APIs increasingly difficult to integrate with as they rolled out makro.pro across more stores in their network. For example, Makro reached rate limits and had to compromise on features due to the rigidity of its API.
The limitations led the team to search for a more adaptable solution. Building from scratch would be too time-consuming, so the team looked for a solution that would be great to work with for the team’s internal users but also be flexible enough to build great end-customer experiences around. The team evaluated various SaaS and open-source alternatives but ultimately chose to embrace Medusa, which would allow them to maintain data and stack ownership while providing core commerce primitives to build great customer experiences around.
“Medusa offered the flexibility we needed to build a scalable setup. We could use our own custom checkout, fulfillment, and payment services while leveraging Medusa’s event-driven architecture for interprocess communication.Pradeep Kumar
//
Tech Lead on the project
Medusa for Omnichannel Order Orchestration
Medusa is utilized as a central hub for order orchestration. Once orders pass through from one of Makro's storefronts, they are registered within Medusa and broken down by fulfillment type:
- 1st party fulfillment (1P) orders are sent to a custom-built system that coordinates the fulfillment across Makro stores.
- 3rd party fulfillment (3P) orders are sent to Mirakl, a platform coordinating Makro's network of third-party sellers.
The Makro team utilized Medusa's customizable and event-driven architecture to manage the complexity of multiple fulfillment types per order. The team created a plugin using webhooks that allows Medusa to update the order statuses (in process, fulfilled, returned etc.) based on events triggered within the 1P and 3P systems. This enables Medusa to act as a unified order overview, which customer support uses as a reference point to check order statuses in real-time.
Similar custom integrations were also implemented for refund orchestration via their custom payment service.
“The design of the core modules [in Medusa] is consistent, it is clear how to use the database structures, and the domain modelling is done beautifully. It was easy to work with the Medusa framework.Thanakrit Gwan Juthamongkhon
//
Module lead on the project
In the end, the Makro team successfully implemented Medusa within a few months to cover orders across Thailand. Currently, the solution processes over 5,000 orders daily.
The team now plans to extend the setup further in 2023 to let Medusa handle orders that go through sales reps, who currently create orders in a custom app for their B2B customers.