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

# WooCommerce

> Connect your WooCommerce store to Adapt to analyze orders, products, and customers

Connect WooCommerce to Adapt with a read-only REST API key so Adapt can read your store data.

## Set up credentials

<Steps>
  <Step title="Open REST API settings">
    In your WordPress admin, go to **WooCommerce > Settings > Advanced > REST API**.
  </Step>

  <Step title="Add a new key">
    Click **Add key**.
  </Step>

  <Step title="Configure the key">
    Enter a **Description** (for example, "Adapt"), choose a **User** with access
    to the data you want to read, and set **Permissions** to **Read**.
  </Step>

  <Step title="Generate the key">
    Click **Generate API key**. WooCommerce displays a **Consumer key**
    (starts with `ck_`) and a **Consumer secret** (starts with `cs_`).
  </Step>

  <Step title="Copy your keys">
    Copy both values now. The Consumer secret is hidden once you leave the page.
  </Step>

  <Step title="Note your store URL">
    Your store URL is the base address of your site, for example
    `https://my-store.com`.
  </Step>
</Steps>

<Note>
  Make sure WordPress permalinks are set to a human-readable format under
  **Settings > Permalinks** (not "Plain"), or the REST API will not respond
  correctly.
</Note>

## Connect to Adapt

<Steps>
  <Step title="Open Integrations">
    In Adapt, go to **Settings > Integrations**.
  </Step>

  <Step title="Find WooCommerce">
    Search for **WooCommerce** and select it from the catalog.
  </Step>

  <Step title="Start the connection">
    Click **Connect** to open the connection form.
  </Step>

  <Step title="Add your credentials">
    Enter the values you gathered above, then click **Add connection**:

    | Secret Name                   | Value                         |
    | ----------------------------- | ----------------------------- |
    | `WOOCOMMERCE_STORE_URL`       | Your store URL                |
    | `WOOCOMMERCE_CONSUMER_KEY`    | Your REST API consumer key    |
    | `WOOCOMMERCE_CONSUMER_SECRET` | Your REST API consumer secret |

    You can rename the connection and choose whether it is shared with your
    organization or kept personal to you.
  </Step>

  <Step title="Test the connection">
    Ask Adapt to list your most recent orders.
  </Step>
</Steps>

### Security

* Credentials are encrypted at rest with AES-256
* Use **Read** permissions so the key cannot modify your store
* Connect over HTTPS so credentials are not sent in plain text
* The Consumer secret is shown only once; store it securely
* You can revoke the key anytime from **WooCommerce > Settings > Advanced > REST API**
* Never share your keys or commit them to source control

## Capabilities

Adapt can read and analyze your WooCommerce store data through the REST API. Ask
questions about orders, products, and customers in natural language.

### Examples

```
Show total sales by month for the last year
```

```
Which products sold the most units last quarter?
```

```
How many orders are still processing?
```

```
List my top 10 customers by lifetime spend
```
