---
name: woocommerce
description: "Manage a WooCommerce store: products, orders, customers, stock, refunds, coupons, and store analytics. Use when the user asks about orders, products, customers, revenue, stock levels, refunds, or any ecommerce operation. Trigger when the user mentions order numbers, SKUs, product names, customer emails, or WooCommerce-specific tasks. Do NOT trigger when WooCommerce is not installed — all tools will return an error."
---

# WooCommerce Skill

## Available Tools

| Tool | When to use |
|---|---|
| `wc_get_store_stats` | Dashboard overview: revenue, orders, top products, stock health. |
| `wc_get_orders` | Search and filter orders by status, date, or customer. |
| `wc_get_order` | Full detail for a single order including items, notes, and refunds. |
| `wc_update_order_status` | Change order status and optionally add a note in one call. |
| `wc_add_order_note` | Add an internal or customer-facing note without changing status. |
| `wc_create_refund` | Issue a manual refund record on an order. |
| `wc_get_customers` | Search customers by name or email with spend/order counts. |
| `wc_get_customer` | Full profile + recent order history for a single customer. |
| `wc_search_products` | Search and filter products by keyword, category, or stock. |
| `wc_get_product` | Full detail for a single product including variations and SEO. |
| `wc_update_product` | Update product name, price, description, stock, status, or image. |
| `wc_update_stock` | Set, increase, or decrease stock quantity on a product or variation. |
| `wc_bulk_update_products` | Batch-update up to 50 products at once. |
| `wc_create_product` | Create a new simple or variable product (status defaults to draft). |
| `wc_get_stock_report` | Products that are out of stock, low stock, or on backorder. |
| `wc_get_categories` | Product category tree with counts and hierarchy. |
| `wc_manage_category` | Create, update, or delete a product category. |
| `wc_get_coupons` | List coupons with usage stats and expiry. |
| `wc_create_coupon` | Create a new discount coupon with rules and restrictions. |

## Workflows

### Store health check

1. Call `wc_get_store_stats` (period: `month`) for revenue overview.
2. Call `wc_get_stock_report` to surface out-of-stock and low-stock items.
3. Report revenue, order counts, top products, and any stock alerts.

### Handle a customer support request

1. Call `wc_get_customers` with the customer email to get their ID.
2. Call `wc_get_customer` with the ID for full profile + recent orders.
3. Call `wc_get_order` on the relevant order for full details.
4. Take action: `wc_update_order_status`, `wc_add_order_note`, or `wc_create_refund`.
5. If needed, call `send_email` to notify the customer (requires Pro Email channel).

### Process a refund

1. Call `wc_get_order` to confirm the order total and refund history.
2. Calculate the refundable amount (`total` minus already refunded).
3. Confirm the refund amount and reason with the user.
4. Call `wc_create_refund` — note this creates a **manual record only** (no gateway charge).
5. Call `wc_add_order_note` with `customer_note: true` to notify the customer.

### Update product pricing or stock

1. Call `wc_get_product` or `wc_search_products` to confirm the product ID.
2. For price: call `wc_update_product` with `regular_price` / `sale_price`.
3. For stock: call `wc_update_stock` with `operation: "set"` or `"increase"/"decrease"`.
4. Confirm the updated values from the return data.

### Bulk price update

1. Call `wc_search_products` with a category or keyword to build the product ID list.
2. Confirm the list with the user before proceeding.
3. Call `wc_bulk_update_products` with the changes — cap at 50 products per call.

## Quality Rules

- **Always get order/product details first** — never update without reading the current state.
- **`wc_create_refund` is manual** — it does NOT trigger a Stripe/PayPal refund; tell the user to do that in their payment gateway dashboard if required.
- **Confirm before destructive ops** — status changes, refunds, and bulk updates need user confirmation.
- **Variable products** — `wc_update_product` cannot set price on variable products; use `wc_update_stock` with a variation ID for stock, and inform the user that pricing must be done per-variation.
- **New products default to draft** — `wc_create_product` sets `status: draft` by default; remind the user to publish when ready.
- **Never set stock on a parent variable product** — always use the variation ID with `wc_update_stock`.
