Actions28
Overview
This node interacts with the Dolibarr API to manage contracts, specifically providing an operation to "unactivate" a contract line. The "Unactivate" operation allows users to mark a specific line within a contract as inactive starting from a given date, optionally adding a comment explaining the reason.
Common scenarios where this node is beneficial include:
- Temporarily suspending services or products linked to a contract line without deleting the entire contract.
- Managing contract lifecycle events by deactivating certain lines while keeping the rest active.
- Automating contract management workflows in business processes that require precise control over contract components.
Practical example:
- A company wants to stop billing for a particular service line in a customer contract starting next month but keep the rest of the contract active. Using this node, they specify the contract ID, the line ID to unactivate, the start date for unactivation, and optionally add a comment describing the reason.
Properties
Name | Meaning |
---|---|
Contract ID | The unique identifier of the contract containing the line to be unactivated. |
Line ID | The unique identifier of the specific line within the contract to unactivate. |
Start Date | The date and time from which the contract line should be considered unactivated (inactive). |
Comment | Optional text to provide additional information or context about the unactivation action. |
Output
The node outputs JSON data representing the response from the Dolibarr API after attempting to unactivate the specified contract line. This typically includes confirmation details such as status, updated contract line information, or error messages if the operation failed.
If the API supports it, the output may contain fields like:
- Confirmation of successful unactivation.
- Details of the contract line post-unactivation.
- Any warnings or errors returned by the API.
No binary data output is indicated for this operation.
Dependencies
- Requires access to a Dolibarr instance with API enabled.
- Needs an API authentication token or key configured in n8n credentials to authorize requests.
- The base URL of the Dolibarr API must be set correctly in the node credentials.
- The node uses the Dolibarr REST API endpoint
/contracts/{contractID}/lines/{lineID}/unactivate
to perform the operation.
Troubleshooting
- Invalid Contract or Line ID: If the provided contract or line IDs do not exist or are incorrect, the API will likely return a 404 error. Verify IDs before running the node.
- Authentication Errors: Missing or invalid API credentials will cause authorization failures. Ensure the API key/token is valid and has sufficient permissions.
- Date Format Issues: The start date must be a valid datetime. Incorrect formats might cause request rejection.
- API Endpoint Changes: If the Dolibarr API version changes, the endpoint or required parameters might differ, causing errors.
- Network Issues: Connectivity problems between n8n and the Dolibarr server can cause timeouts or connection errors.
To resolve common errors:
- Double-check all input parameters for correctness.
- Confirm API credentials and permissions.
- Review Dolibarr API documentation for any updates.
- Test connectivity to the Dolibarr server outside n8n.
Links and References
- Dolibarr Official API Documentation
- Dolibarr Contracts Module Documentation
- n8n Documentation on HTTP Request Node (for understanding API calls)