Customer statement
customer_statementOne customer's statement of account: the same rows, running balance and closing figure as the Statement PDF on the customer's page. Takes customerId (from resolve_customer) or customer (a name, resolved like open_invoices; an ambiguous name returns candidates), and optional from/to (YYYY-MM-DD). Each line in lines is what the PDF prints, in order: document (an invoice, credit note or debit note; charge is what it put on the customer's account, which can be lower than the invoice total, such as a marketplace order's net payout, and is negative on a credit note), payment (money applied to the document above it, on or before to) and on_account (a payment received but not applied, in payment, or a refund paid out and not applied, in charge). balance is the running balance and closingBalance the total outstanding the PDF prints. With no from, the statement covers the whole history and its closing equals the customer's A/R aging total as of to (except where a bank line was matched to invoices for more than it booked to A/R, an internal fix never printed for the customer). With from, it lists only documents and on-account payments from then, with no balance brought forward, so its closing is the period's own figure. With no to, it runs to the later of today and the customer's latest document or payment; period states the dates used. Capped at 300 lines; when more is true the closing and totals are still exact, and a later from shows the rest. With vendorId (from resolve_vendor) or vendor instead, it is that supplier's statement, as the Statement PDF on the vendor's page prints it: document lines are bills and buy-side debit notes, payment lines the money paid, and closingBalance what the company owes the supplier.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "customer_statement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| from | No | ||
| vendor | No | A supplier statement: a vendor name, resolved against this company's vendors. | |
| customer | No | A customer name, resolved against this company's customers. | |
| vendorId | No | A supplier statement: the vendor id from resolve_vendor. Give this OR `vendor`, not a customer. | |
| customerId | No | The customer id from resolve_customer. Give this OR `customer` (or, for a supplier, vendorId or vendor). |