Module Webhook

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search


The module WebHook add the possibility to send a JSON message to an external URL, on a triggered Dolibarr event.


This module is included with the Dolibarr distribution, so there is no need to install it.


To use this module, you must first enable it using an administrator account, via the menu option "Home - Setup - Modules".

Choose the tab where the module is listed. Then click on "Activate".

The module is now activated.

If a cog icon appears Cog circle.svg on module thumb or at end of the line of the module, click on it to access the setup page specific to the module.

Add a target

The only configuration needed for this module is adding a target. This is done by going into the module configuration, then click on the menu target. Then just click on the plus sign on the top right of the page, fill one or multiple trigger event and to add an URL to the site we want to post the JSON. You can find information on Trigger event on the wiki page Triggers.


Image of Webhook configuration.png


So once setup is done, each time a business event occurs in Dolibarr for the triggers defined into the setup, a call will be done to the targeted URL. The message will be a JSON message like this example:

   "triggercode" : "TRIGGER_CODE",
   "object" : {DolibarrObject}

Exemple of message sent by Dolibarr when the event COMPANY_CREATE is executed:

          "multicurrency_code":"EUR","note_public":"","note_private":"","comments":[],"name":"Test Webhook",...