---
title: "WooCommerce Connector"
description: "Complete WooCommerce integration guide for syncing customers, orders, products, and cart events with Brevo through Tajo."
url: https://tajo.io/docs/connectors/ecommerce/woocommerce/
markdown: https://tajo.io/docs/connectors/ecommerce/woocommerce.md
lang: en-US
robots: noindex
---

# WooCommerce Connector

Connector status: In progress Being built. Not verified yet.

| Source field | Destination field | Sample value |
| --- | --- | --- |
| `record.id` | `source_id` | `record_1042` |
| `record.updated_at` | `updated_at` | `2026-10-18T08:00:00Z` |
| `record.value` | `value` | `sample_value` |

Connect your WooCommerce store to Brevo through Tajo for complete e-commerce data synchronization. Leverage the WooCommerce REST API to sync customers, orders, products, and coupon data for targeted marketing campaigns and automated workflows.

## Overview

| Property | Value |
| --- | --- |
| **Platform** | WooCommerce (WordPress) |
| **Category** | E-commerce |
| **Setup Complexity** | Medium |
| **Official Integration** | No |
| **Data Synced** | Customers, Orders, Products, Coupons |
| **Available Skills** | 10 |

## Features

- **Customer sync** - Real-time customer data synchronization to Brevo contacts
- **Order tracking** - Full order lifecycle event tracking for post-purchase flows
- **Product catalog sync** - Sync products and variations for email recommendations
- **Coupon management** - Sync coupon codes for promotional campaigns
- **Webhook support** - Real-time updates via WooCommerce webhooks
- **Cart abandonment** - Track and recover abandoned carts
- **Multi-site support** - Connect WordPress multisite WooCommerce installations
- **Custom meta fields** - Map WooCommerce custom meta to Brevo attributes

## Prerequisites

Before you begin, ensure you have:

1. A WordPress site with WooCommerce plugin installed and activated
2. WooCommerce REST API enabled (Settings > Advanced > REST API)
3. API Consumer Key and Consumer Secret generated
4. Your site must use HTTPS for API authentication
5. A Brevo account with API access
6. A Tajo account with API credentials

## Authentication

### REST API Keys

WooCommerce uses Consumer Key and Consumer Secret pairs for authentication. Generate these in WooCommerce > Settings > Advanced > REST API.

#### OAuth 1.0a (HTTPS sites)

```bash
curl https://yourstore.com/wp-json/wc/v3/orders \
  -u "consumer_key:consumer_secret"
```

#### Query String Authentication (HTTPS)

```bash
curl "https://yourstore.com/wp-json/wc/v3/orders?consumer_key=ck_xxx&consumer_secret=cs_xxx"
```

### Permission Levels

| Permission | Access |
| --- | --- |
| **Read** | View resources only |
| **Write** | Create and edit resources |
| **Read/Write** | Full CRUD access |

## Configuration

### Basic Setup

```yaml
connectors:
  woocommerce:
    enabled: true
    store_url: "https://yourstore.com"
    consumer_key: "ck_your_consumer_key"
    consumer_secret: "cs_your_consumer_secret"
    api_version: "wc/v3"
    verify_ssl: true

    # Data sync options
    sync:
      customers: true
      orders: true
      products: true
      coupons: true

    # Brevo list assignment
    lists:
      all_customers: 50
      buyers: 51
      abandoned_cart: 52
```

### Customer Field Mapping

Map WooCommerce customer fields to Brevo attributes:

```yaml
customer_mapping:
  email: email
  first_name: FIRSTNAME
  last_name: LASTNAME
  billing.phone: SMS
  billing.company: COMPANY
  billing.city: CITY
  billing.state: STATE
  billing.country: COUNTRY
  billing.postcode: ZIP

  # E-commerce metrics (computed)
  orders_count: ORDER_COUNT
  total_spent: TOTAL_SPENT
  date_created: SIGNUP_DATE

  # Meta fields
  meta_data.loyalty_points: LOYALTY_POINTS
  meta_data.preferred_category: PREF_CATEGORY
```

### Webhook Configuration

Register webhooks in WooCommerce > Settings > Advanced > Webhooks:

