Odoo Webhook

by
Odoo

501.91

v 14.0 Third Party 4
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Community Apps Dependencies
Lines of code 2211
Technical Name webhooks_acs
LicenseOPL-1
Versions 13.0 15.0 14.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Community Apps Dependencies
Lines of code 2211
Technical Name webhooks_acs
LicenseOPL-1
Versions 13.0 15.0 14.0

Odoo Webhook

Webhooks(A user-defined HTTP callbacks) allow you to subscribe to certain events that happen in odoo. When one of these events are triggered odoo will send a HTTP POST payload to the webhook's configured URL.


It uses both the OAuth1 and OAuth2 protocols to authenticate 3rd party applications.

This Application is compatible with

Community
Enterprice
Odoo.sh

Overview


Webhooks are a useful tool for apps that want to execute code after a specific event happens on an Odoo, for example, after a warehouse manager creates a new product, updates a stock quantity for existing products or sales manager confirm the quotation.

Instead of telling your app to make an API call every X number of minutes to check if a specific event has occured on an Odoo, you can register webhooks, which send an HTTP request from the Odoo telling your app that the event has occurred. This uses many less API requests overall, allowing you to build more robust apps, and update your app instantly after a webhook is received.

Webhook event data can be stored as JSON or XML, and is commonly used when:

    Placing an order
    Changing a product's price
    Collecting data for data-warehousing
    Integrating your accounting software
    Filtering the order items and informing various shippers about the order
Another, less-obvious, case for using webhooks is when you're dealing with data that isn't easily searchable through the Odoo API. For example, re-requesting an entire product catalog or order history would benefit from using webhooks since it requires a lot of API requests and takes a lot of time. Think of it this way, if you would otherwise have to poll for a substantial amount of data, you should be using webhooks.


Webhook Authentication

- OAuth1 Authentication
POST
/restapi/1.0/common/oauth1/request_token

(Temporary Credential Request endpoint)


GET
/restapi/1.0/common/oauth1/authorize

(Resource Owner Authorization endpoint)


POST
/restapi/1.0/common/oauth1/access_token

(Token Credentials Request endpoint)


- OAuth2 Authentication
GET
/restapi/1.0/common/oauth2/authorize

(Resource Owner Authorization endpoint)


POST
/restapi/1.0/common/oauth2/access_token

(Token Credentials Request endpoint)


Webhook Endpoints

- Get a Webhooks
GET
/restapi/1.0/webhooks

(Get a list of all webhooks)

GET
/restapi/1.0/webhooks/{id}

(Get a single webhook by its id)

GET
/restapi/1.0/webhooks?ids={comma_separated_ids}

(Get a list of webhooks of particular ids)

GET
/restapi/1.0/webhooks/?domain={comma_separated_list_of_args}

(Get a list of specific webhooks using domain filter)


- Get a count of Webhooks
GET
/restapi/1.0/webhooks/count


- Create a new Webhook
POST
/restapi/1.0/webhooks?vals={values_for_the_object's_fields}


- Update an existing Webhook
PUT
/restapi/1.0/webhooks/{id}?vals={fields_and_values_to_update}

(Update a single webhook by its id)

PUT
/restapi/1.0/webhooks?ids={comma_separated_ids}&vals={fields_and_values_to_update}

(Update a list of webhooks of particular ids)


- Delete a Webhook from the database
DELETE
/restapi/1.0/webhooks/{id}

(Delete a single webhook by its id)

DELETE
/restapi/1.0/webhooks?ids={comma_separated_ids}

(Delete a list of webhooks of particular ids)


Receive a webhook

Once you register a webhook URL with Odoo, it will issue a HTTP POST request to the URL specified every time that event occurs. The request's POST parameters will contain XML/JSON data relevant to the event that triggered the request.

The trouble with testing your webhooks is that you need a publicly visible URL to handle them.

There are a couple of tools that make working with webhooks during development much easier such as RequestBin, Pagekite and ngrok.


Respond to a webhook

Your webhook acknowledges that it received data by sending a 200 OK response. Any response outside of the 200 range will let Odoo know that you did not receive your webhook. Odoo has implemented a configurable timeout period and a retry period for subscriptions under Settings > General Settings > Webhook Configuration.

We wait for a response to each request till configured timeout period (default is 5 seconds), and if there isn't one or we get an error, we retry the connection for configured retry periods (default is 5 times). A webhook request job will be deleted if there are N number of consecutive failures for the exact same webhook (N being a configured retry period, default is 5 times). You should monitor the admin of your webhook tool for failing webhooks.

If you're receiving an Odoo webhook, the most important thing to do is respond quickly. There have been several historical occurrences of apps that do some lengthy processing when they receive a webhook that triggers the timeout. This has led to situations where webhooks were removed from functioning apps.

To make sure that apps don't accidentally run over the timeout limit, we now recommend that apps defer processing until after the response has been sent.

Webhook Quick Reference Guide

Click Here for a quick reference guide to use the odoo webhooks.
Checkout Other Apps Developed By Aurayan Consulting Services Click Here

Free Support

1) One month free bug support period will be offered pertaining to any one server used, testing or live.
2) If an error appears in our app due to other custom modules installed in your system, we will charge for our efforts to resolve those errors.
3) Please refer the document for configuration. If you need our support for configuration, please request our paid support.
4) Please note that you are not allowed to distribute or resell this module after purchase.
5) This module is tested and working on Odoo vanilla with Ubuntu OS.

Our Contact Details

E-mail : aurayancs@gmail.com | Skype : aurayancs@gmail.com | Mobile : +91-931-346-7836
For product demo, please generate a ticket and mention your preferred time and date. Please make sure the demo timing you mentioned are as per Indian Standard Time (IST), between 10:30 AM to 7:00 PM (IST), Monday to Friday.

Odoo Webhooks: Version 1.0 documentation

Webhooks(A user-defined HTTP callbacks) are a useful tool for apps that want to execute code after a specific event happens on an Odoo, for example, after a warehouse manager creates a new product, updates a stock quantity for existing products or sales manager confirm the quotation.

Instead of telling your app to make an API call every X number of minutes to check if a specific event has occured on an Odoo, you can register webhooks, which send an HTTP request from the Odoo telling your app that the event has occurred. This uses many less API requests overall, allowing you to build more robust apps, and update your app instantly after a webhook is received.

Webhook event data can be stored as JSON or XML, and is commonly used when:

  • Placing an order
  • Changing a product’s price
  • Collecting data for data-warehousing
  • Integrating your accounting software
  • Filtering the order items and informing various shippers about the order

Another, less-obvious, case for using webhooks is when you’re dealing with data that isn’t easily searchable through the Odoo API. For example, re-requesting an entire product catalog or order history would benefit from using webhooks since it requires a lot of API requests and takes a lot of time.

Think of it this way, if you would otherwise have to poll for a substantial amount of data, you should be using webhooks.

Get the module

The module webhook_acs is available on Odoo App Store, Here are links for:

Dependencies

The module webhook_acs is depend on restapi_acs module, which is also available on Odoo App Store, Here are links for:

Note

Odoo REST API documentation is available here, which will give you complete guide for how to install and work with restapi_acs module.

Installation

Install webhook_acs module by following below steps:

  1. Unzip webhook_acs module to custom addons directory
  2. Restart odoo server
  3. Activate Developer Mode from the Settings menu
  4. Navigate to the Apps menu
  5. Click on Update Apps List menu in left side bar
  6. Once apps list is updated, click on Apps menu in left / top side bar
  7. Search module webhook_acs
  8. Click on Install button.

Getting Started

Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.