The Truth About Real Time Inventory Sync - WooCommerce to Odoo

Ensuring Your Odoo and WooCommerce Inventory Is Always Accurate

man wearing black crew-neck shirt

Yann Paul

HR Manager

Featured

A calculator ontop a table

Ensuring Your Odoo and WooCommerce Inventory Is Always Accurate

A common decision when choosing a connection between Odoo and WooCommerce is the rate at which stock and inventory is managed and kept in sync.

Often companies using Odoo have more than one sales channel. This means inventory may need to be managed across multiple sales channels, multiple warehouses, and possibly multiple physical locations.

For example, a business may sell through:

  • WooCommerce

  • Odoo Sales

  • Odoo POS

  • A retail store

  • A wholesale team

  • A marketplace

  • A manual sales team

  • A warehouse or fulfilment centre

In this setup, inventory accuracy becomes extremely important.

If WooCommerce shows stock that is no longer available in Odoo, customers may purchase products that cannot be fulfilled.

If Odoo does not receive stock updates from WooCommerce quickly enough, the business may oversell products across different channels.

This is why stock sync needs to be planned carefully.

There are two main ways to achieve stock sync between WooCommerce and Odoo:

  1. Polling

  2. Interrupts, commonly implemented using webhooks or event-based updates

In this article, we’ll review these two methods and outline the decisions behind choosing the right method for your implementation.

Polling vs Interrupts

The concepts of polling and interrupts come from the computer systems world.

They define how two systems communicate with each other.

In our case, the two systems are:

System

Platform

System A

WooCommerce

System B

Odoo

Polling is when System A repeatedly checks System B for an update.

Interrupts are when System B sends a signal to System A, telling it that an update has happened.

In simpler terms:

Method

Meaning

Polling

“Do you have any updates? Do you have any updates? Do you have any updates?”

Interrupts

“An update has happened. Here is the new value.”

Both methods can work.

The right choice depends on how quickly stock needs to update, how many products are being synced, how many sales channels exist, and how much technical complexity the business is willing to support.

What This Means for WooCommerce and Odoo

Let’s consider that WooCommerce wants to keep track of the correct stock value from Odoo.

In this setup:

System

Role

WooCommerce

Customer-facing store

Odoo

Inventory source-of-truth

This is a very common setup.

WooCommerce is where the customer purchases the product.

Odoo is where the business manages inventory, sales, purchasing, warehouse movements, and stock availability.

The key question becomes:

How does WooCommerce know when stock has changed in Odoo?

There are two ways to do this.

Option 1: Polling

Polling is when WooCommerce checks Odoo at a defined interval to see whether stock has changed.

This could happen:

  • Once per day

  • Every hour

  • Every 30 minutes

  • Every 15 minutes

  • Every 5 minutes

  • At another defined interval

For example:

WooCommerce checks Odoo every 15 minutes.

If Odoo says Product A has 12 units available, WooCommerce updates Product A to show 12 units available.

If Odoo later changes Product A to 8 units available, WooCommerce will not know immediately.

WooCommerce will only find out the next time it checks Odoo.

How Polling Works

A basic polling workflow looks like this:

  1. Odoo is treated as the source-of-truth for inventory.

  2. WooCommerce runs a scheduled stock sync.

  3. WooCommerce requests the latest stock values from Odoo.

  4. Odoo returns the current available stock.

  5. WooCommerce compares the Odoo value against the WooCommerce value.

  6. If the value is different, WooCommerce updates the product stock.

  7. The process repeats at the next scheduled interval.

Example:

Time

Action

10:00am

WooCommerce checks Odoo stock

10:00am

Product A stock is updated to 10

10:07am

Product A is sold through another sales channel

10:07am

Odoo stock changes to 9

10:15am

WooCommerce checks Odoo again

10:15am

WooCommerce updates Product A stock to 9

In this example, there is an 8-minute period where WooCommerce may still show the old stock value.

That is the trade-off with polling.

Benefits of Polling

Polling is simple, reliable, and easier to implement.

It works well when the business does not need instant stock updates.

Benefits include:

  • Easier to configure

  • Easier to debug

  • Does not require advanced Odoo webhook configuration

  • Works well for simple stores

  • Works well when stock does not change frequently

  • Can be scheduled during quiet periods

  • Can be controlled to reduce API load

  • Can be retried if a sync fails

For many businesses, polling is enough.

If a store has low order volume, simple stock rules, and only one main sales channel, checking stock every 15 minutes, 30 minutes, or 1 hour may be perfectly acceptable.

Downsides of Polling

The main downside of polling is delay.

