WooCommerce Integration

The WooCommerce integration enables Odoo to connect with a WooCommerce store and manage key eCommerce operations from Odoo. The integration provides a structured workflow for connecting the store, importing products, customers and orders and synchronizing data between WooCommerce and Odoo.

WooCommerce integration with Odoo

2. Objective

The main objective of the integration is to connect WooCommerce with Odoo and keep the required store data synchronized.

  • Connect the WooCommerce store with Odoo.
  • Import products, customers and orders into Odoo.
  • Synchronize product, order and stock information.
  • Support webhooks and automated synchronization.
  • Monitor integration operations through logs.

3. Key Features

  • 3.1. WooCommerce Instance - Create and configure a WooCommerce store connection in Odoo using the store URL and API credentials.
  • 3.2. Data Import - Import products, customers and orders from WooCommerce into Odoo.
  • 3.3. Product Management - Manage imported products, variants, categories, attributes and coupons in Odoo.
  • 3.4. Order Management - View imported orders with customer, product, invoicing, shipping and payment information.
  • 3.5. Synchronization - Use webhooks and automated actions for product imports, order imports and stock updates.
  • 3.6. Logs - Review operation type, timestamp, status and error messages for synchronization activities.

4. WooCommerce Setup

Before creating the instance in Odoo, generate the REST API credentials from the WooCommerce store.

4.1 Generate REST API Credentials

  • Open WooCommerce Settings. Go to WooCommerce → Settings.
  • Open Advanced. Select the Advanced tab and open REST API.
  • Add a key. Click Add key to create credentials for the integration.
  • Enter key details. Provide a meaningful description, select the appropriate user and set Permissions to Read/Write.
  • Generate the key. Click Generate API key and securely copy the generated credentials.

WooCommerce → Settings → Advanced → REST API

WooCommerce REST API key generation

4.2 Generated Credentials

The generated Consumer Key and Consumer Secret are used when configuring the WooCommerce instance in Odoo.

Generated WooCommerce API credentials

5. Odoo API Access

An Odoo API key can be generated for secure external access when it is required by the integration workflow.

5.1 Generate an Odoo API Key

  • Access Preferences. After logging in, click the profile icon and select Preferences.
  • Open API Keys. In Preferences, locate the API Keys section.
  • Generate the key. Click Generate API Key.
  • Copy the key. Copy the generated key and store it securely because it will not be displayed again.

Odoo Preferences and API key section

Odoo API key generation

Generated Odoo API key

5.2 Security

  • API keys and WooCommerce credentials must be treated as sensitive information.
  • Do not hardcode API keys in Python, JavaScript or XML.
  • Restrict access to credentials to authorized technical or administrator users.
  • Rotate or invalidate credentials if they are compromised.

6. Configure the WooCommerce Instance in Odoo

The Instance menu is the core of the integration. It is used to configure the connection between Odoo and a WooCommerce store.

6.1 Instance Details

  • Business Information. Enter the business or store name.
  • Host URL. Specify the URL of the WooCommerce store.
  • Consumer Key. Enter the Consumer Key generated in WooCommerce.
  • Consumer Secret. Enter the Consumer Secret generated in WooCommerce.
  • Connect the instance. Test/connect the instance so Odoo can communicate with WooCommerce.

WooCommerce instance configuration in Odoo

7. Webhook Configuration

Webhooks are configured for the WooCommerce instance to enable real-time synchronization between WooCommerce and Odoo.

7.1 Create Webhooks

Open the required WooCommerce Instance in Odoo.

Use the Create Webhook option available in the instance configuration.

When the webhooks are created, the integration creates the required webhook configurations for the supported WooCommerce events.

7.2 Product Webhooks

The following webhooks are created for products:

  • Product Creation – Triggered when a new product is created in WooCommerce.
  • Product Updation – Triggered when an existing product is updated in WooCommerce.
  • Product Deletion – Triggered when a product is deleted from WooCommerce.

