Agent context
Salesforce models
5 SQL models that turn the raw Salesforce tables into the reports people ask about. Deploy them in Weld and your agent queries the definitions behind every number.
How the set is built
- 8Raw tables
- 8Staging
- 6Core
- 5Analytics
Staging cleans each raw table once, core holds the logic, and analytics is the table dashboards and agents read.
- Lead funnel dailyLeads created and converted per day per lead source, with the conversion of each day's new leads followed through to a won opportunity.grain: date_day x salesforce_org x lead_source · 5 raw tables
- Opportunity pipelineEvery opportunity with its outcome, stage, account and owner.grain: one row per opportunity (salesforce_org x opportunity_id) · 4 raw tables
- Opportunity stage historyEvery stage each opportunity has been in, when it got there, when it left and how long it stayed.grain: one row per opportunity x stage entry · 5 raw tables
- Pipeline flow dailyOpportunities created, won and lost, and open pipeline due, per day per owner.grain: date_day x salesforce_org x owner_id x currency_code · 4 raw tables
- Rep activityCalls, emails, completed tasks and meetings logged per rep per day.grain: date_day x salesforce_org x owner_id · 3 raw tables
- Weld or dbt
- The same SQL in both dialects. Sync the folder with GitHub Sync, or copy the dbt models into your project.
- Check before you rely on it
- Reconcile a month against Salesforce's own reports first. Each model's notes say what the synced data can and can't support.
Connect Salesforce.
Your agents start with context.
Sync Salesforce to your warehouse, deploy these models, and query them from Claude, Cursor or ChatGPT over MCP. Free for 14 days, no credit card.