Generate AR aging report
generate_aging_reportUse this when the user wants an accounts receivable aging report (AR aging report, aged receivables, 'who owes me money and how late', ar aging report template filled in) from open invoices typed in chat, pasted as CSV/TSV, or attached as a CSV/XLSX export from QuickBooks, Xero, FreshBooks or Wave. Buckets each open balance into Current, 1-30, 31-60, 61-90 and over 90 days past due as of a date (default today in New York), with per-customer and grand totals that add up to the cent, partial payments and credit memos, optional DSO from credit sales, polite past-due reminder email drafts from invoice facts, and aging PDF, Excel and CSV downloads. Does not connect to accounting software, send emails or collect payments. Do not use for accounts payable (bills you owe).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | An open invoices or A/R aging export (CSV, TSV or XLSX) from QuickBooks, Xero, FreshBooks, Wave or a spreadsheet, e.g. open_invoices.csv. | |
| currency | No | Currency code, e.g. "USD" (default), "CAD", "EUR". With a mixed-currency file, only this currency is aged. | |
| invoices | No | Open invoices: an array of objects like {customer:"Acme Corp", invoice_number:"INV-1042", invoice_date:"2026-08-01", terms:"Net 30", amount:1200, amount_paid:200}, or pasted CSV/TSV text with a header row, or one line per invoice like "Acme Corp, INV-1042, 2026-08-01, Net 30, 1200, paid 200". Give this or file. | |
| as_of_date | No | Age the invoices as of this date, e.g. "2026-10-31". Default today in New York time. | |
| sender_name | No | Name to sign the reminder emails with, e.g. "Dana Lee". Default the company name. | |
| company_name | No | Your business name for the report header and email sign-off, e.g. "Bright Path Design LLC". | |
| credit_sales | No | Credit sales for the period, to compute DSO, e.g. 240000 or "$240,000". | |
| default_terms | No | Terms for invoices with no due date and no terms, e.g. "Net 30" (default) or 15. | |
| sales_period_days | No | Days in the credit sales period for DSO, e.g. 365 (default), 90, "quarter", "month". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dso | Yes | ||
| kind | Yes | ||
| input | Yes | ||
| totals | Yes | ||
| buckets | Yes | ||
| currency | Yes | ||
| customers | Yes | ||
| downloads | Yes | ||
| pdf_pages | Yes | ||
| reminders | Yes | ||
| as_of_date | Yes | ||
| as_of_note | Yes | ||
| assumptions | Yes | ||
| reminders_total | Yes | ||
| file_total_check | Yes | ||
| customers_not_shown | Yes |