Validate, approve, send or delete a supplier order
dolibarr_supplier_order_actionMove a supplier order through validate, approve, mark ordered, or delete actions, returning a preview first unless confirm=true is set.
Instructions
Moves a supplier order to another status. Actions: validate (the draft gets its final ref and waits for approval); approve (approves the validated order so it can be sent to the supplier); mark_ordered (records that the approved order was sent to the supplier); delete (deletes the supplier 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": {
"supplier_order_id": "<supplier_order_id>",
"action": "<action>"
},
"name": "dolibarr_supplier_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. | |
| comment | No | With mark_ordered: a comment for the event log. | |
| 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_date | No | With mark_ordered: the date the order was sent; default today. | |
| order_method_id | No | With mark_ordered: how it was sent, from dolibarr_dictionary ordering_methods. | |
| supplier_order_id | Yes |