> ## 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 product, variation, and bulk update abilities

> Manage WooCommerce products, attributes, variations, and run bulk price or field updates across your catalog using Maxi AI Core Pro abilities.

WooCommerce product abilities let you read and update your store catalog — from retrieving a single product's pricing and stock data to converting product types, building out variation matrices, and applying bulk price changes across hundreds of items in one call.

<Info>
  All WooCommerce abilities require WooCommerce to be active on your site. If WooCommerce is not installed, every ability in this group returns an error.
</Info>

## All product abilities

| Ability                       | Description                                                                             | Capability      | Plan |
| ----------------------------- | --------------------------------------------------------------------------------------- | --------------- | ---- |
| `maxi/get-product`            | Get a product with full WooCommerce data — prices, stock, attributes, and variations.   | `edit_products` | Pro  |
| `maxi/list-products`          | List products with WooCommerce-specific filters.                                        | `edit_products` | Pro  |
| `maxi/update-product`         | Update product data. Send only the fields you want to change.                           | `edit_products` | Pro  |
| `maxi/get-product-attributes` | Get attribute configuration for a product.                                              | `edit_products` | Pro  |
| `maxi/set-product-attributes` | Set product attributes with automatic taxonomy detection.                               | `edit_products` | Pro  |
| `maxi/create-variation`       | Create a variation with an attribute combination, price, and stock.                     | `edit_products` | Pro  |
| `maxi/update-variation`       | Update a variation's attributes, price, stock, SKU, dimensions, or image.               | `edit_products` | Pro  |
| `maxi/delete-variation`       | Delete a product variation permanently.                                                 | `edit_products` | Pro  |
| `maxi/list-variations`        | List variations for one or more variable products.                                      | `edit_products` | Pro  |
| `maxi/set-product-type`       | Convert a product between types (simple, variable, grouped, external).                  | `edit_products` | Pro  |
| `maxi/bulk-update-prices`     | Update prices for multiple products or variations with exact or percentage adjustments. | `edit_products` | Pro  |
| `maxi/bulk-update-products`   | Bulk update products and variations across pricing, stock, SKU, and more.               | `edit_products` | Pro  |

## Products

### maxi/get-product

Get full WooCommerce data for a single product — prices, stock level, attributes with taxonomy and term details, and a list of variation IDs. For variable products the response includes a `price_range` object with `regular_min`, `regular_max`, `sale_min`, `sale_max`, `min`, and `max` fields, so you can summarize pricing without fetching every variation individually. For simple, grouped, and external products `price_range` is `null`.

```json theme={null}
{ "product_id": 123 }
```

### maxi/list-products

List products with WooCommerce-specific filters. Each item in the response includes a `price_range` aggregate for variable products, so price-summary queries do not need a follow-up call to `list-variations`.

```json theme={null}
{
  "type": "variable",
  "stock_status": "instock",
  "per_page": 20
}
```

<Tip>
  All `list-*` abilities accept `orderby`, `order`, `per_page`, and `page`. For products, `orderby` also supports `price`. See [listing conventions](/abilities/overview#listing-conventions) for the full reference.
</Tip>

### maxi/update-product

Update WooCommerce product data — prices, stock quantity, SKU, dimensions, or visibility. Send only the fields you want to change; fields you omit are left untouched.

```json theme={null}
{
  "product_id": 123,
  "regular_price": "49.99",
  "stock_quantity": 100
}
```

<Note>
  Always read the product with `maxi/get-product` before updating fields you haven't seen in the current session. This ensures you do not overwrite data unintentionally.
</Note>

## Variations

### maxi/get-product-attributes

Get the attribute configuration for a product — taxonomy attributes (`pa_*`), custom attributes, available terms, and which attributes are used for variations.

### maxi/set-product-attributes

Set product attributes with automatic taxonomy detection. For taxonomy attributes (`pa_*`), the `options` array accepts term IDs, slugs, or names. Existing terms are resolved by ID, then slug, then name before any new term is created, which prevents duplicate slug suffixes.

```json theme={null}
{
  "product_id": 123,
  "attributes": [
    {
      "name": "pa_color",
      "options": ["red", "blue"],
      "variation": true
    }
  ]
}
```

### maxi/create-variation

Create a new variation for a variable product. Provide the parent product ID, an attribute combination, and any pricing or stock data you want to set on creation.

```json theme={null}
{
  "product_id": 123,
  "attributes": { "pa_color": "red" },
  "regular_price": "39.99",
  "stock_quantity": 50
}
```

### maxi/update-variation

Update a variation's attributes, price, stock level, SKU, dimensions, or image. Send only the fields you want to change.

### maxi/delete-variation

Delete a product variation permanently. This action cannot be undone — the variation and its data are removed from the database.

<Warning>
  `maxi/delete-variation` is permanent. There is no trash for variations. Verify you have the correct `variation_id` before calling this ability.
</Warning>

### maxi/list-variations

List variations for one or more variable products. Pass a single `product_id` or a batch of up to 20 IDs in `product_ids`. In batch mode, results are returned as a flat list and each item carries a `product_id` field identifying its parent. Pagination applies across the combined list.

```json theme={null}
{
  "product_ids": [100, 101, 102]
}
```

### maxi/set-product-type

Convert a WooCommerce product between types: `simple`, `variable`, `grouped`, or `external`. Conversion is applied in place on the existing product.

## Bulk operations

### maxi/bulk-update-prices

Update prices for multiple products or variations in one call. You can apply an exact amount or a percentage adjustment to all items in the list.

```json theme={null}
{
  "updates": [
    {"product_id": 100, "adjustment": "+10%"},
    {"product_id": 101, "adjustment": "+10%"},
    {"product_id": 102, "adjustment": "+10%"}
  ]
}
```

<Tip>
  Use `adjustment_type: "percentage"` to raise or lower prices by a relative amount (pass a negative value to decrease). Use `adjustment_type: "exact"` to set a fixed price on every item in the list.
</Tip>

### maxi/bulk-update-products

Bulk update products and variations across pricing, stock, shipping, tax, SKU, title, slug, visibility, menu order, reviews policy, gallery images, short description, upsell and cross-sell IDs, and variation attributes. Handles up to 500 items per call.

This ability accepts three input shapes depending on your goal:

<AccordionGroup>
  <Accordion title="Broadcast the same changes to a list of IDs">
    Pass `ids[]` and an `apply` object. Every item in the list receives the same field changes.

    ```json theme={null}
    {
      "ids": [100, 101, 102],
      "apply": {
        "stock_status": "instock",
        "catalog_visibility": "catalog"
      }
    }
    ```
  </Accordion>

  <Accordion title="Apply per-item changes">
    Pass `updates[]` — an array where each entry pairs an `id` with its own change set. Use this when different items need different values.

    ```json theme={null}
    {
      "updates": [
        { "id": 100, "regular_price": "29.99" },
        { "id": 101, "regular_price": "39.99", "stock_quantity": 25 }
      ]
    }
    ```
  </Accordion>

  <Accordion title="Expand to all variations of a parent product">
    Pass `parent_id` and an `apply` object. The ability resolves every variation of that parent and applies the changes to all of them.

    ```json theme={null}
    {
      "parent_id": 123,
      "apply": {
        "stock_status": "instock"
      }
    }
    ```
  </Accordion>
</AccordionGroup>

<Note>
  Deep semantics — atomicity, skip rules, and clearing behavior — are delivered in the ability's rule body on the first call to `maxi/bulk-update-products`. Fetch the rule via `maxi/get-ability-rule` before your first write.
</Note>
