Quote Accuracy
Quote Accuracy: Percentage of quotes requiring no revision.
Formula
Quote Accuracy = Quotes with no revision / Total quotes × 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.quote_id where in_period(field.quote_sent_at) and field.revision_count = 0) / count_distinct(field.quote_id where in_period(field.quote_sent_at)) Unit: percent (the formula yields an unscaled ratio)
Data requirements
Grain: Per event · Frequency: Per transaction · Aggregation: event · Staged: no · Main source: CRM.
| Field | Dataset | Type |
|---|---|---|
quote_id | quote | string |
quote_sent_at | quote | timestamp |
revision_count | quote | integer |
snapshot_date | quote | date |
Example SQL (Postgres)
SELECT (CAST((SELECT COUNT(DISTINCT quote_id) FROM quote WHERE snapshot_date = :period_end AND ((quote_sent_at >= :period_start AND quote_sent_at < (:period_end + INTERVAL '1 day')) AND revision_count = 0)) AS DOUBLE PRECISION) / NULLIF((SELECT COUNT(DISTINCT quote_id) FROM quote WHERE snapshot_date = :period_end AND (quote_sent_at >= :period_start AND quote_sent_at < (:period_end + INTERVAL '1 day'))), 0)) AS quote_accuracy From an agent: with the GASP MCP server, call
lookup_metric({ "name": "Quote Accuracy" }) or generate_query({ "metric": "Quote Accuracy", "adapter": "<your adapter JSON>" }).