Home/Insights/Case studies

Where e-commerce data breaks: WooCommerce, Odoo and payments

MNBy Madlin Nabil, Senior WordPress Developer & MarTech Specialist··4 min read

Marketing reports trust the numbers they receive. When orders stop reaching the ERP, or payments fail for one group of customers, the reports still look normal; they are just wrong. On a WooCommerce store I’ve worked on, I traced several of these breaks between WooCommerce, the Odoo ERP and the payment gateways. These are the patterns I now check first.

In short
  • WooCommerce webhooks only fire when something is saved, so old orders don’t sync on their own.
  • An integration can return “200 OK” and still reject the data. The real error is on the receiving side.
  • Monitoring has to check that the connection exists, not only that it hasn’t failed.
  • For payment problems, compare by device and browser, and follow the gateway’s own log.

WooCommerce → Odoo: how the sync works

There was no Odoo plugin on the WordPress side. Orders, customers, products and coupons reach Odoo through WooCommerce webhooks, and Odoo also reads from the WooCommerce REST API.

Case 1: old orders that never arrived

Some older orders were missing from Odoo. The reason was simple once I found it: a webhook fires only when an order is created or updated. Orders last saved before the webhooks were set up had never been sent. The fix was to update those orders so the webhook fired again.

One order still didn’t appear. WooCommerce showed the delivery as successful, because Odoo answers 200 OK to every webhook. The real error was inside Odoo’s order queue: the order was older than the “import orders after” date in the connector settings. After moving that date back temporarily and reprocessing the queue, the order synced.

Case 2: all webhooks deleted

Later, orders suddenly stopped reaching Odoo. In the logs I found that the ERP connector itself had deleted all of its webhooks in one batch request, after it was pointed at a different copy of the site. The store kept taking orders normally, so nothing looked wrong on the website. I documented the timeline, the cause and the recovery steps: re-create the webhooks from the Odoo side and import the missing orders from the exact time they stopped.

The lesson: our monitoring was watching for failed deliveries and a growing queue, and a deleted webhook produces neither. A good check also confirms that the expected webhooks still exist.

Payments

On the payment side I integrated Paymob and fixed an error in its description, and worked with the installment providers the store offers, including valU, Souhoola, Forsa and CashCall. PayTabs handles card payments through its hosted payment page.

Case 3: card payments failing on iPhones only

It started with one order where the card payment page didn’t work on an iPhone. Looking at that one order wasn’t enough, so I went through the gateway plugin’s log. Every attempt writes a line when the payment page is created, and a successful one adds a “return” and a “callback” line. I grouped the attempts that had no return or callback.

The pattern was clear: from a specific date, card payments failed mostly on iPhones, in every browser that runs on Apple’s WebKit engine, while Android and desktop worked normally. Our firewall logs showed that the gateway’s return and callback requests were allowed. The problem was happening after the customer left our site, so I prepared the evidence for the gateway’s support team.

What this means for marketing

  • Revenue in the ERP is the revenue management sees. Missing orders make campaigns look worse than they were.
  • A failure in one segment hides in the totals. If iPhone users can’t pay, conversion drops a little overall, and the ads for that audience look like they stopped working.
  • Data quality needs an owner. Someone has to know where each order goes, how to check it arrived, and what to do when it didn’t.

My checklist for e-commerce data flows

  1. List every system an order goes to, and how (webhook, API pull, plugin).
  2. Check that the webhooks exist and are active, not only that their last delivery succeeded.
  3. Read errors on the receiving side, not just the sender’s status code.
  4. Split payment results by gateway, device and browser.
  5. Write down the timeline for every incident, so it can be fixed and prevented.

FAQ

Why are some WooCommerce orders missing in Odoo?

Common reasons: the orders were last saved before the webhooks were created, the connector rejected them (for example an “import orders after” date), or the webhooks were deleted or disabled.

How do I resend an old order to Odoo?

Updating the order in WooCommerce fires the webhook again. If Odoo still rejects it, check the error in Odoo’s order queue log.

How can I tell if payments fail only on some devices?

Group failed attempts in the gateway log by device and browser, and compare them with successful ones. Analytics can show the same split if purchase tracking is set up correctly.

Related insights

See all 23 articles →

Need this for your store?

I build and fix WordPress and WooCommerce sites with marketing in mind: tracking, speed, checkout and integrations.