Close or cancel an order
Closes a sent order (stop waiting for the rest) or cancels one that received nothing.
$0.01 a call
From your agent’s balance. A call that fails costs nothing.
An example
Nordstahl can't deliver the last 15 pans. Close the order with what we got.
Your agent callspurchasing_close_order$0.01 a call
The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.
{
"order": "PO-0001",
"reason": "The supplier ran out of GN pans"
}Use it when
The supplier will not deliver the rest, or the order is called off.
What it does
Close an order that was sent: stop waiting for the rest (what came in stays, and can still be billed). Or cancel it (cancel: true) while nothing came in and it has no bills; a cancelled draft never had a number. Closed and cancelled orders are final.
What comes back
order: the order, now closed or cancelled. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
orderRequired | string | The order_id, or the order's number like "PO-0007". 1 to 40 characters. |
cancel | boolean | Default: false. |
reason | string | Up to 300 characters. |
The call
Over MCP, call purchasing_close_order on https://api.conecto.chat/mcp/purchasing. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/purchasing_close_order \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"order":"PO-0001","reason":"The supplier ran out of GN pans"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
not_found404 | No purchase order has that order_id or number. | Find it with purchasing_list_orders. |
already_closed409 | The order is closed already. | Nothing to do. |
already_cancelled409 | The order is cancelled already. | Nothing to do. |
has_deliveries409 | Goods came in, so it cannot be cancelled. | Close it instead. |
has_bills409 | The order has bills. | Void them with purchasing_void_bill first. |
not_sent409 | A draft was never sent, so there is nothing to close. | Cancel it with cancel: true. |
More Purchasing tools
All 25 tools- Add or change a supplier
purchasing_save_supplierAdds a supplier or changes one: contact, email for orders, address, currency, payment terms and the book account their bills go to.$0.01 a call - List suppliers
purchasing_list_suppliersSuppliers by name, each with what is owed to them on open bills and how many orders are open.Free* - Say what a supplier sells
purchasing_save_supplier_itemsSays which Inventory items a supplier sells: their code, cost, pack size, minimum order, lead time and a fixed reorder quantity.$0.005 per item saved - List what suppliers sell
purchasing_list_supplier_itemsWhat suppliers sell: codes, costs, packs, minimums, lead times and the preferred supplier, for one supplier or one SKU.Free* - Draft reorders for low stock
purchasing_draft_reordersDrafts one purchase order per supplier for every item at or below its reorder point, counting what is already on order.$0.01 per draft order - Draft a purchase order
purchasing_create_orderDrafts a purchase order to a supplier: lines (with Inventory SKUs if you like), currency, delivery date and stock location.$0.01 a call - Change a draft order, or mark it sent
purchasing_update_orderChanges a draft order, or records it as sent without emailing it.$0.01 a call - Email a purchase order
purchasing_send_orderEmails an order to the supplier with a link to its PDF; a draft takes the next number first.$0.10 a call
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md