The Challenge
Rowen Homes approached us to design and build a bespoke solution for their Warehouse Management System (WMS) that is connected with Shopify This solution was split into two parts:
The first task was to develop a drop-ship integration where hosted CSV files that held information on stock quantities and SKUs updated the warehouse management system accordingly on a given cohort of products and at certain intervals of the day. The second part was to raise purchase orders in the Warehouse Management System as they were placed in Shopify. Here is how we did it.
The Solution
Task 1 - Inventory Management
We developed a Node JS service using Express that was responsible for fetching the CSV stock data from multiple suppliers. The service needed to be able to handle different connection protocols (SFTP, FTP, FTP over SSL and Plainlink) and account for different data structures which we accommodated by configuring the list of connections so that they could accessed and handled accordingly.
javascript
for await (const connection of connections) {
console.log("Connnecting to:", connection.supplier);
switch (connection.type) {
case "sftp":
await handleSFTPConnection(connection);
break;
case "ftp":
await handleFTPConnection(connection);
break;
case "ftp-ssl":
await handleFTPConnection(connection, true);
break;
case "plainlink":
await handlePlainlinkConnection(connection);
break;
default:
console.log("No connection type specified");
}
}
Upon connection, the CSV's were parsed and we returned only what we needed as JSON to keep the process as lean as possible. Next, we called the respective API endpoint in the WMS to get the difference in stock from there and the Suppliers and finally passed the difference back up to the WMS as a stock adjustment.
Task 2 - Purchase Order Creation
For creating purchase orders, we made use of Shopify's 'Create Order' Webhook. This called an endpoint on our service that would take the data from the order, ensure it contained items stored in the WMS and create purchase orders. Some key considerations were identified and resolved as part of this:
- Authenticating the request - to ensure only Rowen can contact our service, we verify the integrity of the webhook to ensure the signature matches the Rowen store.
- Validating the items - not every item in Rowen's store is managed by the WMS. We needed to filter through the line items and only pass through the items stored on the WMS to prevent unnecessary API calls.
- Handling multiple suppliers - for orders that contained items shipped by multiple suppliers, individual Purchase Orders (PO) had to be raised for each supplier. To account for this, we checked the line item's vendor against our configured list and split the items out into separate POs.
Finally, we needed to account for direct shipping to the customer. This involved some complexity as we needed to pass the customer information up as a new location in the WMS with the possibility that a customer could place multiple orders in a short space of time. This presented a challenge as location names in the WMS must be unique. To get around this, we prefixed the order number, allowing one user to be stored as multiple locations without impacting the integrity of their orders.
This project presented some fresh challenges for us at StackUp and since the service launched we have introduced more connections and introduced new features to automate the integration further.
If you need help connecting a third-party warehouse or fulfilment system to your e-commerce store, get in touch with us and let's talk about how we can help you!
Let's Talk, get in touch today
Have a new project in mind?
StackUp Digital
Boho Five, Bridge Street East
Middlesbrough
TS2 1NY
United Kingdom
+44 (0) 1642 262777 or Message +44 (0) 7305 063392