Collection Rate
Collection Rate: Percentage of invoiced amounts collected.
Formula
Collection Rate = Amount of invoices paid / Amount invoiced × 100 Computable definition
The canonical formula in the GASP formula grammar. The MCP server compiles it to SQL over the datasets listed below.
sum(field.invoice_amount where in_period(field.invoice_date) and field.payment_date is not null) / metric.billings Unit: percent (the formula yields an unscaled ratio)
Notes: Invoice-level cash: an invoice issued in the period counts at its full amount once it has a payment date. The ontology has no payment amount field, so partial payments are not measured separately.
Data requirements
Grain: Per event · Frequency: Per transaction · Aggregation: event · Staged: no · Main source: Billing.
| Field | Dataset | Type |
|---|---|---|
invoice_amount | invoice | decimal |
invoice_date | invoice | date |
payment_date | invoice | date |
snapshot_date | invoice | date |
Example SQL (Postgres)
SELECT (CAST((SELECT COALESCE(SUM(invoice_amount), 0) FROM invoice WHERE snapshot_date = :period_end AND ((invoice_date >= :period_start AND invoice_date <= :period_end) AND payment_date IS NOT NULL)) AS DOUBLE PRECISION) / NULLIF(((SELECT COALESCE(SUM(invoice_amount), 0) FROM invoice WHERE snapshot_date = :period_end AND (invoice_date >= :period_start AND invoice_date <= :period_end))), 0)) AS collection_rate From an agent: with the GASP MCP server, call
lookup_metric({ "name": "Collection Rate" }) or generate_query({ "metric": "Collection Rate", "adapter": "<your adapter JSON>" }).