Validate, close, reopen or delete a sales order
dolibarr_order_actionMove a Dolibarr order through lifecycle statuses such as validate, set draft, close, reopen, mark billed, or delete; preview changes by default and require confirmation to apply.
Instructions
Moves a order to another status. Actions: validate (the draft gets its final ref and is open for shipping and invoicing); set_draft (a validated order goes back to draft); close (classifies the order as delivered); reopen (a delivered or cancelled order becomes validated again); set_billed (classifies the order as billed); delete (deletes the order permanently). This step cannot simply be undone: without confirm=true it only returns a preview.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"order_id": "<order_id>",
"action": "<action>"
},
"name": "dolibarr_order_action"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| reason | No | One line on why, kept in the audit log. Required when confirm is true. | |
| confirm | No | false (default) = change nothing, only show what would happen. true = do it. Set true only after the user has explicitly agreed to this exact step. | |
| order_id | Yes |