Lifecycle stages and pipelines
Roadway's CRM tables record the date each contact reached each lifecycle stage and the date each opportunity reached each pipeline stage.
The columns are custom, because your stages are custom.
Lifecycle stages on contacts
dim__contacts has one date column per lifecycle stage, named <stage>_reached_date. Name the columns after your stages.
| Your stage | Column |
|---|---|
| Lead | lead_reached_date |
| Marketing qualified lead | mql_reached_date |
| Sales qualified lead | sql_reached_date |
| Opportunity | opportunity_reached_date |
| Customer | customer_reached_date |
Each column holds the UTC date the contact reached that stage, or null if it hasn't. With a direct connector Roadway maps your stages, and weights pipeline only where the CRM provides expected revenue.
Pipeline stages on opportunities
dim__opportunities (or dim__deals) has one date column per pipeline stage, named <opportunity_stage>_reached_date, plus closed_date and is_closed_won.
Pipeline ARR
fact__pipeline_arr_snapshot has a row for every opportunity for every day from creation to close, inclusive:
| Column | Meaning |
|---|---|
opportunity_id |
The opportunity or deal ID |
date_day |
An as-of date |
pipeline_arr |
Annualized value multiplied by the probability of closing, for that day |
Example: build dim__contacts from a HubSpot export
This is illustrative and uses Airbyte names, where HubSpot properties land as properties_* columns in contacts. Names depend on your ETL tool and your property names. Check your own schema first.
CREATE OR REPLACE VIEW roadway.dim__contacts AS
SELECT
CAST(id AS VARCHAR) AS contact_id,
properties_ga4_pseudo_user_id AS visitor_id,
CAST(properties_createdate AS DATE) AS created_date,
CAST(properties_hs_v2_date_entered_lead AS DATE) AS lead_reached_date,
CAST(properties_hs_v2_date_entered_marketingqualifiedlead AS DATE) AS mql_reached_date,
CAST(properties_hs_v2_date_entered_salesqualifiedlead AS DATE) AS sql_reached_date,
CAST(properties_hs_v2_date_entered_customer AS DATE) AS customer_reached_date
FROM hubspot.contacts;
Don't include name, email, or phone columns. Roadway doesn't use PII.
On the direct-connector path, Roadway builds these tables for you. It uses the stages from your HubSpot lifecycle options and deal pipelines, or Salesforce LeadStatus and OpportunityStage. There is no fixed stage list. The snapshot keeps open days only, and weighted pipeline is empty for HubSpot.
Verify
SELECT COUNT(*) AS contacts,
COUNT(visitor_id) AS with_visitor_id,
COUNT(visitor_id) * 1.0 / COUNT(*) AS coverage
FROM roadway.dim__contacts;
Check coverage against the share of contacts that came from forms with the anonymous ID field.