Connecting WooCommerce to the rest of the business sounds simple. Orders go into Xero or Sage, stock comes back from the warehouse system, customers sync with the CRM. There's usually a plugin that claims to do it.
And for a straightforward shop, the plugin is often fine. The trouble starts when the business isn't straightforward, which is most of the businesses that end up asking me about it. These are the things that go wrong most often.
1. The data doesn't mean the same thing on both sides
WooCommerce has its own idea of what an order, a product, a customer and a tax rate are. So does Xero, so does Sage, and so does every ERP. They rarely match exactly.
Common examples:
- Variable products. WooCommerce treats a T-shirt in five sizes as one product with variations. The accounting or stock system may treat it as five separate items with their own codes.
- Tax. Prices entered including VAT in WooCommerce, but expected excluding VAT on the other side, with rounding differences of a penny that stop invoices reconciling.
- Customers. Guest checkouts, trade accounts and the same person ordering with two email addresses all need a decision about how they're matched.
- Discounts and shipping. A coupon in WooCommerce might need to become a separate line, a discount on each item, or a credit note, depending on how the accounts are kept.
Most integration problems aren't bugs in the code. They're decisions about mapping that nobody made deliberately.
2. Nobody decided which system is in charge
For every piece of data, one system has to be the source of truth. Is the stock level right in WooCommerce or the warehouse system? Are prices set in the shop or the ERP? If both can be edited, and both sync to each other, you'll eventually get the two fighting, with changes overwriting each other.
Before building anything, I write down which system owns each type of data and which direction it flows. It's the most useful hour in the whole project.
3. It works until something fails, then fails silently
APIs go down. Tokens expire. Xero has rate limits. Someone renames a product code. A good integration expects all of this: it retries, it records what failed and why, and it tells someone.
A poor one just stops. Orders stop reaching the accounts, nobody notices for a fortnight, and then someone spends a day re-keying them by hand.
At minimum, every integration should have a log of what was sent and what came back, a way to retry failures, and an alert when something has been failing for longer than it should.
4. Everything happens in real time, on the checkout
Some plugins push the order to the accounting system the moment the customer clicks Pay. If the accounting API is slow or down, the customer waits, or the checkout errors.
Integrations should run in the background, on a queue. The customer's order completes instantly, and the sync happens a few seconds later, with retries if it needs them.
5. Webhooks nobody can see
Many integrations rely on webhooks: one system calling the other when something changes. When those break, it's very hard to tell why without seeing what was actually sent. The webhook inspector gives you a temporary address that shows every webhook sent to it, which is useful for checking what a service is really sending before you build anything around it.
Plugin or custom integration?
A well-supported plugin is the right answer when your process matches what it expects: standard products, standard tax, one direction of sync. Use it, and save the money.
A custom integration starts to make sense when:
- You've bent your process to fit the plugin and it's costing time every week
- You need data the plugin doesn't handle: trade pricing, bundles, custom fields, multiple warehouses
- Failures are going unnoticed and being fixed by hand
- You're using two or three plugins together to get one job done
A custom integration doesn't have to be huge. Often it's a focused piece of code that handles your specific mapping, runs on a queue, logs everything and alerts when it fails.
Getting it right
I build and fix integrations between WooCommerce, Laravel applications and accounting, stock and CRM systems. If yours is unreliable, or you're about to start one and want to get the mapping right first, have a look at API integrations or get in touch with what you're connecting and what's going wrong.