Invoice Summary Analytics
fortnox_invoice_summaryCalculate invoice totals, counts, and averages for any date range. Filter by status or customer, group by customer or month, and get revenue breakdowns for actionable financial insights.
Instructions
Calculate summary statistics for invoices over a period.
Answers questions like:
"What was my total revenue this month?"
"How many invoices did we send last quarter?"
"What's the average invoice amount this year?"
"Show me revenue breakdown by customer"
Args:
period ('today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'this_quarter' | 'last_quarter' | 'this_year' | 'last_year'): Date period to analyze
from_date (string): Start date YYYY-MM-DD (ignored if period specified)
to_date (string): End date YYYY-MM-DD (ignored if period specified)
filter ('cancelled' | 'fullypaid' | 'unpaid' | 'unpaidoverdue' | 'unbooked'): Filter by invoice status
customer_number (string): Filter by specific customer
group_by ('customer' | 'month' | 'status'): Group statistics by dimension
include_details (boolean): Include individual invoice list (default: false)
response_format ('markdown' | 'json'): Output format
Returns: For JSON: { period, date_range, summary: { count, total, average, min, max, ... }, groups?: [...], invoices?: [...] } For Markdown: Formatted summary with totals and optional breakdown
Examples:
Monthly revenue: period="this_month"
Revenue by customer this year: period="this_year", group_by="customer"
Unpaid invoice totals: filter="unpaid"
Error Handling:
Returns truncation warning if >10,000 invoices
Returns "Error: ..." if API call fails
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Filter invoices by status before calculating summary | |
| period | No | Date period to analyze (e.g., 'this_month', 'last_quarter'). If not specified, analyzes all invoices. | |
| to_date | No | End date for analysis (YYYY-MM-DD). Ignored if period is specified. | |
| group_by | No | Group summary statistics by this dimension | |
| from_date | No | Start date for analysis (YYYY-MM-DD). Ignored if period is specified. | |
| customer_number | No | Filter by specific customer number | |
| include_details | No | Include list of individual invoices in the response | |
| response_format | No | Output format: 'markdown' or 'json' | markdown |