← Documentation

Dolibarr

Dolibarr is an open-source Enterprise Resource Planning (ERP) and Customer Relationship Management (CRM) software suitable for businesses of all sizes. The Dolibarr addon enables seamless integration of WordPress forms with Dolibarr’s various modules, including contacts, prospects, quotations, and sales orders.

Dolibarr's main dashboard with sample data

The addon

Dolibarr has a REST API as an optional module. Once enabled, a set of web services will be available to be called out of the box. This addon requires your instance to have this module enabled. To talk with this API, the addon works with an extension of the generic REST bridge class.

A Dolibarr bridge will synchronize your form submissions with the database of your ERP. The addon comes with a suit of templates and workflow jobs to bridge forms to the Third Parties, Contacts, Projects, Appointments and Sales modules, but you’re not tied to this options: either via templates or via manual set up, you can configure your bridges to target any API module and to fit your models’ custom fields.

How to use

The first step to use the addon is to activate it on the addons table on the general settings tab.

Once activated, a new tab will be visible on the settings page. If it’s your first time, it should looks like this:

The template wizard

The recommended way to set up a new bridge is to use a template as a starter point. The addon’s template wizard will set up a new backend connection and a form, both linked on a new bridge.

With this setup ready, you can edit the bridge’s form to fit your requirements or manually add new forms and bridge them with the backend you’ve configured on the previous step.

The template wizard will lead you through three steps:

1. Backend

The backend step will require you to set a unique name to identify the new connection, the base URL of your Dolibarr instance, and an API key.

API keys are linked to users. You can use your own user or create a new one for this purpose. To generate the key, you have to go to the user’s profile, click on Modify and then search for the Key for API field. You can manually type a key value, or click on the refresh button to get a random string. To finish, copy the key value and click on the Save button at the bottom of the screen.

If you already have the Dolibarr’s REST API registered as a backend, the template wizard allows you to reuse it. If you want to get multiple bridges, the recommended way to proceed is to register the backend once and reuse it on your bridges.

2. Form

In this step you have to choose the title of the form the template are going to create. If there is a compatible form, the wizard allows you to reuse the existing form and skip the form creation.

3. Bridge

On the last step of the wizard, you have to set a unique name for the new bridge. In addition to the name, and depending on the template you are using, this step will require more or less fields to be informed. The required fields will be marked with a red asterisk

After that, click on submit and Forms Bridge will generate the backend, form and bridge setting. It only remains to publish the new form on a public page and wait for a new form submission!

Manual set up

With templates, you can save a lot of time while configuring your bridges, but you can achieve the same result with a manual set up.

A Dolibarr bridge will require the following components:

1. Backend

Before registering the backend, you should create an API key.

API keys are linked to users. You can use your own user or create a new one for this purpose. To generate the key, you have to go to the user’s profile, click on Modify and then search for the Key for API field. You can manually type a key value, or click on the refresh button to get a random string. To finish, copy the key value and click on the Save button at the bottom of the screen.

With your API key on the clipboard, go to Settings > Forms Bridge > HTTP > Backends on your WordPress admin page and follow this steps:

  1. Add a new backend with a unique name
  2. Set the base URL of your ERP instance as the connection URL
  3. Select JSON as the Encoding Schema
  4. Add Accept as an HTTP header with application/json as value
  5. Add DOLAPIKEY as an HTTP header with your API key as value

2. Form

Get your preferred form builder and create a new form. Once created, you can choose it as the target form to be bridged on the bridges panel of the addon. If your form fields does not match the desired web service endpoint schema, you can use bridge’s field mappers to rename them.

3. Bridge

The addon’s bridge is an extension of the generic REST bridge. Because of this they looks so similar. Like the REST bridge, the addon’s bridge requires a unique name, a backend, a form, an endpoint and an HTTP method.

The bridge endpoint have to match with one of the available endpoints of your instance API. To get an overview of this endpoints you can use the API explorer. To get there, open a web browser, go to your ERP’s admin UI and go to Tools > API explorer, copy your API key on the input from the header and click on explore. After that you will reach the following page:

