GASP

Leads

Leads: Contacts who have expressed interest (form fill, signup, etc.).

Formula

Leads = Total new leads captured in period

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.lead_id where in_period(field.lead_created_date))

Unit: count

Breakdowns

  • by_lead_source: one row per lead_source value
  • by_lead_stage: one row per lead_stage value

Notes: New leads captured in the period. by_lead_source returns one row per lead source. by_lead_stage returns one row per stage at period end of the period's new leads, which shows how far the intake has progressed.

Data requirements

Grain: Per lead stage date, aggregate daily · Frequency: Daily · Aggregation: aggregate (day) · Staged: no · Main source: CRM.

Field Dataset Type
lead_created_date lead date
lead_id lead string
snapshot_date lead date
Example SQL (Postgres)
SELECT (SELECT COUNT(DISTINCT lead_id) FROM lead WHERE snapshot_date = :period_end AND (lead_created_date >= :period_start AND lead_created_date <= :period_end)) AS leads

From an agent: with the GASP MCP server, call lookup_metric({ "name": "Leads" }) or generate_query({ "metric": "Leads", "adapter": "<your adapter JSON>" }).

Connected in the GASP relationship graph.

Downstream: what this drives

Try searching for:

↑↓navigate↵select