WooCommerce only updates when it checks Odoo.

If the stock changes between polling intervals, WooCommerce may temporarily show the wrong stock value.

This can create problems when:

  • Stock is low

  • Products sell quickly

  • Multiple sales channels are active

  • Inventory changes often

  • Stock is updated manually in Odoo

  • Sales happen through Odoo POS or another channel

  • Multiple warehouses are involved

For example, imagine Product A has only 1 unit left.

At 10:00am, WooCommerce checks Odoo and shows 1 unit available.

At 10:03am, the same product is sold through Odoo POS.

Odoo stock becomes 0.

But WooCommerce will not check Odoo again until 10:15am.

During that 12-minute gap, a WooCommerce customer could still purchase the product.

This creates an oversell.

When Polling Works Best

Polling works best when:

  • Stock does not change constantly

  • The store has moderate or low order volume

  • There is only one main sales channel

  • Overselling is not a major risk

  • Stock buffers are used

  • Product quantities are usually high

  • Real-time inventory is not required

  • The business wants a simpler setup

Polling is also useful as a fallback method.

Even if real-time interrupts are used, it can still be useful to run a scheduled polling sync once or twice a day to confirm both systems are aligned.

Option 2: Interrupts

Interrupts are event-based updates.

Instead of WooCommerce repeatedly checking Odoo, Odoo sends a signal to WooCommerce when stock changes.

In modern web systems, this is usually handled using a webhook.

A webhook is a configured callback that sends data from one system to another when a specific event occurs.

In this case:

Odoo stock changes → Odoo sends a webhook → WooCommerce receives the update → WooCommerce updates stock

This is much closer to real-time sync.

How Interrupts Work

A basic interrupt or webhook workflow looks like this:

  1. Odoo is treated as the source-of-truth for inventory.

  2. A stock change happens in Odoo.

  3. Odoo triggers a webhook or event.

  4. The webhook sends the stock update to WooCommerce.

  5. A helper plugin in WooCommerce receives the request.

  6. WooCommerce identifies the product by SKU or product ID.

  7. WooCommerce updates the product stock immediately.

  8. The update is logged for auditing and troubleshooting.

Example:

Time

Action

10:00am

Product A has 10 units in Odoo

10:03am

Product A is sold through Odoo POS

10:03am

Odoo stock changes to 9

10:03am

Odoo sends webhook to WooCommerce

10:03am

WooCommerce updates Product A stock to 9

This reduces the delay between Odoo and WooCommerce.

Benefits of Interrupts

The main benefit of interrupts is speed.

Stock can be updated almost immediately after a change happens in Odoo.

Benefits include:

  • Near real-time stock updates

  • Better for multiple sales channels

  • Better for low-stock products

  • Better for fast-moving products

  • Reduces overselling risk

  • Reduces unnecessary API polling

  • More efficient because updates only happen when something changes

  • Better for businesses using Odoo as the operational source-of-truth

This is usually the better approach when stock accuracy is critical.

For example, if a business sells through WooCommerce, Odoo POS, and a wholesale sales team, then real-time stock updates may be necessary.

Downsides of Interrupts

Interrupts are more powerful, but they are also more complex.

They usually require:

  • A helper plugin in WooCommerce

  • Webhook configuration in Odoo

  • Authentication between systems

  • Secure callback URLs

  • Error handling

  • Retry logic

  • Logging

  • Testing

  • Monitoring

If the webhook fails, WooCommerce may not receive the update.

For example:

  • WooCommerce may be temporarily unavailable

  • The webhook may timeout

  • Authentication may fail

  • The product SKU may not be found

  • Odoo may send the wrong payload

  • The helper plugin may reject the request

This is why interrupt-based sync needs good logging and retry handling.

It is also why polling can still be useful as a backup check.

When Interrupts Work Best

Interrupts work best when:

  • Stock needs to update close to real time

  • The business sells through multiple channels

  • Product quantities are low

  • Overselling is a serious risk

  • Odoo is the main inventory source-of-truth

  • Odoo POS or manual Odoo sales are active

  • Stock changes frequently

  • The business has multiple warehouses or locations

  • The integration has technical support available

Interrupts are usually the better option for businesses with more advanced inventory requirements.

Woodoo Sync Stock Update Process

Woodoo can support stock syncing by using either polling or interrupt-based syncing.

The right method depends on the business workflow.

A simple business may only need scheduled polling.

A more advanced business may need real-time stock updates using interrupts.

A strong implementation may use both.

Method 1: Scheduled Stock Sync Using Polling

In a polling-based Woodoo setup, WooCommerce checks Odoo for updated inventory values at a defined interval.