```yaml
webhooks:
  - topic: "customer.created"
    event: "customer_created"
  - topic: "customer.updated"
    event: "customer_updated"
  - topic: "order.created"
    event: "order_placed"
  - topic: "order.updated"
    event: "order_updated"
  - topic: "order.completed"
    event: "order_fulfilled"
  - topic: "order.refunded"
    event: "order_refunded"
  - topic: "coupon.created"
    event: "coupon_created"
  - topic: "product.created"
    event: "product_added"
  - topic: "product.updated"
    event: "product_updated"
```

## API Endpoints

| Method | Endpoint | Description |
| --- | --- | --- |
| `GET` | `/wc/v3/customers` | List customers |
| `POST` | `/wc/v3/customers` | Create a customer |
| `GET` | `/wc/v3/customers/{id}` | Get a customer |
| `PUT` | `/wc/v3/customers/{id}` | Update a customer |
| `GET` | `/wc/v3/orders` | List orders |
| `POST` | `/wc/v3/orders` | Create an order |
| `GET` | `/wc/v3/orders/{id}` | Get an order |
| `GET` | `/wc/v3/products` | List products |
| `GET` | `/wc/v3/products/{id}` | Get a product |
| `GET` | `/wc/v3/products/{id}/variations` | List product variations |
| `GET` | `/wc/v3/coupons` | List coupons |
| `GET` | `/wc/v3/reports/sales` | Get sales reports |
| `GET` | `/wc/v3/reports/top_sellers` | Get top sellers |
| `POST` | `/wc/v3/webhooks` | Create a webhook |

## Code Examples

### Initialize WooCommerce Connector

```javascript
import { TajoClient } from '@tajo/sdk';

const tajo = new TajoClient({
  apiKey: process.env.TAJO_API_KEY,
  brevoApiKey: process.env.BREVO_API_KEY
});

// Connect WooCommerce store
await tajo.connectors.connect('woocommerce', {
  storeUrl: 'https://yourstore.com',
  consumerKey: process.env.WC_CONSUMER_KEY,
  consumerSecret: process.env.WC_CONSUMER_SECRET
});
```

### Fetch and Sync Customers

```javascript
// Fetch customers using WooCommerce REST API
const WooCommerce = require('@woocommerce/woocommerce-rest-api').default;

const api = new WooCommerce({
  url: 'https://yourstore.com',
  consumerKey: process.env.WC_CONSUMER_KEY,
  consumerSecret: process.env.WC_CONSUMER_SECRET,
  version: 'wc/v3'
});

// List customers with pagination
const response = await api.get('customers', {
  per_page: 100,
  page: 1,
  orderby: 'registered_date',
  order: 'desc'
});

const customers = response.data;
// [{ id, email, first_name, last_name, billing, shipping, ... }]

// Pagination info from headers
const totalPages = response.headers['x-wp-totalpages'];
const totalItems = response.headers['x-wp-total'];
```

### Handle Webhook Events

```javascript
// WooCommerce webhook handler
app.post('/webhooks/woocommerce', async (req, res) => {
  const topic = req.headers['x-wc-webhook-topic'];
  const signature = req.headers['x-wc-webhook-signature'];

  // Verify webhook signature
  const expectedSignature = crypto
    .createHmac('sha256', WEBHOOK_SECRET)
    .update(JSON.stringify(req.body))
    .digest('base64');

  if (signature !== expectedSignature) {
    return res.status(401).send('Invalid signature');
  }

  // Forward to Tajo
  await tajo.connectors.handleWebhook('woocommerce', {
    topic,
    payload: req.body
  });

  res.status(200).send('OK');
});
```

### Batch Operations

```javascript
// Batch create, update, and delete products
const batchResponse = await api.post('products/batch', {
  create: [
    { name: 'New Product', type: 'simple', regular_price: '19.99' }
  ],
  update: [
    { id: 123, regular_price: '24.99' }
  ],
  delete: [456]
});
```

## Rate Limits

WooCommerce itself does not enforce API rate limits, but the underlying WordPress server and hosting provider may impose limits:

| Factor | Typical Limit | Details |
| --- | --- | --- |
| **Shared hosting** | 50-100 req/min | Varies by host |
| **Managed WP hosting** | 200-500 req/min | WP Engine, Kinsta, etc. |
| **Self-hosted** | No hard limit | Limited by server resources |
| **Per page** | 100 records max | Default is 10 |
| **Batch operations** | 100 items/batch | Create, update, or delete |

Server Performance

Large WooCommerce stores may experience slow API responses. Use pagination, limit fields with `_fields` parameter, and schedule bulk syncs during off-peak hours.

## Troubleshooting

