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

# WooCommerce

> Connect your WooCommerce store backend to Converge

## Installation instructions

<Steps>
  <Step title="Navigate to your WooCommerce REST API Settings">
    1. Navigate to your WordPress Admin Dashboard.
    2. From the Menu Sidebar, navigate to the **WooCommerce** > **Settings** submenu.
    3. On the WooCommerce Settings Page, click on the **Advanced** tab in the top bar.
    4. In the **Advanced Tab**, click on the **REST API** link on the top of the page.
  </Step>

  <Step title="Generate your WooCommerce Consumer Key and Consumer Secret">
    5. On the **REST API** page, click on the **Add key** button, this will open a menu to create a new key.
    6. Choose `Converge` for the **Description**-form field, your own account as the **User**, and choose `Read` as the **Permissions**.
    7. Click on **Generate API Key**.
    8. Copy the **Consumer key** and **Consumer secret**, you will need them to set up the Converge Source.
  </Step>

  <Step title="Create a new Server-side source in Converge">
    9. In Converge, click on **Create a new source**
    10. Pick *Server-side* from the modal
    11. Name your source: e.g. `{Storename} Store Backend`
    12. Choose the **WooCommerce** app from the dropdown menu.
  </Step>

  <Step title="Connect the Source to WooCommerce">
    13. Enter your Store URL in the **URL of your WooCommerce store**-field, including `https://`, e.g. `https://myshop.com`
    14. Paste the **Consumer key** and **Consumer secret** from your previous step.
    15. Click on **Create Source**.
  </Step>
</Steps>

<Note> You should see the Source syncing all historical order data, you should wait until it's fully synced to create destinations </Note>

***

## Event spec

This integration auto-tracks the following events on the server with all properties available according to the [Converge event spec](/sources/converge-spec).

| Event Name                                          | Event Description                |
| --------------------------------------------------- | -------------------------------- |
| [Placed Order](/sources/converge-spec#placed-order) | When a customer places an order. |

### Sales channels

Events received by Converge from a WooCommerce integration are automatically mapped to Converge's [sales channels types](/sources/concepts/sales-channels) whenever possible.

More on sales channels can be found [here](/sources/concepts/sales-channels).

<Note> Converge falls back to "web" if a mapping cannot be found. This is typically the case with third-party integrations with WooCommerce. </Note>

An example of how Converge maps WooCommerce sales channels:

| Woocommerce  | Converge               | Description                                                                        |
| ------------ | ---------------------- | ---------------------------------------------------------------------------------- |
| checkout     | web                    | Browser                                                                            |
| subscription | subscription\_contract | Subscription events                                                                |
| admin        | offline                | Manual orders                                                                      |
| rest-api     | -                      | Depends on third party integration, defaults to "web" if no valid mapping is found |

#### Third party integrations

For third-party integrations, Converge provides support for a metadata field that can be used to specify the sales channel type directly.
This is particularly useful for custom implementations or when working with external systems that use the WooCommerce API to create or update orders.

Converge reads the metadata field called `sales_channel_type` to determine the appropriate sales channel type for the event. This metadata can be set in WooCommerce orders to override the default channel mapping.
If this field is present and has a valid sales channel type value, Converge uses it to categorize the sales channel.
