Invoices

Make a customer statement

invoices_statement · Changes data · Markdown

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.

With these arguments
{
  "customer": {
    "email": "lukas.meyer@hotel-elbblick.example"
  },
  "kind": "outstanding"
}
What comes back
{
  "statement": {
    "kind": "outstanding",
    "customer": {
      "name": "Hotel Elbblick GmbH",
      "email": "lukas.meyer@hotel-elbblick.example",
      "address": null
    },
    "currency": "EUR",
    "as_of": "2026-10-14",
    "invoices": [
      {
        "number": "INV-0043",
        "issue_date": "2026-09-10",
        "due_date": "2026-09-24",
        "total": "4569.60",
        "paid": "0.00",
        "credited": "0.00",
        "balance": "4569.60",
        "days_overdue": 20
      }
    ],
    "credits": [],
    "credit_left": "0.00",
    "total_due": "4569.60",
    "ages": {
      "current": "0.00",
      "days_1_30": "4569.60",
      "days_31_60": "0.00",
      "days_61_90": "0.00",
      "days_over_90": "0.00"
    },
    "pdf": {
      "file_id": "759f4cd3-a8b9-46bd-9f36-5c378d805fe7",
      "name": "Offene Posten Hotel Elbblick GmbH 2026-10-14.pdf",
      "content_type": "application/pdf",
      "size": "582 bytes",
      "size_bytes": 582,
      "sha256": "7a628ee1199dd863f0236a61a39b6729a977b4ea18a669e9930a57280cb2326e",
      "created_at": "2026-10-14T08:00:00+00:00",
      "download_url": "https://cncto.co/d/759f4cd3-a8b9-46bd-9f36-5c378d805fe7?t=eyJmIjoiNzU5ZjRjZDMtYThiOS00NmJkLTlmMzYtNWMzNzhkODA1ZmU3IiwiZXhwIjoxNzkyNDgxMDUxfQ:1xIhj9:GdIXThYI_-cMws-rSQRFJx9YsmvctvESiviR6VyyD0g",
      "link_expires_in_hours": 24
    }
  }
}

Use it when

A customer asks what they owe, at month end, or before chasing a customer with several open invoices.

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

NameTypeWhat it is
customerRequiredobjectWhose statement: a CRM contact_id or company_id, or the email or the name on their invoices.
customer.contact_idintegerAt least 1.
customer.company_idintegerAt least 1.
customer.emailstringUp to 254 characters.
customer.namestringUp to 200 characters.
kindstringOne of: outstanding,activity.
as_ofstringYYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$.
fromstringYYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$.
tostringYYYY-MM-DD. Matches ^\d{4}-\d{2}-\d{2}$.
currencystringISO 4217, e.g. "USD", "EUR" or "JPY". Matches ^[A-Za-z]{3}$.
emailbooleanDefault: false.
send_tostringAnother address to email it to. Up to 254 characters.
messagestringYour own words above the amount due. Up to 2,000 characters.
link_hoursinteger1 to 168. Default: 24.

The call

Over MCP, call invoices_statement on https://api.conecto.chat/mcp/invoices. Over REST:

Terminal
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.

CodeWhenWhat to do
invalid_input400customer 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_found404The business has sent that customer no invoices.Find them with invoices_list by name or email.
no_email409email is true but there is no address for the customer.Pass send_to.
suppressed422The address bounced, complained or unsubscribed before.Send to another address.
payment_required_for_outbound402The 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_emails429A statement went to this customer in the last 24 hours.Try again tomorrow.
email_failed502The email could not be sent; nothing was charged.Call again in a moment.
unavailable503The PDF could not be made right now; nothing was charged.Call again in a moment.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md