Pull live order data from your WooCommerce store into a WhatsApp chatbot. When a customer sends their order number, your bot calls the WooCommerce REST API, retrieves the current status and total, and replies instantly, with no support agent required.
Before following this guide, read the External API Request step foundation guide. It explains every field in the step interface so this guide can stay focused on WooCommerce-specific values.
WooCommerce uses a Consumer Key and Consumer Secret pair for API access. These are generated inside your WordPress dashboard.
ck_) and Consumer Secret (starts cs_).WooCommerce displays the Consumer Secret exactly once when you generate the key. If you navigate away before copying it, you must delete the key and generate a new one. Store both values in a password manager immediately.
WooCommerce REST API Keys: developer.woocommerce.com/docs/apis/rest-api/authentication
In your WA.Expert chatbot flow, collect the customer's order ID (the numeric ID from their confirmation email, not the #1012 style number). Store it as {{order_id}}. Then add an External API Request step:
| Field | Value | Notes |
|---|---|---|
| Select Method | GET | Reading an existing order. |
| Request URL | https://yourstore.com/wp-json/wc/v3/orders/{{{order_id}}} | Replace yourstore.com with your actual domain. {{{order_id}}} is the variable from the previous chatbot step. |
| Select Auth Type | Basic Auth | WooCommerce uses HTTP Basic Authentication. WA.Expert's Basic Auth option Base64-encodes the key:secret pair automatically. |
| Username (Basic Auth) | ck_xxxxxxxxxxxxxxxx | Your Consumer Key, copied from WooCommerce > Settings > Advanced > REST API. |
| Password (Basic Auth) | cs_xxxxxxxxxxxxxxxx | Your Consumer Secret. Treat this like a password. Never share it or put it in client-side code. |
| Content-Type | application/json | Include on all WooCommerce API requests. |
| Select Body Type | None | GET requests carry no body. |
| Choose Response Type | JSON | WooCommerce returns structured JSON. |
The API URL takes a numeric order ID (e.g. 1547), not the customer-facing order number (#1012). To look up by the human-readable number, search first: GET /wp-json/wc/v3/orders?number=1012 and extract the id field from the result.
The WooCommerce REST API only works when WordPress pretty permalinks are enabled. Go to WordPress Settings > Permalinks and choose any option other than Plain. Default (plain) permalinks return a 404 on API routes.
A successful WooCommerce order response looks like this:
{
"id": 1547,
"number": "1012",
"status": "processing",
"date_created": "2026-06-20T10:30:00",
"total": "1299.00",
"currency": "INR",
"billing": {
"first_name": "Priya",
"last_name": "Sharma",
"phone": "9820000001",
"city": "Mumbai"
},
"line_items": [
{
"name": "Classic Cotton Kurta",
"quantity": 2,
"total": "1299.00"
}
],
"shipping_lines": [
{
"method_title": "Free Shipping"
}
]
}Map these response paths to variables in the External API Request step:
| Variable name | Response path | Example value |
|---|---|---|
| order_number | number | 1012 |
| order_status | status | processing |
| order_total | total | 1299.00 |
| customer_name | billing.first_name | Priya |
| item_name | line_items[0].name | Classic Cotton Kurta |
| item_qty | line_items[0].quantity | 2 |
| shipping_method | shipping_lines[0].method_title | Free Shipping |
WooCommerce order status values: pending, processing, on-hold, completed, cancelled, refunded, failed. Map these to human-readable labels in your bot reply.
If the customer messaged you first within the last 24 hours, your reply is a free service conversation. Send the order status in that window. If initiating a proactive update (e.g. dispatch alert), use an approved Utility template at Rs. 0.115 per message.
1. Bot: "Please send your WooCommerce order ID.
You can find it in your confirmation email. It is a number like 1547."
2. Customer replies: 1547
3. Bot stores value as {{order_id}}
4. External API Request step fires:
GET https://yourstore.com/wp-json/wc/v3/orders/1547
Auth: Basic ck_xxx:cs_xxx
5. Response mapped:
order_number = "1012"
order_status = "processing"
order_total = "1299.00"
customer_name = "Priya"
item_name = "Classic Cotton Kurta"
6. Bot replies:
"Hi Priya, here is your order update:
Order #1012
Status: Processing
Item: Classic Cotton Kurta
Total: Rs. 1,299.00
Your order is being prepared. You will get
a dispatch notification shortly."| Symptom | Likely cause | Fix |
|---|---|---|
| 401 Unauthorized | Wrong Consumer Key or Secret | Re-check both values. The ck_ and cs_ must match the same key pair. Generate a new key if the secret was lost. |
| 404 Not Found on /wp-json/wc/v3/ | Pretty permalinks disabled | Go to WordPress Settings > Permalinks, choose any option other than Plain, save. |
| 404 on /orders/{id} | Order ID does not exist | Confirm the customer sent a numeric ID, not the # order number. Add a fallback branch for empty responses. |
| 'Consumer key is missing' error | Server not parsing Authorization header | Add keys as query string instead: ?consumer_key=ck_xxx&consumer_secret=cs_xxx |
| 403 Forbidden | Key has insufficient permission | The key was created with Read-only but the endpoint needs more. For order lookup, Read is sufficient. Check you are not accidentally calling a write endpoint. |
| ModSecurity 501 error | Server firewall blocking | Contact your host to whitelist the REST API path, or switch to query string auth. |
Shopify Admin API order lookup: X-Shopify-Access-Token, single-header auth, shpat_ token.
Read guide →Master every field in WA.Expert's HTTP action step before building any integration.
Read foundation guide →Generate a Razorpay payment link inside a WhatsApp chatbot and collect payment.
Read guide →Free trial, no credit card required. And if you ever get stuck, we are the only platform in India that answers you live on WhatsApp.