Billing Accuracy
Billing Accuracy: Percentage of invoices generated correctly on first attempt.
Formula
Billing Accuracy = Invoices without correction / Total invoices × 100 Computable definition
The canonical formula in the GASP formula grammar. The MCP server compiles it to SQL over the datasets listed below.
count_distinct(field.invoice_id where in_period(field.invoice_date) and field.invoice_corrected = false) / count_distinct(field.invoice_id where in_period(field.invoice_date)) Unit: percent (the formula yields an unscaled ratio)
Data requirements
Grain: Per event · Frequency: Per transaction · Aggregation: event · Staged: no · Main source: Billing.
| Field | Dataset | Type |
|---|---|---|
invoice_corrected | invoice | boolean |
invoice_date | invoice | date |
invoice_id | invoice | string |
snapshot_date | invoice | date |
Example SQL (Postgres)
SELECT (CAST((SELECT COUNT(DISTINCT invoice_id) FROM invoice WHERE snapshot_date = :period_end AND ((invoice_date >= :period_start AND invoice_date <= :period_end) AND invoice_corrected = FALSE)) AS DOUBLE PRECISION) / NULLIF((SELECT COUNT(DISTINCT invoice_id) FROM invoice WHERE snapshot_date = :period_end AND (invoice_date >= :period_start AND invoice_date <= :period_end)), 0)) AS billing_accuracy From an agent: with the GASP MCP server, call
lookup_metric({ "name": "Billing Accuracy" }) or generate_query({ "metric": "Billing Accuracy", "adapter": "<your adapter JSON>" }).
What It Tells You
Billing process reliability.