WooCommerce Order Webhooks & Invoices
Connect your WooCommerce store to WaDesk and every order — and every status change — is pushed to WaDesk in real time over a webhook. WaDesk then sends the customer (or you, or both) a WhatsApp message for that event, including the invoice. No polling, no manual export.
How it works in one line: WooCommerce fires a webhook → WaDesk matches it to the automation you armed for that order status → it sends your chosen template on WhatsApp, with live order variables like {{invoice_url}} filled in.
Step 1 — Connect Your Store
You connect with WooCommerce's built-in REST API keys — no coding.
- In WordPress admin, go to WooCommerce → Settings → Advanced → REST API and click Add key.
- Give it a description, set permissions to Read/Write, and click Generate API key. Copy the Consumer key and Consumer secret.
- In WaDesk, open WooCommerce and click Connect. Enter your Store URL, the Consumer key, and the Consumer secret, then Test and Save.
On save, WaDesk auto-registers the order webhooks on your store (order.created, order.updated, and more) and generates a unique webhook secret for your store, so only your store can post to your WaDesk endpoint.
Your webhook endpoint is https://your-wadesk-domain/woocommerce/webhook/<secret>. WaDesk sets this up for you; you don't paste it anywhere manually when using the auto-connect.
Step 2 (recommended) — Install the Companion Plugin
WooCommerce's REST webhooks can't send everything — notably the PDF invoice link and a few extra order fields. The optional WaDesk companion plugin fills that gap.
- On the WaDesk WooCommerce screen, click Download plugin. The ZIP is pre-configured with your store's webhook URL and secret — nothing to edit.
- In WordPress, go to Plugins → Add New → Upload Plugin, upload the ZIP, and Activate.
With the plugin active, WaDesk receives the real invoice PDF URL and richer order data, so {{invoice_url}} resolves to the actual downloadable invoice.
Step 3 — Arm Your Order Automations
On the WaDesk WooCommerce screen, each event has its own row. Turn on the ones you want, pick the WhatsApp template, map the variables, and choose who it goes to. Available events:
- Order lifecycle —
order placed,processing,completed,on-hold,cancelled,refunded,failed. A single order moving through statuses fires each armed step with its own message. - Cash on Delivery (COD) —
COD confirm(ask the customer to confirm),COD → prepaid(nudge to pay online), and risk scoring for suspicious COD orders. - Back in stock — notify customers who joined a product's waitlist.
- Abandoned cart — multi-step recovery nudges.
- Win-back and review reward broadcasts.
Per event you can set:
- Template — which approved message to send.
- Send to —
customer,admin, orboth(with an admin number). - Delay — wait N seconds before sending (e.g. a 1-hour completed-order follow-up).
- Variable map — bind template placeholders to order fields.
Sending the Invoice ({{invoice_url}})
The headline of this integration: send the invoice on WhatsApp automatically when an order is placed or completed.
- Every order automation exposes the merge tag
{{invoice_url}}. Put it in your template (as a link, or on a media/document button) and WaDesk fills it per order. - What it points to: a real PDF invoice from your store's invoice plugin when one exists — e.g. WooCommerce PDF Invoices & Packing Slips, Print Invoices, or YITH — forwarded by the WaDesk companion plugin. If no invoice plugin is installed, it gracefully falls back to the customer's order page (where the invoice/download lives), so the tag always resolves.
- A companion field
{{invoice_is_pdf}}is1when the link is a direct PDF and0when it's the order page — handy if you want to word the message differently.
Typical setup: arm order completed → template “Thanks for your order! Here's your invoice: {{invoice_url}}” → send to customer. Done — every completed order gets its invoice on WhatsApp.
Order Variables You Can Use
Alongside {{invoice_url}}, order automations expose the usual order fields for your templates — for example the customer name, order number and total, currency, status, and the order URL. Map them to your template placeholders in the event's Variable map. The same variables are available on the flow builder's WooCommerce trigger, so you can branch and follow up in an automation instead of a single message.
Verify It's Working
- Place a test order in WooCommerce (or move an existing order to a status you armed).
- Within a moment the customer number should receive the WhatsApp message with the invoice link.
- Check the WaDesk WooCommerce activity log — each received webhook and the message it triggered is recorded, so you can see exactly what fired.
Use a real number you control for testing — these are live WhatsApp sends.
Troubleshooting
- No message on an order — confirm the event row is on and has a template selected, the store's webhook is still active (WooCommerce → Settings → Advanced → Webhooks), and the customer's phone number is present on the order.
{{invoice_url}}shows the order page, not a PDF — install a PDF-invoice plugin and the WaDesk companion plugin; without them WooCommerce has no invoice file to link to.- Connection test fails — re-check the Store URL (must be reachable over HTTPS) and that the REST key permission is Read/Write.
- Duplicate messages — a status-change automation fires once per status; make sure you didn't arm both a generic and a per-status template for the same transition.