> For the complete documentation index, see [llms.txt](https://docs.smaq.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smaq.io/documentation/connections/woocommerce.md).

# WooCommerce

### What SMAQ pulls

* Orders with line items, totals, statuses
* Products and variants
* Customers (email-hashed for privacy)
* Refunds
* Coupons used

### What you'll need

* A WooCommerce store running on WordPress.
* A **REST API consumer key** + **consumer secret** with at least Read permission. Generate in WordPress admin → WooCommerce → Settings → Advanced → REST API.
* Your store's base URL (e.g. `https://shop.example.com`).

### Steps to connect

1. **Data Source → Add data source**.
2. Pick **WooCommerce**.
3. Paste:
   * **Store URL**
   * **Consumer key**
   * **Consumer secret**
4. Name and click **Connect**.

> **\[Screenshot needed]** WooCommerce connection form with store URL, key, and secret fields visible.

### Tips

* **Use Read permission only.** SMAQ never writes back to WooCommerce — Read is sufficient and safest.
* **HTTPS required.** WooCommerce's REST API rejects non-HTTPS requests. If your store is on HTTP, set up SSL first.
* **Pagination.** Stores with 10,000+ orders may take a few minutes to do the initial sync. Subsequent syncs are incremental.

### Troubleshooting

* **"401 Unauthorized"** — regenerate the consumer key/secret. WooCommerce sometimes invalidates older keys after plugin updates.
* **"Missing fields"** — some product/order fields depend on installed WooCommerce extensions. SMAQ pulls the standard schema; custom fields require [Custom endpoint](/documentation/connections/custom-endpoint.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.smaq.io/documentation/connections/woocommerce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
