Template — Sync inventory between WooCommerce and Odoo
The problem
Section titled “The problem”If WooCommerce and Odoo hold stock separately, they drift apart and you oversell. This template keeps inventory aligned: it reads stock from the source of truth and pushes updates to the other system, on a schedule or when stock changes.
How it works
Section titled “How it works”Scheduler (every N minutes) ·or· Odoo stock change ↓Odoo: Read stock levels (source of truth) ↓Iterator (per SKU) → Data Store (compare with last synced value) ↓Decision (changed?) → WooCommerce: Update Product (stock)Nodes used
Section titled “Nodes used”| Node | Purpose |
|---|---|
| Scheduler | Run the sync every N minutes |
| Odoo (Read / API) | Read stock from the ERP (source of truth) |
| Iterator | Process each SKU |
| Data Store | Remember the last synced quantity (only push changes) |
| WooCommerce — Update Product | Write the new stock level |
Key configuration
Section titled “Key configuration”- Pick one source of truth (usually the ERP) to avoid sync loops.
- Use Data Store to push only SKUs whose quantity actually changed.
- Map by SKU, not internal IDs, so both systems agree on the product.