eCommerce stock syncing script between platforms?

gregmcc

Honorary Master
Joined
Jun 29, 2006
Messages
29,427
Reaction score
10,492
Location
Somewhere in the world
Has anyone written a script to sync stock between various eCommerce platforms - eBay / Woocommerce / etsy?

There are a few commercial programs to do this but a)I'm too cheap b) Don't sell that much yet.

I've got a custom python script that queries the eBay API for stock levels and makes sure that woocommerce is the same but this only syncs from eBay to WC. Looking to add syncing the other way as well and also sync to etsy.

Not even sure what the best way to do this is - do I keep on running api queries to all platforms every few mins for every item listed to see when the stock changes (ie something sold), or is there a api you can call to tell you when something is sold.
 
use a webhook approach, which I assume all these platforms support.

e.g.

when you sell a product on eBay:
  • it calls a webhook `/product-sold?productId=123&source=ebay` or whatever
  • that webhook then updates the stock total for that product in your global/source of truth table
  • you then update all the other stores with the new source of truth value
 
use a webhook approach, which I assume all these platforms support.

e.g.

when you sell a product on eBay:
  • it calls a webhook `/product-sold?productId=123&source=ebay` or whatever
  • that webhook then updates the stock total for that product in your global/source of truth table
  • you then update all the other stores with the new source of truth value
then, if you do a sale offline, you just update your source of truth, and it will then update all your online stores
 
Thanks - never thought about that. Will do some reading up on webhooks.

As _kabal_ mentioned, you need a source of truth. The biggest mistake I see in e-commerce systems (and from retail days) is having redundancy through replication.

Why specialists companies like Stock 2 Shop do all the technical work so retail businesses can focus on what they do well.
 
Top
Sign up to the MyBroadband newsletter
X