# Connect WooCommerce

> Sync products from your WooCommerce store into Message24 and, optionally, send the orders the AI captures back to WooCommerce.

Source: https://docs.message24.net/owners/integrations/woocommerce/

The WooCommerce integration copies the published products from your WordPress store into Message24, and can create WooCommerce orders from the orders the AI captures in chat. You connect it with a WooCommerce REST API key.

## Step 1: Create an API key in WooCommerce

1. In your WordPress admin, go to **WooCommerce > Settings > Advanced > REST API** and click **Add key**.
2. Give it a description such as `Message24` and choose the user it belongs to.
3. Set **Permissions**. **Read** is enough to sync products. Choose **Read/Write** if you want Message24 to create orders in your store.
4. Click **Generate API key** and copy the **Consumer key** (starts with `ck_`) and **Consumer secret** (starts with `cs_`). WooCommerce shows the secret only once.

## Step 2: Connect in Message24

1. Go to **Settings > Integrations** and click **Connect** on the WooCommerce card.
2. **Store URL**: your store's address, for example `https://yourstore.com`.
3. **Consumer Key** and **Consumer Secret**: paste the values from step 1.
4. If you want orders sent to WooCommerce, tick **Push orders to WooCommerce** and choose the options described below.
5. Click **Connect**.

Message24 tests the connection before saving. If it can't reach the store or the key is rejected, you see the error and nothing is saved.

## What syncs

- Published products. Drafts and private products are not imported.
- Variable products with their variations, including each variation's price, stock status and images.
- Stock status (in stock or not).
- The product's first category, including its parent categories, and its brand.
- Arabic and Kurdish translations, if your store translates products with WPML.

Products sync automatically in the background. Use **Sync** to fetch recent changes now, or **Full Sync** to re-fetch every product and deactivate products that are no longer published in WooCommerce. See [How syncing works](/owners/integrations/overview/#how-syncing-works).

## Sending orders to WooCommerce

Tick **Push orders to WooCommerce** to create an order in your store for each Message24 order.

- **Push orders at stage**: **New** sends the order as soon as it is accepted in Message24. **Confirmed** waits until your team confirms it.
- **Initial WooCommerce status**: the status the order has when it is created in WooCommerce: **Pending**, **Processing** (the default) or **On Hold**.

What is sent with the order:

- The customer's name, phone, email and address. If a WooCommerce customer already exists with the same email, the order is linked to them. Otherwise it is created as a guest order.
- Lines for products that came from WooCommerce, matched to the right product and variation.
- Items that aren't in your WooCommerce catalog, as fee lines, so the order total stays correct.
- The delivery fee as a shipping line, and any discount.

### Status updates from WooCommerce

After an order has been sent, Message24 checks WooCommerce regularly and updates the order's stage on your [Orders](/owners/catalog/orders/) page:

| WooCommerce status | Stage in Message24 |
| --- | --- |
| Pending payment, Processing, On hold | Confirmed |
| Completed | Delivered |
| Cancelled, Failed | Cancelled |
| Refunded | Returned |

## Change settings or credentials

Click the settings icon on the WooCommerce card. You can change the store URL and the order options. To use a new API key, click **Change Credentials**, paste the new key and secret, and click **Save Changes**.

## Disconnect

Click **Disconnect** on the WooCommerce card and confirm. Product syncing and order sending stop. You can also revoke the API key in WooCommerce under **Settings > Advanced > REST API**.
