Connecting WooCommerce to a CRM: webhooks vs polling
Getting orders and customers into a CRM sounds easy and fails in quiet ways. This guide compares webhooks and polling and shows how to make the connection reliable.
A store and a CRM each hold part of the picture of a customer. Connecting them means orders, contacts and statuses flow from one to the other without anyone copying data by hand. It looks like a small task, and it usually fails quietly, with a few orders missing and nobody noticing for weeks. Here is how I connect WooCommerce to a CRM so it stays reliable.
Decide what has to move
Start with the data and the direction.
- Customers: create or update a contact when someone orders or registers.
- Orders: record each order against the contact, with its total, items and status.
- Status changes: reflect paid, shipped, refunded and cancelled so the CRM matches reality.
- The other direction, if needed: CRM information flowing back to the store.
Write down which system is the source of truth for each field. Without that, updates overwrite each other.
Three ways to get changes out of WooCommerce
- WooCommerce webhooks. WooCommerce can send a message to a URL when an order or customer is created or updated, signed with a secret. They need no custom code in the store.
- PHP hooks. A small plugin can run code when WooCommerce fires events such as a new order, a status change or a completed payment, and call the CRM or queue a job. This gives the most control over timing and data.
- Polling the REST API. A scheduled job asks WooCommerce for orders changed since the last run and processes them.
Webhooks vs polling
Webhooks are fast. The CRM learns about an order within seconds and there is no wasted work. The cost is weaker delivery guarantees: messages can be delayed, repeated or lost if your receiver is down or slow.
Polling is slower and a little wasteful, but it is dependable. If it fails, the next run picks up the missed changes, because it asks for everything since the last success.
The best answer is both. Use webhooks or hooks for speed and a scheduled poll as a safety net that catches and reconciles anything missed.
Build the receiver properly
A webhook receiver should be short and strict.
- Verify the signature before trusting the request.
- Return a success response quickly and do the real work in the background.
- Push the event onto a queue, so a spike or a CRM outage does not lose it. WooCommerce ships with Action Scheduler, which suits this.
- Store the event or order ID and ignore repeats, so processing twice has no effect.
- Do not assume order. A status update can arrive before the creation message, so rely on the current state fetched from WooCommerce when it matters.
Map the fields once, carefully
Most CRMs have their own idea of a contact, a deal and an order. Define the mapping in one place.
- Match contacts on a stable key, usually email, and update the existing record instead of creating a duplicate.
- Decide how to handle guests, repeat customers and changed emails.
- Convert statuses explicitly, for example from a WooCommerce status to a deal stage.
- Handle money precisely: currency, tax, shipping and discounts.
Handle failures on purpose
The CRM will sometimes be down, slow or rate-limited, and your code has to cope.
- Retry temporary errors with growing delays and a limit.
- Respect rate limits and wait when the API tells you to.
- Move events that keep failing to a list a person can review and replay, instead of retrying forever.
- Never block the customer's checkout on a CRM call. Do it in the background.
Respect consent and privacy
Sending customer data to a CRM, and especially to marketing tools, carries obligations. Only sync what you have a right to use, store marketing consent as its own field and make sure unsubscribes flow back to the store. Keep personal data out of logs where you can.
Log and monitor
An integration you cannot see into will fail silently. Record each event with an ID, what was sent, the response and the outcome, so you can trace one order end to end. Alert when failures rise or when the queue stops moving, and keep a simple report that compares the number of paid orders in WooCommerce with the number recorded in the CRM.
Need it built?
I connect WooCommerce to CRMs and email platforms with signed webhooks, queued processing, safe retries and logging, and I tie the data to tracking so that reports agree. Describe your store and your CRM and I can suggest how to connect them. My guide to REST API design for business integrations covers the underlying patterns in more depth.
Frequently asked questions
What is the best way to connect WooCommerce to a CRM?
Use webhooks or WooCommerce hooks to send changes as they happen, process them through a queue and add a scheduled poll to catch anything missed. Together they give speed and reliability.
What are WooCommerce webhooks?
They are messages WooCommerce sends to a URL you choose when something happens, such as an order being created or updated, signed with a secret so the receiver can verify them.
How do I avoid duplicate contacts in the CRM?
Match on a stable identifier such as email or an external ID and update the existing record instead of creating a new one every time an order arrives.
Why did an order never reach my CRM?
Typical causes are a webhook that timed out, an endpoint that returned an error with no retry, a status change that was not handled or an API rate limit with no backoff. Logging every attempt shows which.