bryanallott
-
6/25/2013 4:14:42 PM
RE:Inventory Synchronization
Thanks, Filip, I've had a look at all the samples, but don't see any real way of solving this easily.
The inventory (SKUAvailableItems) value on the production server SKU object can't be changed by a synch. Even with bi-directional synching, there's a window between editing on staging and synching where customers are purchasing and the inventory management messes up. So having a solution controlled from the staging environment doesn't really work.
The events I've looked (DocumentEvent -BeforeUpdate) for example runs for *all* updates, so when an order is placed as an example, that code will run- and legitimately update the inventory. UNLESS: is there a way to determine the source of the Document Update (like, is this update a result of a staging task). Barring that, controlling the inventory from production server can't work either (when there's a staging server involved).
There must be a standard way for managing stock levels across the server environments though? One where if you did a physical stock take in the warehouse, it would match up with inventory available on the production server; even as the product object/document changes over time (new pricing).
It seems to be a fundamental function for an ecommerce system it feels like I've overlooked something maybe?
I can see a potential solution where a handler for Document.Update on production server immediately does a bi-directional synch to staging, updating the inventory level.
Unfortunately, if there were any edits to the staging document (eg. new price) waiting to synch, they would be lost.
How does everybody else control inventory levels reliably? Using a third party reference?
|