The business can define how often this should happen.

For example:

Sync Frequency

Best For

Once per day

Low-volume stores or catalogue updates

Every 6 hours

Stores with occasional inventory changes

Every 1 hour

Standard e-commerce stores

Every 15 minutes

Stores with moderate sales volume

Every 5 minutes

Stores with higher inventory sensitivity

The shorter the interval, the more up-to-date WooCommerce will be.

However, shorter intervals also create more API activity between WooCommerce and Odoo.

For stores with a large number of products, this matters.

Polling 10 products every 5 minutes is very different from polling 20,000 products every 5 minutes.

The sync needs to be designed in a way that does not overload WooCommerce, Odoo, or the server environment.

Polling Implementation Considerations

When using polling, the following decisions need to be made:

1. What products should be checked?

Should Woodoo check:

  • All products?

  • Only published products?

  • Only products with SKUs?

  • Only products marked as synced?

  • Only products that changed recently?

  • Only products in certain categories?

For larger stores, syncing all products every few minutes may not be practical.

A better approach may be to sync only products that are active, visible, and mapped to Odoo.

2. Which stock value should be used?

Odoo may have several stock values.

For example:

Odoo Stock Value

Field

Quantity On Hand

product.product -> qty_available

Forecasted Quantity

product.product -> virtual_available

Free to Use Quantity

Depends on Odoo version and inventory configuration

Quantity by Location

stock.quant -> quantity

Reserved Quantity

Stock reserved for existing orders

The business needs to decide which value should be shown in WooCommerce.

This is not always obvious.

For example, quantity on hand may show 10 units, but 4 may already be reserved for other orders.

In that case, showing 10 units in WooCommerce may be inaccurate.

For many implementations, the available quantity should consider stock that is actually available to sell.

3. Which warehouse or location should be used?

Odoo may have multiple warehouses or stock locations.

For example:

  • Main Warehouse

  • Retail Store

  • Dubai Warehouse

  • Auckland Warehouse

  • Damaged Stock

  • Returns Location

  • Supplier Location

WooCommerce should not always use total stock across every location.

For example, if WooCommerce orders are fulfilled from the Main Warehouse, then WooCommerce should only show stock available from that warehouse.

Important questions include:

  • Which Odoo warehouse fulfils WooCommerce orders?

  • Should WooCommerce show total stock across all warehouses?

  • Should WooCommerce show only one warehouse?

  • Should damaged, returned, or reserved stock be excluded?

  • Should each WooCommerce store connect to a different Odoo warehouse?

This should be defined before syncing stock.

4. How should out-of-stock products be handled?

WooCommerce can show products as in stock, out of stock, or on backorder.

The sync needs to decide how Odoo stock values should update WooCommerce stock status.

For example:

Odoo Stock

WooCommerce Result

Stock greater than 0

In stock

Stock equals 0

Out of stock

Stock less than 0

Out of stock or backorder

Backorders allowed

Allow purchase

Backorders disabled

Prevent purchase

This is important for customer experience.

Some stores want products hidden when out of stock.

Other stores want products visible but not purchasable.

Some stores allow backorders.

These rules should be defined clearly.

Method 2: Real-Time Stock Sync Using Interrupts

In an interrupt-based Woodoo setup, Odoo sends a stock update to WooCommerce when inventory changes.

This is usually handled through a webhook or custom Odoo automation.

The workflow may look like this:

  1. Stock is updated in Odoo.

  2. Odoo identifies the affected product.

  3. Odoo sends the product SKU and stock value to WooCommerce.

  4. Woodoo receives the request.

  5. Woodoo validates the request.

  6. Woodoo finds the matching WooCommerce product or variation.

  7. Woodoo updates the stock quantity and stock status.

  8. Woodoo logs the result.

This allows WooCommerce to receive stock updates as soon as they happen.

Interrupt Implementation Considerations

When using interrupts, the following decisions need to be made:

1. What event should trigger the update?

A stock update can happen for many reasons in Odoo.

For example:

  • Sale order confirmed

  • Delivery order completed

  • Purchase order received

  • Inventory adjustment

  • Manual stock update

  • POS order completed

  • Return processed

  • Manufacturing order completed

  • Stock transfer between warehouses

The integration needs to define which Odoo events should notify WooCommerce.

Not every internal stock movement should necessarily update WooCommerce.

For example, moving stock from one internal location to another may or may not affect stock available for WooCommerce.

2. What should Odoo send to WooCommerce?

The webhook payload should include enough information for WooCommerce to update the correct product.

At minimum, this may include:

Data

Purpose

SKU

