Webhook (Automatic)
Using the webhook feature, the system will automatically create the entry in Odoo lets say when you create a new product in WooCommerce webhook will simultaneously create the product in Odoo as well. It can be for the following when a Product, Orders, Customers and Coupons are created is WooCommerce.
You can configure webhook in 2 ways.
1) From Configuration
You can navigate to WooCommerce / Configuration / Setting. Under the Webhook Configuration. You can select the respective feature you wish to implement.
Enabling the option will either create a new webhook for all actions (such as ‘create’, ‘update’, ‘delete’ etc.) or activate if it already exists.
Once these are created in WooCommerce it will be automatically created in Odoo.
NOTE
Once you have enabled the Webhook, after that the products/orders/customers/coupons will be automatically created in Odoo.
2) From Instance
If you wish to activate a particular Webhook service, you can activate it by navigating to WooCommerce / Configuration / Instance.
You need to select the respective instance. You will be able to locate ‘Webhook’ as shown below.
If you wish to create a particular Webhook, you can by clicking on Edit and add a line.
There are 14 options for action.
- When Order is Created
- When Order is Updated
- When Order is Deleted
- When Product is Created
- When Product is Updated
- When Product is Deleted
- When Product is Restored
- When Customer is Created
- When Customer is Updated
- When Customer is Deleted
- When Coupon is Created
- When Coupon is Updated
- When Coupon is Deleted
- When Coupon is Restored
Let say for example you have created a Webhook service for only when the product is created. You can choose from the drop-down ‘When Product is created’ so now whenever a new product is created in WooCommerce it will automatically create the product in Odoo as well.
Similarly, you can follow the process for the other Webhook services.
Once you have created the Webhook service and in future, if you wish to stop the service you can do it by clicking on the Toggle Button.