Case Study

ECommerce to ERP Integration

ManufacturingOnline RetailCustom SoftwareSystems IntegrationAPIMagento 2.0MySQLNavisionPHPSOAP/XMLWooCommerce

Connecting WooCommerce and Microsoft Navision to automate order processing and fulfillment.

The Challenge: A Growing Business Held Back by Manual Processes

The client designs and manufactures consumer over-the-counter medical devices. At the time, its primary sales channel was a custom ecommerce storefront built on Magento 2.0. Behind the scenes, however, all accounting and fulfillment operations were managed through Microsoft Navision ERP.

The disconnect between these two systems created a significant operational bottleneck. Every online sale had to be manually transferred from Magento into Navision before it could be processed. Several office staff members spent time each day exporting sales reports, reviewing transactions, and entering orders into the ERP system.

As sales volume increased, the process became increasingly difficult to sustain. Beyond the time involved, manual data entry introduced multiple opportunities for errors: incorrect quantities, duplicate orders, missed transactions, and delays between the time a customer placed an order and when fulfillment could begin.

The client approached us to explore ways to eliminate this bottleneck through system integration.

The primary technical challenge was Navision itself. While still widely used by businesses running Microsoft Dynamics NAV, the platform relies on SOAP/XML-based web services for external communication. Connecting it to a modern ecommerce platform would require a custom middleware application capable of translating data between two fundamentally different systems.

Our objective was straightforward: automate the entire order transfer process while keeping both systems intact.

Building the Bridge: Technical Architecture & Implementation

Time was an important consideration. Every week spent developing the solution was another week the client’s staff had to continue manually processing orders. We established an initial target of having a working prototype available for testing within 12 weeks.

Selecting the Technology Stack

We opted for an open-source architecture built around PHP and MySQL, hosted on a standard Linux cloud server. This gave us a lightweight, cost-effective platform that could operate independently of both the ecommerce storefront and the internal ERP infrastructure.

With the middleware environment established, we tackled the most challenging component first: establishing reliable communication with Navision.

Connecting to Microsoft Navision

Navision operated behind the client’s corporate firewall, requiring coordination with its managed IT provider to establish a secure path for external communication.

Working with the IT team, we configured an approved external IP address and firewall whitelist to allow our middleware server to communicate with Navision through its SOAP web services.

Although SOAP is an older technology, PHP has supported it for many years, and several mature libraries were available to handle the underlying XML communication.

After working through the necessary configuration and coordination with both IT and Navision support, we successfully established connectivity and verified that the middleware could perform the required read and write operations against the ERP system.

Connecting the Ecommerce Platform

The next step was building a connector to Magento using its API.

Compared to the Navision integration, this was relatively straightforward. Magento provided accessible sales data through its API, allowing us to retrieve order records and pass them into the middleware for processing.

With both connections established, we had the foundation of the integration in place.

Mapping and Transforming Order Data

Connecting the two systems was only half the challenge. Their underlying data structures were quite different, and an ecommerce order couldn’t simply be passed directly into Navision.

We began by identifying the fields required to create a new sales order in Navision and comparing them against the data returned by Magento.

Using these mappings, we developed a collection of PHP classes responsible for transforming incoming Magento sales records into the format expected by Navision.

Most of the order information was relatively straightforward to map. More complex scenarios involved line items with varying quantities, product identifiers, discounts, and coupon codes. These required additional transformation logic to ensure that the resulting ERP records accurately reflected the original customer transactions.

Before introducing automation, we also developed a manual import interface. This allowed us to select individual orders, execute the import process, and carefully compare the resulting records in Navision against their original ecommerce transactions.

After several rounds of testing and refinement, we had a reliable import process ready for automation.

How Order Data Flows Between Systems

With the underlying integration complete, the final step was automating the process.

The middleware consisted of two primary components: a collection of PHP classes responsible for retrieving sales from Magento, and another set responsible for inserting the transformed orders into Navision.

A scheduled background process coordinated the two operations, periodically retrieving new orders, processing them, and submitting them to the ERP system.

Once an order was successfully imported, the middleware flagged it within Magento so subsequent import cycles would recognize it as completed and avoid processing it again.

Rather than attempting true real-time synchronization, we settled on a near-real-time approach using a scheduled CRON job. The process ran approximately every five minutes, providing a substantial improvement over the previous manual workflow while allowing sufficient time for each import cycle to complete.

Error Handling and Operational Reliability

We incorporated logging and automated email notifications early in development to provide visibility into import failures and other unexpected conditions.

One issue that surfaced during testing involved inconsistent product SKUs between Magento and Navision. Since product identifiers were critical to accurate order processing, these discrepancies could prevent individual orders from importing successfully.

Rather than allowing these errors to go unnoticed, the middleware logged the problem and notified the appropriate staff. Once the underlying SKU discrepancy was corrected, the affected order could be picked up during a subsequent import cycle.

This approach provided a degree of operational resilience while minimizing the need for ongoing manual intervention.

An Unexpected Evolution: Migrating from Magento to WooCommerce

A few years after the initial implementation, the client decided to move its ecommerce operation from Magento to WordPress and WooCommerce.

For anyone who has managed a Magento installation, the platform’s hosting requirements, maintenance overhead, and general complexity are familiar challenges. By this point, WooCommerce had matured into a capable ecommerce platform, making it a practical alternative for the client’s needs.

The move also simplified ongoing website management, as the client was already maintaining several other websites on WordPress.

Fortunately, the modular architecture of our integration meant this transition didn’t require rebuilding the entire solution.

Instead, we developed a new collection of data retrieval methods using the WooCommerce API in place of Magento’s. We then updated the transformation layer to accommodate WooCommerce’s order structure, including differences in how discounts and coupon codes were represented.

The Navision integration itself remained unchanged.

After repeating our individual order testing and verifying the new data mappings, we reactivated the automated import schedule.

The migration demonstrated an important advantage of the original architecture: changes to one connected platform didn’t require changes to the entire integration.

Results & Business Impact

The integration has been operating successfully for years, continuing to handle the client’s ecommerce order processing with minimal ongoing maintenance.

Most importantly, the client no longer needs to dedicate multiple staff members to manually transferring online sales into its ERP system. That time can now be spent on higher-value operational responsibilities that actually require their attention and expertise.

The business benefits include:

  • Elimination of manual order entry: Online sales automatically flow into Navision without staff intervention.
  • Faster order processing: New transactions are available for fulfillment within minutes rather than waiting for manual processing.
  • Improved data accuracy: Automated mapping and validation eliminate many of the inconsistencies and errors associated with manual entry.
  • Reduced administrative overhead: Staff capacity previously dedicated to order entry can be redirected to other business operations.
  • Long-term flexibility: A modular architecture allows additional ecommerce platforms and sales channels to be incorporated without rebuilding the core integration.

The middleware continues to receive routine maintenance, including dependency updates, security patches, and platform upgrades, but the underlying integration has remained a dependable part of the client’s business operations.

Built to Grow With the Business

This project illustrates the value of custom integration when off-the-shelf solutions aren’t available or practical.

Rather than forcing the client to replace established business systems, we built a bridge between them. The result was a solution that automated a critical business process, reduced operational friction, and adapted as the client’s technology stack evolved.

Just as importantly, the modular design provided a foundation for future expansion beyond the primary ecommerce storefront.

The next phase would involve integrating additional sales channels, including Amazon Marketplace, into the same automated order processing workflow.


Ready to talk through a similar problem?

Tell us what you are trying to improve — or browse more case studies.