← Blog

Bridge WooCommerce orders with Holded

In this tutorial we will explain how to bridge your WooCommerce orders to Holded. The resulting bridge will convert placed orders in WooCommerce to sale orders linked to new contacts.

This tutorial assumes you have an active Holded account with access to the REST API.

Enable the addon

The first step is to enable the Holded addon on the general tab of the settings page.

Once the addon is enabled, we can create bridges to work with the REST API. In addition Forms Bridge offers some templates to start creating our bridges, and workflow jobs.

The template wizard

To streamline the creation process, we will use the Product Orders template from the addon. To use it, simply go to Add bridge tab on the addon’s page and click on Use a template. After that, the template wizard will be displayed. On the templates dropdown, select the option Product Orders.

The Product Orders template is a WooCommerce bridge template and its only available if you have WooCommerce installed and selected as the target integration.

The backend step

The next step on the wizard will ask us for the backend connection. The backend connection will ask us for a name, the URL and an API key. Leave the default backend name and set the URL and your api key and Forms Bridge will perform a ping to the backend to check the health of the connection. If all goes well, the template wizard will allow us to continue.

This step is only required if you already don’t have any backend connection. If you’ve created a backend before, you can simply reuse it and click next.

The bridge step

To finish, the wizard will ask us for the bridge name (remember, it should be unique as it is the identifier). That’s all! Now click on submit and let the magic happen. Behind the curtain, Forms Bridge will create the backend connection and a new bridge that will connect the Woo Checkout form with the backend.

The bridge workflow

After using the template you will have a bridge with the following workflow:

Lets see what happen on each job of the pipeline and how you can add custom configurations to the bridge:

  • Form submission: This is the first step of the pipeline and allow us to apply mutation layers to the form submission. In this case, the form submission is the order data. This step is configured with a bunch of mutation layers to prune the order data and get only the required fields.
  • Contact ID: This workflow job is the responsible to create a new contact on Holded based on the checkout billing data. The job will search for an existing contact by phone and, if it does not exists, create a new one. Once done, all the billing fields are removed from the payload and replaced with the contactId field. The new contact is created with a linked shipping address with the order’s shipping data.

The output of the pipeline should be a payload like this:

{
  "currency": "EUR",
  "approveDoc": true,
  "customFields": {
    "wc_order_id": 1,
    "wc_customer_id": 1
  },
  "date": "$timestamp",
  "notes": "Lorem ipsum dolor sit amer",
  "contactId": 1,
  "items": [{
    "name": "My product",
    "subtotal": 24.99,
    "units": 2,
    "sku": "my-product"
  }]
}

Remember! To get this bridge working properly, you have to get your WooCommerce product SKU values synchronized with the Holded products sku values. This fields are used as the relation between the two inventories.

At this point, the bridge is ready for use, you can stop here or continue editing the bridge with custom configurations to fit your specific use case.

If you need to go further with payload mutations you always can use the forms_bridge_payload filter to mangle your bridge submissions with PHP and all of its power and flexibility. Checkout the API documentation.


To conclude, its worth to mention that you can get the same bridge setup doing it manually, but with templates you can save a lot of time! We strongly recommend you to check for templates before start creating new bridges.