| Issue | Cause | Solution |
| --- | --- | --- |
| `401 Unauthorized` | Invalid API keys | Regenerate Consumer Key/Secret in WooCommerce settings |
| `403 Forbidden` | Insufficient permissions | Set API key to Read/Write access |
| SSL certificate errors | Invalid SSL on site | Ensure valid SSL certificate; set `verify_ssl: false` for testing only |
| Webhooks not firing | WordPress cron disabled | Enable WP-Cron or configure server-level cron |
| Slow API responses | Large database | Optimize WordPress database, use `_fields` parameter |
| Missing custom fields | Meta data not exposed | Use `meta_data` field to access custom meta |
| Pagination issues | Default page size | Explicitly set `per_page` parameter (max 100) |

## Best Practices

1. **Use webhooks for real-time sync** - Configure WooCommerce webhooks rather than polling the API
2. **Verify webhook signatures** - Always validate the `X-WC-Webhook-Signature` header
3. **Paginate all list requests** - Use `page` and `per_page` parameters; check `X-WP-TotalPages` header
4. **Use the `_fields` parameter** - Request only needed fields to reduce response size and improve performance
5. **Batch operations** - Use batch endpoints for bulk create/update/delete operations (up to 100 items)
6. **Schedule large syncs** - Run initial full syncs during off-peak hours to avoid server strain
7. **Enable HTTPS** - WooCommerce API requires HTTPS for OAuth authentication

## Security

- **OAuth 1.0a** - Secure authentication via Consumer Key/Secret pairs
- **HMAC webhook signatures** - SHA-256 signature verification for incoming webhooks
- **HTTPS required** - API requires TLS encryption for authentication
- **Permission scoping** - API keys can be set to Read, Write, or Read/Write
- **WordPress security** - Benefits from WordPress core security updates
- **PCI considerations** - Payment data handled by WooCommerce payment gateways, not exposed via API

## Related Resources

- [Shopify Connector](https://tajo.io/docs/connectors/ecommerce/shopify)
- [BigCommerce Connector](https://tajo.io/docs/connectors/ecommerce/bigcommerce)
- [Customer Sync Skill](https://tajo.io/docs/skills/data-sync/customer-sync)
- [Abandoned Cart Skill](https://tajo.io/docs/skills/email-marketing/abandoned-cart)

## Open-Source Implementation Map

This section is derived from official or public repository material discovered for the WooCommerce connector. Use it as the engineering companion to the setup guide above: it shows where the API surface lives, what implementation assets exist, and how Tajo should translate them into reliable Brevo sync behavior.

### Repository Snapshot

| Repository | Commit | Languages / formats | Files |
| --- | --- | --- | --- |
| [wtx-labs/woocommerce-api-openapi-specification](https://github.com/wtx-labs/woocommerce-api-openapi-specification) | b534704 | YAML (4), Markdown (1), png (1) | 6 |

### Integration Shape

```mermaid
graph LR
  Source["WooCommerce API / repository"] --> Auth["Auth and scopes"]
  Source --> Objects["Objects, events, and schemas"]
  Auth --> Tajo["Tajo connector runtime"]
  Objects --> Tajo
  Tajo --> Brevo["Brevo contacts, attributes, lists, campaigns"]
  Tajo --> Ops["Backfill, cursor, retries, logs"]
```

### What To Reuse

- WooCommerce REST API specification in OpenAPI 3.0 format
- The WooCommerce REST API specification in OpenAPI 3.0 format.
- 📦 Version Information
- - **Current Version**: ‘1.0.0’
- - **OpenAPI Specification Version**: ‘3.0’

### Tajo Revamp Checklist

- Keep authentication setup aligned with the vendor docs and the public repository’s current API shape.
- Map primary resources into explicit Tajo sync objects with stable external IDs.
- Prefer cursor-based or updated-at incremental sync where the API exposes it; otherwise document the fallback.
- Treat webhook handlers as idempotent and replay-safe, especially for order, contact, ticket, and campaign events.
- Capture pagination, rate limits, retry headers, and partial-failure behavior in connector smoke tests.
- Keep examples small and runnable against sandbox or test-mode accounts.

### Sources

- [wtx-labs/woocommerce-api-openapi-specification](https://github.com/wtx-labs/woocommerce-api-openapi-specification)
- [Vendor documentation](https://woocommerce.github.io/woocommerce-rest-api-docs/)