7.3 Order Webhooks

The following webhooks are created for orders:

  • Order Creation – Triggered when a new order is created in WooCommerce.
  • Order Updation – Triggered when an existing order is updated in WooCommerce.
  • Order Deletion – Triggered when an order is deleted from WooCommerce.

7.4 Customer Webhooks

The following webhooks are created for customers:

  • Customer Creation – Triggered when a new customer is created in WooCommerce.
  • Customer Updation – Triggered when an existing customer is updated in WooCommerce.
  • Customer Deletion – Triggered when a customer is deleted from WooCommerce.

7.5 Synchronization Fallback

Manual Synchronization: If any real-time update is missed through the webhooks, users can use the available manual synchronization option to retrieve the latest data from WooCommerce.

Daily Cron Synchronization: A scheduled daily synchronization job runs automatically to identify and synchronize any missing records or updates that may not have been captured through webhooks.

This provides an additional synchronization layer to help maintain data consistency between WooCommerce and Odoo.

8. Data Synchronization

Products, customers and orders can be imported from WooCommerce into Odoo. The Overview menu also provides direct operations for importing and synchronizing store data.

8.1 Products

The integration manages imported WooCommerce product information such as:

  • Product name and price.
  • SKU and stock levels.
  • Product variants and their attributes, such as size and color.
  • Product categories and attributes.
  • WooCommerce discount coupons, including codes, discount amounts and validity periods.

WooCommerce product information in Odoo

8.2 Customers

  • Imported customer records can be viewed from the Sales → Customers menu.
  • Customer information includes name, contact information and order history.

8.3 Orders

  • Imported orders can be viewed from the Sales → Orders menu.
  • Order details include order state, customer details, product details, invoicing status, shipping and payment information.

9. Product Types in WooCommerce

WooCommerce product data is categorized into four main types. These product configurations are part of the product data managed by the store.

  • 9.1. Simple Product – A basic product with a single price and no variations.
  • 9.2. Grouped Product – A collection of related simple products that can be purchased separately.
  • 9.3. Variable Product – A product with multiple variations based on attributes such as size, color or material, with possible differences in pricing.
  • 9.4. External/Affiliate Product – A product listed on another website where the Buy Now action redirects the customer to the external site.

For variable products, attributes are configured first and then used to generate variations. Each variation can have its own SKU, stock status, price and image.

10. Sales Tax Handling

WooCommerce can integrate with TaxJar to calculate sales tax based on the customer's shipping address. The calculated tax is stored in the WooCommerce order under the tax_lines data.

  • Shipping Address – the tax rate is determined based on the order destination.
  • Nexus Determination – tax is applied when the store has a tax nexus in the state.
  • Product Taxability – products can have different tax rates or exemptions.
  • Local Tax Rules – city and county rules can affect the final tax percentage.

WooCommerce order with calculated tax shown in Odoo

For example, the provided order data shows a California tax rate of 8.625% with a tax total of $1.55. Another California location shows a 10.25% rate with a tax total of $1.85.

If TaxJar cannot calculate the tax, WooCommerce can store an error message in the order metadata, such as “Order does not have nexus.”

11. Logs and Monitoring

The Logs menu provides a history of operations performed between WooCommerce and Odoo and is used for monitoring and troubleshooting.

  • Product imports.
  • Order imports.
  • Customer imports.
  • Synchronization actions.
  • Operation type, timestamp and status.
  • Error messages when an operation fails.

Conclusion

The WooCommerce integration provides a structured workflow for connecting a WooCommerce store with Odoo, importing the required eCommerce data, synchronizing updates and monitoring integration activity. The main workflow is to configure the WooCommerce credentials, create and connect the Odoo instance, import data, configure synchronization and use logs to troubleshoot issues.

Need a Similar Odoo Integration

Talk to our Odoo team about connecting WooCommerce, or any other third-party service, with your Odoo records.

WhatsApp