Skip to main content

Leads

The leads table tracks individuals from initial capture through MQL qualification, SQL conversion, and opportunity creation. Lead scoring combines behavioral, demographic, and engagement components.

Fields

FieldTypeSourceDescription
idUUIDSystemUnique identifier
org_idUUIDSystemOrganization tenant
nameVARCHAR(200)Inbound/CRMLead full name
emailVARCHAR(255)Inbound/CRMEmail address
company_nameVARCHAR(300)Inbound/CRMCompany/district name
titleVARCHAR(200)Inbound/CRMJob title
stateVARCHAR(10)Inbound/CRMUS state code
enrollmentINTEGERStarbridge/ManualDistrict enrollment (for ICP scoring)
segmentVARCHAR(50)ComputedEnterprise, Mid-Market, SMB
source_idUUIDSystemLead source (FK to lead_sources)
source_detailTEXTSystemAdditional source context
statusENUMSystemLead lifecycle state
lead_scoreINTEGERComputedComposite lead score (0-100)
assigned_toUUIDSystem/ManualAssigned sales rep (FK to users)

Lifecycle Dates

FieldTypeDescription
mql_dateTIMESTAMPWhen the lead became MQL
sql_dateTIMESTAMPWhen the lead became SQL
opportunity_dateTIMESTAMPWhen an opportunity was created
opportunity_idUUIDLinked opportunity (FK to opportunities)

Behavioral Tracking

FieldTypeDescription
website_visitsINTEGERCount of website visits
content_downloadsINTEGERCount of content downloads
email_opensINTEGERCount of email opens
email_clicksINTEGERCount of email clicks
demo_requestedBOOLEANWhether a demo was requested

Lead Status Lifecycle

new → engaged → mql → sql → opportunity → (disqualified | recycled)
StatusDescription
newJust captured, no engagement yet
engagedHas shown some activity (opens, visits)
mqlMarketing Qualified — meets MQL trigger criteria
sqlSales Qualified — accepted by sales rep
opportunityConverted to an opportunity
disqualifiedNot a fit, removed from pipeline
recycledReturned to marketing for nurturing

Lead Score Composition

Configurable per org via org_scoring_profiles:
ComponentDefault WeightInputs
Behavioral50 points maxWebsite visits (2pts each, cap 20), content downloads (5pts, cap 25), email clicks (3pts, cap 15), demo requested (15pts)
Demographic30 points maxEnrollment tier (5-20pts), title tier (5-15pts)
Engagement20 points maxEmail opens (2pts, cap 20), website visits (1pt, cap 10)

MQL Qualification Triggers

A lead qualifies as MQL when any of these configurable thresholds are met:
TriggerDefault Threshold
Demo requestedtrue
Content downloads≥ 3
Website visits≥ 10
Email clicks≥ 3
Email opens≥ 5
Lead score≥ 60

Indexes

IndexColumnsPurpose
leads_status_idxstatusFilter by lifecycle state
leads_source_idxsource_idFilter by source
leads_assigned_idxassigned_toFilter by assignee
leads_score_idxlead_scoreSort by score
leads_mql_date_idxmql_dateFilter by MQL date