Open a service, copy the endpoint and use it as your bridge endpoint. For example, to get your forms bridged to the contacts web service, you have to use /api/index.php/thirdparties.

The bridge allows you to use 4 HTTP methods (GET, POST, PUT, DELETE). In most cases you only want to use the POST method as it is the standard method to write entries on a system through a REST API.

Troubleshooting

To troubleshooting your bridges you can use the plugin’s debug console from the General Settings page. Enable the debug mode and submit a sample form response to see what’s going on under the hood. Take a look to our tutorial about how to use the debug console.

Common issues

  1. API connection failures
    • Verify the API key
    • Confirm REST API module activation
    • Ensure module availability
  2. Missing data
    • Validate field mappings
    • Verify web services endpoint schemas

Templates

The addon comes packed with the following templates:

  • Appointments 🔎
    Appointments form template. The resulting bridge will convert form submissions into events on the calendar linked to new contacts.

  • Company Appointments 🔎
    Appointments form template. The resulting bridge will convert form submissions into events on the calendar linked to new companies.

  • Company Leads 🔎
    Leads form template. The resulting bridge will convert form submissions into company lead projects linked to new contacts.

  • Company Proposals 🔎
    Quotations form template. The resulting bridge will convert form submissions into quotations linked to new companies.

  • Company Prospects 🔎
    Leads form template. The resulting bridge will convert form submissions into company prospects linked to new contacts.

  • Contacts 🔎
    Contact form template. The resulting bridge will convert form submissions into contacts.

  • Customers 🔎
    Contact form template. The resulting bridge will convert form submissions into customers.

  • Leads 🔎
    Lead form template. The resulting bridge will convert form submissions into lead projects linked to new contacts.

  • Proposals 🔎
    Quotations form template. The resulting bridge will convert form submissions into quotations linked to new contacts.

  • Prospects 🔎
    Lead form template. The resulting bridge will convert form submissions into prospect contacts.

  • Thirdparties 🔎
    Contact form template. The resulting bridge will convert form submissions into thirdparties.

  • Sale Orders 🔎
    Product sale order bridge template. The resulting bridge will convert WooCommerce orders into sale orders linked to new contacts. To work propertly, the bridge needs that your WooCommerce product sku values matches with the dolibarr’s product refs..

  • Sale Orders + Sync 🔎
    Sale order bridge template. The resulting bridge will convert WooCommerce orders into sale orders linked to new contacts. The template includes a job that synchronize products between WooCommerce and Dolibarr by product refs.

  • Validated Orders 🔎
    Product sale order bridge template. The resulting bridge will convert WooCommerce orders into validated sale orders linked to new third parties. To work properly, the bridge needs that your WooCommerce product sku values matches with the dolibarr’s product refs..

  • Validated Orders + Sync 🔎
    Product sale order bridge template. The resulting bridge will convert WooCommerce orders into validated sale orders linked to new third parties. The template includes a job that synchronize products between WooCommerce and Dolibarr by product refs..

Dolibarr is a modular system and the REST API may change in base on what modules are enabled on the instance.

Workflow jobs

The addon comes packed with the following workflow jobs:

Supported form builders

Contact Form 7
WP Forms
Gravity Forms
Ninja Forms

Tutorials

  • Bridge WooCommerce orders with Dolibarr

    In this tutorial we will explain how to bridge your WooCommerce orders to Dolibarr. The resulting bridge will convert placed orders in WooCommerce to sale orders on the sales module linked to new third parties. This tutorial assumes you have a Dolibarr instance with access to the REST API and, at least, the Sales module…

  • Using the Dolibarr proposals template

    In this tutorial we will explain how to bridge your WordPress forms to Dolibarr to set up a transactional form that creates product quotations. The resulting bridge will create a prospect third party, and a new quotation linked to the former and with a product line with unit price and quantity. This tutorial assumes you…