Let’s face it – if you sell something and it’s not in stock, that means trouble. You either have to cancel the order or keep the customer waiting for stock fulfillment. Keeping stock quantities up to date can be difficult if you serve multiple stores from a single warehouse.
With Stock Sync Pro, we had a singular focus – to make stock syncing between WooCommerce stores as reliable as possible. We spent a lot of time figuring out how to handle different scenarios, such as if there are multiple orders for the same product at the exact same second.
The naive way to handle stock syncing would be to simply copy stock quantities between stores whenever they change. However, this presents a potential problem. If there are two (or more) orders for the same product at the exact same second and syncing has not yet taken place, quantities will end up wrong.
To give you an idea of how this can happen, let’s assume we have two stores: Fruits Store and Fruits B2B. The former serves regular customers while the latter serves business customers. Both stores are served from the same warehouse. Let’s have a look at what happens if two customers place an order for apples from both stores at the same time, and we just copy stock quantities:
Time | Event | Stock Quantity in Fruits Store | Stock Quantity in Fruits B2B |
9:00:00 | Initial Stock Quantity | 100 | 100 |
9:00:00 | Customer A purchases 30 apples from Fruits B2B | 100 | 70 |
9:00:00 | Customer B purchases 10 apples from Fruits Store | 90 | 70 |
9:00:01 | Fruits B2B copies stock quantity to Fruits Store | 70 | 70 |
9:00:01 | Fruits Store copies stock quantity to Fruits B2B | 70 | 70 |
As we can see, by simply copying the quantities, we end up with 70 apples, while the real quantity would be 60.
Now, Stock Sync Pro handles this differently. Instead of simply copying quantities, it keeps track of how much stock has been changed. It will sync the difference instead of the actual quantity. This way, it doesn’t matter if syncing has not yet taken place as it will subtract or increase the amount. We call this delta adjustment, which means change in mathematics. Let’s redo the earlier sequence of events with this technique:
Time | Event | Stock Quantity in Fruits Store | Stock Quantity in Fruits B2B |
9:00:00 | Initial Stock Quantity | 100 | 100 |
9:00:00 | Customer A purchases 30 apples from Fruits B2B | 100 | 70 |
9:00:00 | Customer B purchases 10 apples from Fruits Store | 90 | 70 |
9:00:01 | Fruits B2B subtracts 30 apples from Fruits Store | 60 | 70 |
9:00:01 | Fruits Store subtracts 10 apples from Fruits B2B | 60 | 60 |
Now, we end up with the correct amount of 60 apples. This is because we synced the change instead of the value. This technique can handle high-volume sales with ease.
While keeping stock in check is a crucial part of stock syncing, it’s only one part of the equation, though. Other important aspects to consider:
- Syncing doesn’t slow down the site, which would be bad customer experience
- Stock changes can be easily monitored product by product should something go wrong
- No matter the amount of products, syncing is reliable
With Stock Sync Pro, we paid special attention to making the plugin handle all these aspects:
- Background Processing – syncing is done in the background, so it doesn’t affect frontend loading times
- Smart Logging – easily monitor what triggered the stock change (e.g. order or admin edit) product by product
- Batch Processing – products are processed in batches, meaning it works for anything from one product to tens of thousands of products
In conclusion, Stock Sync Pro is a great solution for keeping stock quantities up to date between multiple WooCommerce stores. With features like delta adjustment, background processing and smart logging, stock syncing becomes reliable and effortless. Try Stock Sync Pro today to see how it can benefit your business.