Use a supplier credit
Puts a credit with a supplier on their bill, like Xero's allocate credit, or records it coming back.
$0.01 a call
From your agent’s balance. A call that fails costs nothing.
An example
Use our deposit with Nordstahl on their bill NS-2026-1188.
Your agent callspurchasing_use_credit$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.
{
"credit": "SC-0001",
"bill_id": "3c5e7a9b-1d2f-4a6c-8e0b-4d6f8a1c3e5b"
}Use it when
The bill for a deposit comes in, the supplier pays an overpayment back, or a deposit was recorded by mistake (void).
What it does
Put a credit with a supplier (a prepayment or an overpayment) on one of their open bills, like Xero's allocate credit: bill_id, and amount (default all it can: what is left on the credit or the bill, the smaller); the bill records it as a payment with method credit, and its share of the credit's VAT comes back off. Or refund: true records what is left (or amount) coming back from the supplier, with date and method; or void: true takes back a prepayment recorded by mistake while none of it is used. Same supplier and currency only.
What comes back
credit: what is left and how it was used; with a bill, the bill and the entry; with refund, the entry. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
creditRequired | string | The credit's number, like "SC-0001" (purchasing_list_credits). 1 to 20 characters. |
bill_id | string | The bill_id purchasing_create_bill returned. Exactly 36 characters. |
amount | number or string | Up to 24 characters. |
refund | boolean | Default: false. |
void | boolean | Default: false. |
date | string | YYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$. |
method | string | One of: bank_transfer,card,cash,check,online,other. Default: bank_transfer. |
reference | string | Up to 120 characters. |
The call
Over MCP, call purchasing_use_credit on https://api.conecto.chat/mcp/purchasing. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/purchasing_use_credit \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"credit":"SC-0001","bill_id":"3c5e7a9b-1d2f-4a6c-8e0b-4d6f8a1c3e5b"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
not_found404 | No bill of the business has that bill_id. | Find it with purchasing_list_bills. |
unbalanced400 | The debits and credits do not add up to the same amount. | Make the lines balance. |
before_start409 | The date is before the books start. | Use a later date. |
period_locked409 | The books are locked for that date. | Use a later date, or unlock with books_lock. |
no_rate409 | There is no exchange rate for the currency on that day. | Pass rate, or set a standing rate with books_setup rates. |
rates_loading503 | The day's exchange rates are still loading. | Try again in a few minutes, or pass rate. |
invalid_input400 | Not exactly one of bill_id, refund and void; or an amount or date that is not valid. | Fix what the message names. |
more_than_left409 | The credit has less left than the amount, or nothing. | Use or record at most what is left. |
more_than_balance409 | The bill owes less than the amount. | Leave amount out to use what fits. |
other_supplier409 | The bill is another supplier's. | Use it on this supplier's bills. |
currency_mismatch409 | The bill is in another currency. | Use it on a bill in its currency. |
void409 | The bill is void. | Use it on another bill. |
already_paid409 | The bill is paid in full. | Use it on another bill, or record it coming back. |
in_use409 | Void: some of the deposit is used or came back already. | Record the rest coming back. |
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