> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maxicore.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# WooCommerce order management and status update abilities

> Create, retrieve, filter, and update WooCommerce orders, change order statuses, and add private or customer-visible notes using Maxi AI Core.

Order management abilities let you interact with WooCommerce orders through your AI agent — creating orders programmatically, fetching full order details including line items and billing addresses, filtering orders by status or date, updating order statuses, and adding notes visible to your team or your customers. All order abilities require an active **Pro** plan, **WooCommerce** to be installed and active, and the `manage_woocommerce` capability on the connected WordPress user.

<Info>
  All WooCommerce order abilities require WooCommerce to be active and a **Pro** plan license. The connected WordPress user must have the `manage_woocommerce` capability — typically assigned to the **Shop Manager** or **Administrator** role.
</Info>

## All order abilities

| Ability                    | Description                                                             | Capability           | Plan |
| -------------------------- | ----------------------------------------------------------------------- | -------------------- | ---- |
| `maxi/create-order`        | Create an order with line items, customer, addresses, and status.       | `manage_woocommerce` | Pro  |
| `maxi/get-order`           | Get full order details including items, totals, addresses, and payment. | `manage_woocommerce` | Pro  |
| `maxi/list-orders`         | List orders with filters for status, customer, and date range.          | `manage_woocommerce` | Pro  |
| `maxi/update-order-status` | Change an order's status with an optional note.                         | `manage_woocommerce` | Pro  |
| `maxi/add-order-note`      | Add a private or customer-visible note to an order.                     | `manage_woocommerce` | Pro  |

## Key ability examples

### maxi/list-orders

List orders and filter by status, date range, customer, or any supported parameter. Combine filters to narrow results for reporting or bulk operations.

```json theme={null}
{
  "status": "processing",
  "date_after": "2025-01-01",
  "date_before": "2025-12-31",
  "per_page": 20
}
```

<Tip>
  To analyze revenue, top products, or order trends, use `maxi/list-orders` with date filters and compute your metrics from the returned data. There are no dedicated WooCommerce reporting commands — all analytics work from order data.
</Tip>

### maxi/get-order

Retrieve full details for a single order — line items, quantities, totals, billing and shipping addresses, payment method, and order meta.

```json theme={null}
{ "order_id": 456 }
```

### maxi/create-order

Create a new order with line items, a customer ID, billing address, and an initial status. All fields beyond `line_items` are optional and can be omitted when not needed.

```json theme={null}
{
  "status": "pending",
  "customer_id": 5,
  "line_items": [
    { "product_id": 123, "quantity": 2 }
  ],
  "billing": {
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "jane@example.com"
  }
}
```

### maxi/update-order-status

Change an order's status and optionally attach a note explaining the transition. The note is added to the order's internal history.

```json theme={null}
{
  "order_id": 456,
  "status": "completed",
  "note": "Order fulfilled and shipped"
}
```

WooCommerce order statuses:

| Status       | Meaning                                        |
| ------------ | ---------------------------------------------- |
| `pending`    | Order received, awaiting payment               |
| `processing` | Payment confirmed, fulfillment in progress     |
| `on-hold`    | Awaiting manual review or payment verification |
| `completed`  | Order fulfilled and closed                     |
| `cancelled`  | Order cancelled by customer or admin           |
| `refunded`   | Order refunded                                 |
| `failed`     | Payment failed or declined                     |

### maxi/add-order-note

Add a note to an order. Set `customer_note` to `true` to make the note visible to the customer in their order history; leave it `false` (the default) for an internal-only note.

```json theme={null}
{
  "order_id": 456,
  "note": "Customer requested gift wrapping",
  "customer_note": false
}
```

<Note>
  Internal notes (where `customer_note` is `false`) appear only in the WooCommerce admin order screen. Customer-facing notes (where `customer_note` is `true`) are emailed to the customer and shown in their account's order history.
</Note>

## Revenue reporting

WooCommerce does not expose dedicated analytics commands through the MCP adapter. To answer questions about revenue, top-selling products, or order trends, use `maxi/list-orders` with date filters and compute the metrics from the returned data. For per-product lifetime sales figures, read the `total_sales` meta value via `maxi/get-meta` on the product post.

<Warning>
  Do not attempt to run `wc report` commands — that WP-CLI subcommand does not exist in WooCommerce. Use `maxi/list-orders` with date filters for all revenue and order trend analysis.
</Warning>
