Space48 Logo
stock-photo
June 19, 2015

Stock management and Magento integration

Linking your Magento website to your retail business systems doesn’t have to be a headache, you just need the right team behind you. Here, I will talk you through a recent ‘mission critical’ project for one of our customers, an eCommerce fashion retailer.

The retailer in question has been a Touchretail client for many years and have always been interested in the latest developments that enable them to grow their business. Touchretail recently developed something of interest to our customer; a multichannel, cloud based, EPOS, Inventory Management and CRM solution called TRIMS.

TRIMS capability:

  • Flexible and scalable inventory database
  • Latest import/export facilities
  • TRIMS Vision for reporting and analysis
  • Customisable fields and matching Magento Attributes
  • Seamless progression from legacy to next generation systems
  • Maximised investment by utilisation of existing POS hardware and software
  • No online downtime during system upgrade period

Mission Critical

Our customer wished to migrate from their existing stock management system to TRIMS. The client-side migration (retail outlet) was scheduled to occur during business hours and would take approximately half a day. The web store (including Amazon and Ebay) were to remain open for business as usual with no downtime.

The migration posed several technical challenges.

The transfer of order data in a new encoded format to TRIMS in real time for orders and refunds placed on the client’s Magento website, Amazon and Ebay stores. The integration of a new set of API functions, and not least, the changing of all SKUs for configurable products so that they were compatible with TRIMs.

It was necessary to create a bespoke module to deal with the transfer of order data to TRIMS. In broad terms; order data (picked up by observers and a backup sweep function) is encoded into the correct format and stored in an intermediate database table. It is then picked up by a cron and sent to the TRIMS server, the TRIMS response is picked up, analysed and recorded against the relevant database record. This architecture was chosen to allow for network or server downtime and ensures that 100% of the order data is transferred.

Several admin functions and a user interface were developed to allow complete control over the migration procedure; including switches for the data format, destination and sweep up functions to catch orders which were placed during the migration together with rollback functions for disaster recovery. This additional functionality allowed the migration to occur in business hours without taking the site down; making the development and implementation completely transparent for website users.

Additional non-native calculations were added to the module to cater for EU and non-EU transactions with discounts, special prices or refunds.

TRIMS manages product and stock updates through the Magento API. During the migration, it was necessary to add additional functionality to the API and remove redundant API functions seamlessly, yet allow for a rollback if required.

An update of all configurable product SKUs and the addition of a product attribute to hold the old SKU was also required. In itself, this is relatively simple to achieve, but is a significant change for a site with several thousand product references. With this project, it was therefore necessary to conduct a site-wide audit of core and third party functionality to ensure the change would not have unexpected consequences. Our audit showed that product feeds, affiliation, and reporting were the main areas affected and modifications were made and further steps added to the migration procedure, ensuring that the SKU changes occurred without impact on the business.

Stress-free deployment

From a developer’s point of view, the changes were significant and touched critical areas, products, and orders. In order to reduce the risk of errors leading to lost or corrupted orders and in the worst case having to roll back to the previous solution, we undertook thorough testing in an environment which mirrored the production environment. At least half of the development time was spent testing and running through the different permutations for each of the additional functions until we were confident that functionality was solid in race conditions, this paid dividends and led to a stress free deployment.

Successful stock management integration is crucial for any eCommerce store.

TRIMS is just one example of a stock management system that we have integrated with Magento, other systems include but are not limited to; Key Computers, Microsoft Dynamics, Bright Pearl, Linnworks and JD Edwards.