Make a customer statement
Makes a customer statement, outstanding or activity, as a PDF, and emails it when asked, like Xero's statements.
$0.05 a call
From your agent’s balance. A call that fails costs nothing.
An example
Send Hotel Elbblick a statement of everything they still owe us.
Your agent callsinvoices_statement$0.05 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.
{
"customer": {
"email": "lukas.meyer@hotel-elbblick.example"
},
"kind": "outstanding"
}Use it when
A customer asks what they owe, at month end, or before chasing a customer with several open invoices.
- For a reminder about one invoice, use
invoices_remind. - For everyone who owes, in one report, use
invoices_report.
What it does
A customer statement, like Xero's. outstanding (the default) lists every invoice the customer still owed on as_of (default today) with what was paid or credited, how late each is and the money owed by how late; activity starts from what they owed before from, lists each invoice, payment and credit note up to to (default this month so far) with the running balance, and ends with what they owed. One currency (default the one they are billed in most). It is a PDF in the file store in the business's look and document language; email: true also emails the customer a link to it in the business's name, under the rules every bot email follows and at most once a day per customer. $0.05.
What comes back
statement: the kind, the customer, the currency, then for outstanding as_of, the open invoices (paid, credited, balance, days overdue), total_due and the money by how late; for activity from, to, the opening balance, each line with the running balance and the closing balance; and pdf, the file with a download link. sent_to when it was emailed. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
customerRequired | object | Whose statement: a CRM contact_id or company_id, or the email or the name on their invoices. |
customer.contact_id | integer | At least 1. |
customer.company_id | integer | At least 1. |
customer.email | string | Up to 254 characters. |
customer.name | string | Up to 200 characters. |
kind | string | One of: outstanding,activity. |
as_of | string | YYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$. |
from | string | YYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$. |
to | string | YYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$. |
currency | string | ISO 4217, e.g. "USD", "EUR" or "JPY". Matches ^[A-Za-z]{3}$. |
email | boolean | Default: false. |
send_to | string | Another address to email it to. Up to 254 characters. |
message | string | Your own words above the amount due. Up to 2,000 characters. |
link_hours | integer | 1 to 168. Default: 24. |
The call
Over MCP, call invoices_statement on https://api.conecto.chat/mcp/invoices. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/invoices_statement \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"customer":{"email":"lukas.meyer@hotel-elbblick.example"},"kind":"outstanding"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
invalid_input400 | customer names nobody (no contact_id, company_id, email or name), a date is not YYYY-MM-DD, or from is after to. | Fix what the message names. |
not_found404 | The business has sent that customer no invoices. | Find them with invoices_list by name or email. |
no_email409 | email is true but there is no address for the customer. | Pass send_to. |
suppressed422 | The address bounced, complained or unsubscribed before. | Send to another address. |
payment_required_for_outbound402 | The balance is still free credit, which cannot email people outside the business. | Top up once, or make it without email and hand over the link. |
too_many_emails429 | A statement went to this customer in the last 24 hours. | Try again tomorrow. |
email_failed502 | The email could not be sent; nothing was charged. | Call again in a moment. |
unavailable503 | The PDF could not be made right now; nothing was charged. | Call again in a moment. |
More Invoices tools
All 24 tools- Set the business details
invoices_set_profileSets the business details on quotes and invoices: name, country, address, tax ID, logo, terms, tax, numbering, how to pay and legal notes.$0.001 a call - Get the business details
invoices_get_profileThe business details on quotes and invoices, the next numbers, and what is missing before documents can be sent.Free* - Connect Stripe for invoices
invoices_connect_stripeConnects the business's own Stripe account with a restricted key, so invoices can be paid online; the money goes straight to the business.$0.001 a call - Create a quote or invoice
invoices_createCreates a draft quote or invoice: the customer, the lines, the currency and the dates.$0.01 a call - Change a draft
invoices_updateChanges a draft quote or invoice; customer and lines replace the old ones.$0.01 a call - Send a quote or invoice
invoices_sendSends a draft: it gets the next number, its PDF is made, and the customer is emailed a link to view, pay or accept it.$0.10 a call - Get a quote or invoice
invoices_getOne quote or invoice in full, by invoice_id or number: lines, totals, taxes, payments, history, its page and a fresh PDF link.Free* - List quotes and invoices
invoices_listQuotes and invoices, newest first, by kind, status (also overdue, unpaid and expired), customer and issue date.Free*
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md