Composable commerce development
Scaling B2B & B2C
Operations for
a Large Canadian Retailer
SanMar needed its B2B and B2C websites to work with the ERP it had used for years, not a replacement ERP. We migrated the unfinished Magento 1 B2C store to Magento 2, documented the existing B2B website and built a custom API connector that converts the ERP’s legacy data format for both stores.
If your store, B2B portal and ERP show different stock or prices, and orders are re-keyed by hand, the fix is not always a new ERP or a new storefront. It starts with finding where the data diverges.
About the project
The goal was real-time exchange of product catalog, order fulfillment and availability data between SanMar’s internal ERP and both websites.
A further goal was to keep the B2B website performing under projected order volumes once the ERP was connected.
The starting point was uneven. Another team had partially developed the B2C website on Magento 1 and stopped before it could work as intended with the ERP. The existing B2B website had no ERP integration and lacked documentation covering its functionality and third-party connections. The ERP’s APIs and data format were also obstacles.
Dinarys addressed three related workstreams:
- B2C migration: move the unfinished Magento 1 implementation to Magento 2 (Magento 1 to Magento 2 migration).
- B2B discovery and documentation: record existing behavior, technical capabilities and integration changes.
- Custom ERP connectivity: translate the ERP’s legacy format into structured formats required by the commerce platforms.
SanMar’s separate B2B2C distributor site builder is a different project.
Have similar business problems? We have an action plan.
Contact our Delivery Director for a free consultation to explore all possible solutions.
Have similar business problems? We have an action plan.
Contact our Delivery Director for a free consultation to explore all possible solutions.
Konstantyn
Delivery Director
01
Cost estimation & breakdown
Know what to expect up front
02
Team setup recommendations
Involve only the experts your project truly needs
03
Technologies & integrations
Identify what you need and where you can save
About the client
SanMar is a large Canadian clothing retailer with a well-established retail network and a growing B2B sales channel. It wanted to grow online distribution while keeping the ERP it had used for years.
Main business problems
The existing setup made employees check and update inventory manually. Orders were not immediately reflected in the ERP, and the lack of real-time synchronization led to incorrect prices on the website. Demand forecasting was also unreliable, resulting in overstocking or stockouts of high-demand products.
These problems affected different parts of the same operation:
| Operational problem | Project response | What another retailer should check |
|---|---|---|
| Unfinished B2C store | Magento 1-to-2 migration | Which existing features and data can be retained? |
| Undocumented B2B behavior | Technical and operational documentation | Who can explain current integrations and exceptions? |
| Incompatible ERP data | Custom API connector | Are identifiers, formats and business rules understood? |
| Delayed product and order updates | API-based exchange | What delay is acceptable for each type of data? |
Why did SanMar decide to act?
Delaying real-time ERP connectivity would have kept manual updates for stock, prices and orders, with the risk of pricing mismatches, stock discrepancies and fulfillment delays. The B2B platform also had to handle growing traffic and order volumes once the ERP was connected. For similar retailers: first trace one discrepant SKU or order across the store and ERP, recording the values, timestamps and manual correction.
Technologies Dinarys applied
We applied MACH principles, in particular an API-first architecture, and kept the existing ERP as the central hub.
The API-first setup lays the groundwork for later CRM, PIM, marketing automation and logistics connections. It is built to:
Handle future business expansion
Manage technology upgrades
Facilitate integrations with minimal disruption
Want to know if MACH principles align with your business goals and technology challenges?
Get a free consultation with KonstantynWhat impact did the project have on the client’s business?
With the API-first integration in place, product, stock, price and order data flow between the ERP and both websites without manual re-entry. For SanMar this meant: automated stock, availability, price and catalog updates; orders reflected in the ERP without manual transfer; fewer stock and pricing mismatches on the websites. We do not have before-and-after figures for this project, so we do not quote revenue or labor savings.
A similar ERP-connected rebuild: Prostor’s Magento 2 migration for a 427-store retailer.
Business results
Together with our client, we achieved the following results:
Automated data updates
through API-based integration with the internal ERP system, enabling a real-time data stream for product stock levels, availability, price dynamics, and catalogs.
Increased ERP operational efficiency
by implementing a new method for integrating with the back end and offering a more intuitive interface for customers that helps them run their businesses more effectively.
Fewer manual data steps between ERP and store
and room for further logistics, CRM and marketing connections through the API-first architecture.
Sped up order processing
through real-time stock visibility, allowing our client to surpass competitors and gain a competitive edge.
Acceptance checklist for your ERP connection
Use a small set of complete business scenarios rather than accepting an integration solely because an API returns a successful response.
Example checklist for your project (not SanMar’s test results):
| Scenario | Expected evidence | Acceptance owner |
|---|---|---|
| An account buyer opens a product | Customer ID resolves to the agreed price list | Ecommerce and ERP owners |
| Stock changes in the source system | The matching SKU/location updates within the agreed delay | Inventory operations |
| A submitted order request is repeated after a timeout | One business order exists; the retry is traceable | Integration lead |
| An order cannot be transferred | The failure is visible and has an assigned recovery action | Operations lead |
| A mapping changes before release | Affected product and order scenarios are rerun | QA and both system owners |
Before commissioning work, identify the authoritative source for each field, access to a test environment, responsible vendors, and the person who accepts operational reconciliation. Agree who investigates a failure that crosses the ERP/commerce boundary. Agree in advance who maintains the connector after an ERP, Magento or connector upgrade, which documentation you receive, and how your team can rerun the acceptance scenarios without us.
Bring one problematic order, the related SKU and price records, your interface documentation and the manual correction steps. Then compare repairing the exchange, a supported connector and custom work with our ecommerce ERP integration services team.
Future-proof your retail operations with our team
We’ll help you build a high-performance,
future-ready commerce ecosystem
Future-proof your retail operations with our team
We’ll help you build a high-performance,
future-ready commerce ecosystem
Roman
CTO
01
Increase your revenue
with seamless operations and automation
02
Enhance reliability and customer satisfaction
through real-time updates of stock and delivery data
03
Scale your platform
for effortless business expansion
Discover more projects
Automotive parts marketplace
Created a comprehensive online platform with a complete catalog of automotive parts
-
Integrating TecDoc’s extensive parts catalog via API
-
Developing core search functionality, synchronization, and validation
-
Creating technical documentation and user guides
Prostor
Integrated Prostor’s eCommerce platform with their custom CRM system
-
Migrating the Prostor platform to Magento 2
-
Integrating the newly migrated system with Prostor’s custom CRM for a personalized shopping experience
-
Designing a user-friendly checkout page to improve conversion rates
Kontakt Home
Implemented a new online store based on Magento 2 CMS
-
Building a custom front end for CMS functionality
-
Integrating the client’s store with a ready-made ERP system
-
Adding custom features and integrating out-of-the-box services