Dolibarr icon

Dolibarr

Interact with Dolibarr API

Overview

This node allows you to create a new contract record in Dolibarr, an open-source ERP and CRM system. It is useful for automating contract management workflows by programmatically adding contracts linked to customers, vendors, and third parties. Typical use cases include integrating contract creation into sales pipelines, syncing contract data from other systems, or bulk uploading contracts.

For example, you can use this node to:

  • Automatically create a contract when a deal reaches a certain stage in your CRM.
  • Link the contract to specific customers, vendors, and sales representatives.
  • Add notes and custom extra fields to enrich contract information.

Properties

Name Meaning
Ref Customer Reference identifier for the customer related to the contract.
Ref Vendor Reference identifier for the vendor/supplier related to the contract.
Third-Party Name or ID The third party associated with the contract. Can be selected from a list, specified by URL, or by ID.
Sales representative following-up contract The user responsible for following up on the contract. Selectable from a list, URL, or by ID.
Sales representative signing contract The user responsible for signing the contract. Selectable from a list, URL, or by ID.
Date The date of the contract (required).
Notes Collection of notes including:
- Public Note: visible to all relevant users.
- Private Note: internal remarks.
Extra Fields Multiple custom attributes for the contract. Each attribute has a field name (from available extra fields) and a value.
Fields Other contract fields that can be assigned dynamically (generic assignment collection).

Output

The node outputs the JSON response from the Dolibarr API after creating the contract. This typically includes details of the newly created contract such as its unique ID, linked entities, dates, notes, and any extra fields set.

If the API supports binary data output for contracts (e.g., attached files), it would be summarized here, but based on the provided code, the output is JSON only.

Dependencies

  • Requires an active Dolibarr API connection configured with a valid base URL and API authentication token.
  • The node depends on the Dolibarr API endpoints for contracts, third parties, and users.
  • The node uses dynamic loading of options for extra fields, third parties, and users via API calls.
  • Proper permissions in Dolibarr are necessary to create contracts and access related resources.

Troubleshooting

  • Invalid URL errors: When specifying third-party or user by URL, ensure the URL matches the expected pattern (societe/card.php?socid=... for third parties, user/card.php?id=... for users). Otherwise, validation will fail.
  • Missing required fields: The "Date", "Third-Party", "Sales representative following-up contract", and "Sales representative signing contract" fields are required. Omitting them will cause errors.
  • API authentication errors: Ensure the API key/token is valid and has sufficient permissions.
  • 404 Not Found errors: May occur if referenced third parties or users do not exist or are inaccessible.
  • Extra fields loading issues: If extra fields do not load, verify that the Dolibarr instance has extra fields defined for contracts and that the API credentials have access.

Links and References

Discussion