Match to WooCommerce product or variation

Odoo Product ID

Optional direct reference

Stock Quantity

New stock value

Warehouse / Location

Confirms stock source

Timestamp

Shows when update happened

Event Type

Shows why stock changed

Signature / Token

Confirms request is trusted

The SKU is usually the most important identifier.

A good stock webhook should avoid relying only on product names because product names can change.

3. How should WooCommerce validate the update?

A webhook endpoint should be protected.

WooCommerce should not accept unauthenticated stock updates from any public request.

Woodoo should validate that the request came from the trusted Odoo system.

This may involve:

  • API key

  • Shared secret

  • Request signature

  • Token-based authentication

  • IP allowlisting

  • Timestamp validation

Without validation, the stock endpoint could become a security risk.

4. What happens if WooCommerce cannot process the update?

The webhook may fail.

For example:

  • SKU does not exist

  • Product is not published

  • Product is not stock managed

  • WooCommerce API is unavailable

  • Server timeout occurs

  • Invalid stock value is sent

  • Authentication fails

Woodoo should log the failure clearly.

A good error message might say:

Stock update failed because SKU TSHIRT-M-BLK could not be found in WooCommerce.

This is much more useful than:

Stock sync failed.

Failed stock updates should be visible and retryable where possible.

Using Both Polling and Interrupts Together

Polling and interrupts do not need to be treated as completely separate options.

For many businesses, the best setup is to use both.

Interrupts can be used for real-time updates.

Polling can be used as a safety net.

For example:

Method

Purpose

Interrupts

Update WooCommerce immediately when stock changes in Odoo

Polling

Run scheduled checks to catch any missed updates

This is a strong setup because webhooks can occasionally fail.

A scheduled polling sync can help identify and correct stock differences.

For example:

  • Odoo sends webhook when stock changes.

  • WooCommerce updates stock immediately.

  • Once per night, Woodoo runs a full stock reconciliation.

  • Any mismatched stock values are corrected.

This gives the business both speed and reliability.

Choosing the Right Stock Sync Method

The right method depends on the business.

A simple decision guide is:

Business Requirement

Recommended Method

Small store with low order volume

Polling

Store with one main sales channel

Polling

Store with many products but slow stock movement

Polling

Store with fast-moving products

Interrupts

Store with multiple sales channels

Interrupts

Store with low-stock products

Interrupts

Store using Odoo POS

Interrupts

Store using multiple warehouses

Interrupts, with clear warehouse rules

Business wants highest reliability

Interrupts plus scheduled polling

Business wants simplest setup

Polling

As a general rule:

Use polling when simplicity is more important than speed.

Use interrupts when speed and stock accuracy are more important than simplicity.

Use both when inventory accuracy is business-critical.

Common Stock Sync Problems

Stock sync problems usually come from unclear rules rather than the sync method itself.

Common problems include:

Problem

Likely Cause

WooCommerce stock is delayed

Polling interval is too long

WooCommerce oversells products

Stock changed in Odoo before next polling run

Product stock does not update

SKU mismatch between WooCommerce and Odoo

Variation stock does not update

Parent product used instead of variation SKU

Wrong stock quantity shown

Wrong Odoo warehouse or location used

Backorders behave incorrectly

WooCommerce stock status rules not mapped

Webhook fails

Authentication, payload, or endpoint issue

Duplicate stock updates

Both systems trying to control stock

Stock keeps changing back

Source-of-truth not defined

Sync slows down the site

Polling too many products too often

Most of these issues can be avoided by defining stock ownership, SKU rules, warehouse rules, and update frequency before implementation.

Stock Sync Checklist

Before enabling stock sync between WooCommerce and Odoo, confirm the following:

  • Is Odoo or WooCommerce the source-of-truth for stock?

  • Should stock sync from Odoo to WooCommerce?

  • Should stock sync from WooCommerce to Odoo?

  • Should stock sync be one-way or two-way?

  • Should polling or interrupts be used?

  • If polling is used, how often should it run?

  • If interrupts are used, what Odoo event should trigger the update?

  • Should polling also run as a backup reconciliation?

  • Which Odoo stock field should WooCommerce use?

  • Which Odoo warehouse should WooCommerce use?

  • Which Odoo location should WooCommerce use?

  • Should reserved stock be excluded?

  • Should forecasted stock be used?

  • Should backorders be allowed?

  • Should out-of-stock products be hidden?

  • Should stock update simple products only?

  • Should stock update product variations?

  • Are all SKUs unique between WooCommerce and Odoo?

  • Should failed stock updates be retried?

  • Who will monitor failed stock updates?


Share on social media