MTMC: Exchanging data between an in-house stock management system and ecommerce web site

With well over 1,000,000 SKUs, MTMC needed a fast, reliable, automated way to keep stock levels and prices synchronized with the authoritative central database

MTMC web site Above: The MTMC home page

Background

Miles Tool & Machinery Centre is a major retailer of tools, spare parts, protective equipment and other related products based in the UK. The business has used Cactusoft ecommerce software to run its online offering for around two decades. The company also has a bricks and mortar retail location and warehouse.

Brief

The company was implementing a third party order and stock management system that would hold stock availability and set pricing across the entire business, as well as process all orders. This was to be the "primary" data repository. The ultimate aim was to pass customer and order details from the web site, into the processing system. But this also required a product data synchronization process to ensure that all items on the web site were in the third party system, and that prices and availability matched.

The solution

It was agreed that near real-time synchronization was needed, with a sync process that would initially run nightly, but could be triggered manually or be set to run more frequently in future. We chose to build the sync tool in Windows Forms (.NET 6 Core, C#) with the web site integration achieved by modfiying and extending the existing Web Forms (.NET Framework) code.

The sync tool queries the third party stock system's web API to find items that had changed since the last sync process, and then queries the Kartris web site database to update those items if necessary. Data is also checked for mismatches - items on the web site not present in the stock system (so as to avoid orders which could not be processed as the items did not exist in the primary system).

The system emails a full report each time it runs, so price changes, stock levels and any other updates can be monitored and problems spotted at the earliest opportunity.

We chose to implement a Windows Forms application as it runs much faster that script-based alternatives and enables us to provide a simple GUI for manual operation on the server, as well as a command-line interface for scheduled operation. Using .NET also gives access to a large array of packages for handling JSON and API calls.

The "primary" system also handles all orders from the web site as well as the retail location. To support this, we added integration to the web site itself that could allow each order to be posted into the system via the primary system's web API, so no manual re-keying of orders would be necessary, significantly cutting the workload on order handling staff and reducing the chance of errors.

MTMC admin screenshot Above: The updated back end admin page for order processing which checks if the customer is present in the primary system and allows it to be created (if new), as well as passing the order over too.

Conclusion

The integrations allow MTMC to keep its familiar web site for clients but ensure that data can be synchronized with the new third-party stock and order management system with the minimum of human intervention. The stock synchronization process is automatic, while simple tools are added to allow staff processing orders to add orders to the primary system with the push of a button or two.

Ooops. Some kind of error occurred. We have logged it.