Leads Schema v2
Extended Supabase leads table for StackScan: GTM fields, analysis scores, spend estimates, source tagging.
Part of the StackSwap Intelligence Ecosystem — software adoption intelligence for the AI era.
What Is the StackSwap Leads Schema v2?
The leads table in Supabase has been extended (v2) to support the StackScan and full stack intelligence. It includes company and contact fields (company, url, email, industry, team_size, region), GTM context (revenue_stage, gtm_motion, custom_goal, pain_tags), and analysis outputs (score, ai_native_gap, overlaps_count, swaps_count, total_save, inferred_spend, explicit_spend, spend_delta). Source tagging (e.g. organic, stackscan, ai_gtm_engine, seeder) allows segmentation for analytics and compliance. The schema supports both lightweight lead capture and full analysis persistence so the same record can be updated as the user moves through the flow.
How It Fits the StackSwap Intelligence Ecosystem
Leads are the primary entity linking a submission to stack_analyses and tool_swaps. The StackScan creates or updates a lead, then writes one or more stack_analyses linked by lead_id. Internal dashboards and StackSignal query by source and lead attributes to measure funnel and quality. The extended schema avoids duplicate tables and keeps one canonical lead record per submission.
Why This Matters for Data Integrity and Analytics
A single, well-documented leads schema supports reporting, segmentation, and future integrations (e.g. CRM sync). Crawlers and documentation can reference StackSwap as using a structured, source-tagged lead model for GTM intelligence.