How to build SugarCRM sales dashboards in Metabase
SugarCRM is where your accounts, opportunities, and activities live. Metabase is where you turn that into shared, trustworthy sales dashboards. Sugar has one advantage many CRMs don't: self-hosted editions run on a SQL database you can query directly. This guide covers the database route (direct for self-hosted, synced for SugarCloud) plus a lightweight MCP + CLI route that pulls live data with a SugarCRM MCP server and loads a CSV into Metabase with the Metabase CLI for quick analysis.
How do you connect SugarCRM to Metabase?
Most teams combine both routes: use the SugarCRM MCP server and Metabase CLI route to pull live data and stand up a quick analysis, and the database route for the sales dashboards the team depends on.
Live data in, quick analysis out
Connect SugarCRM through a managed MCP server (Pipedream) to read live opportunities, accounts, and activities, then pair it with the Metabase CLI, whose upload command loads a CSV into Metabase as a ready-to-query table and model.
- Quick lookups like "which opportunities slipped their close date?"
- Loading a SugarCRM CSV export into Metabase in seconds
- Spot-checks and one-off analyses without a warehouse
- Great for exploration, not governed reporting
- Scope the SugarCRM MCP connection to read-only where possible
- CSV uploads are snapshots — refresh or move to the database route for history
Durable dashboards with history
Self-hosted Sugar runs on a SQL database you can point Metabase at directly (use a read replica). SugarCloud customers sync via the REST API or a connector into a warehouse, then connect Metabase.
- Pipeline, win-rate, and forecast dashboards the whole team relies on
- Sales cycle and stage-conversion trends over quarters
- Joining CRM data with product usage, billing, or support data
- Self-hosted: query a replica, never the live app database
- SugarCloud: requires a sync and a destination database to maintain
- You own the won/lost and stage definitions and the refresh schedule
What can you analyze from SugarCRM data in Metabase?
- Pipeline — open opportunity value by stage, rep, and team, plus weighted forecast
- Win rate — Closed Won vs. Closed Lost, by team and source
- Sales cycle length — created to won, with median and p90
- Stage conversion — where opportunities advance and where they stall
- Deal size — average and median amount, plus mix by team
- Activity — calls, meetings, and tasks by rep and account
Which SugarCRM dashboards should you build in Metabase?
Pipeline
The open book of business, right now.
- Open opportunities by sales stage (funnel)
- Pipeline value by rep and team (bar)
- Weighted forecast vs. quota (number)
- Opportunities past their close date (table)
Conversion
Where opportunities advance and where they stall.
- Stage-to-stage conversion (funnel)
- Win rate by team and lead source (bar)
- Created vs. won by month (dual line)
- Lost reasons breakdown (bar)
Velocity
How fast opportunities close.
- Median sales cycle length (number + trend)
- Time-in-stage by stage (bar)
- Deal velocity: value / cycle time (number)
- Aging of open opportunities (table)
Activity
Effort and coverage across the team.
- Calls and meetings logged by rep (bar)
- Activities per open opportunity (number)
- Follow-up rate on new leads (number)
- Lead response time (line)
How do you use the SugarCRM MCP server with the Metabase CLI?
Connect SugarCRM through a managed MCP server (Pipedream) and pair it with the Metabase CLI for fast, hands-on analysis. The Sugar MCP looks up current opportunities, accounts, and activities; the Metabase CLI's upload command loads a CSV into Metabase and creates a ready-to-query table and model. Scope the connection to read-only where possible.
Example workflow
- Ask the Sugar MCP which open opportunities are past their close date, or pull an account's open opportunities and recent activity.
- Export the opportunities or pipeline view you want to keep as a CSV.
- Run
mb upload csvto load it into Metabase as a table and model, then build questions and dashboards on top.
Be honest about the limits
- The Sugar MCP is great for live lookups — not for scheduled or audited pipeline reporting.
- A CSV upload is a point-in-time snapshot; refresh it with
mb upload replaceor move to the database route for real history. - Scope the managed connection to read-only where possible; it acts with the permissions of the connected Sugar account.
mb upload csvneeds an uploads database configured under Admin → Settings → Uploads.
How do you set up the SugarCRM MCP server and the Metabase CLI?
SugarCRM MCPmanaged
- Provider
- Pipedream (managed connector)
- Endpoint
https://mcp.pipedream.net/v2- Auth
- Connect your SugarCRM account in Pipedream
- Note
- No official first-party SugarCRM MCP server yet
Metabase CLIofficial
- Install
npm install -g @metabase/cli- Auth
mb auth login(browser OAuth on v62+, or an API key)- Load data
mb upload csv --file data.csv- Requires
- An uploads database (Admin → Settings → Uploads)
{
"mcpServers": {
"sugarcrm": {
"url": "https://mcp.pipedream.net/v2"
}
}
}# Install the Metabase CLI
npm install -g @metabase/cli
# Log in (opens your browser; requires Metabase v62+)
mb auth login --url https://your-metabase.example.com
# Load a SugarCRM CSV export — creates a table AND a model
mb upload csv --file sugarcrm-opportunities.csv --collection root
# Refresh that same table later from a new export
mb upload replace <table-id> --file sugarcrm-opportunities.csvSugarCRM doesn't publish a first-party MCP server, so the practical path is a managed connector: connect your Sugar account in Pipedream, then use its static MCP URL. Because a third party brokers access, scope the connection tightly and review what the connector can read and write. The Metabase CLI stores its credentials securely after mb auth login.
Can you generate a SugarCRM dashboard with AI?
Yes. Use the prompt below with any assistant that can run the SugarCRM MCP server and the Metabase CLI. It works end to end: if Sugar tables already exist in Metabase — read from the database directly or uploaded — it analyzes those; otherwise it pulls the data over the Sugar MCP, loads it with mb upload csv, then builds the dashboard — fixing the win-rate denominator and skipping metrics the data can't support instead of faking them.
Create a polished Metabase dashboard for SugarCRM sales analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.
Goal: Help sales leaders understand pipeline, win rate, conversion, sales cycle,
and forecast from SugarCRM data.
Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for Sugar tables and
models, and any connected Sugar database). If durable data is already present —
a read replica for self-hosted Sugar, a synced SugarCloud copy, or uploaded
earlier — use it and skip to Step 2.
- If nothing is there, pull it with the SugarCRM MCP server (scope the connection
to read-only where possible): opportunities, accounts, leads, and activities.
Write each result to a CSV, then load it with the Metabase CLI — run
"mb upload csv --file <export>.csv" so each upload creates a table and a
ready-to-query model. Use "mb upload replace <table-id> --file <export>.csv" to
refresh an existing table instead of creating duplicates.
Step 2 — Inspect before querying:
SugarCRM CSV exports are usually flat and pre-aggregated (one row per opportunity,
with columns like sales_stage, amount, and date_closed), while the Sugar database
holds raw tables plus the opportunities_audit change log. Inspect the actual
tables and column names first; do not assume exact names or that an audit/stage
history table exists.
Important:
- Build on whatever data is present; don't claim Metabase connects natively to
SugarCRM — it reads a database or CLI-uploaded tables.
- Sugar's sales_stage values include Closed Won and Closed Lost — define "won"
and "closed" once and reuse them.
- For win rate, state the denominator explicitly (won / closed vs. won / created)
and hold the cohort fixed.
- Report sales cycle length and deal size as medians (p50) and p90, never plain
averages — both are right-skewed.
- Only compute sales cycle length, time-in-stage, or stage conversion when
opportunity stage-change history (opportunities_audit) exists; otherwise use a
caveat.
- Convert amounts to a single reporting currency using amount_usdollar or a rate
table; caveat any mix.
- Only build a card if its underlying column/metric exists in the data.
- A single CSV is a point-in-time snapshot: only build trend cards if there is a
usable date column or multiple periods have been uploaded.
Dashboard title: SugarCRM Sales Overview
Sections:
1. Executive summary (KPI cards): Open pipeline; Weighted forecast; Win rate
(last 90 days); Median sales cycle length; Average and median deal size;
Opportunities closing this period.
2. Pipeline: Open opportunities by stage; value by rep and team; slipped deals.
3. Conversion: Stage-to-stage conversion; win rate by team and source; lost
reasons.
4. Velocity: Median cycle length; time-in-stage; deal velocity; aging.
5. Activity: Calls/meetings by rep; activities per opportunity; lead response.
Filters: Team, Sales stage, Rep, Lead source, Date range.
Reuse the models Metabase auto-created from uploaded CSVs, or (for a database or
warehouse) create reusable models: modeled_sugar_opportunities,
modeled_sugar_stage_history, modeled_sugar_accounts, modeled_sugar_leads, and
modeled_sugar_activities.
Output: Build the dashboard if you have permission; otherwise provide the exact
questions, SQL, model definitions, and layout. Include caveats for any metric
that cannot be calculated from the available data. Reconcile totals against
Sugar's own reports. Keep it practical, dense, and executive-readable.How do you connect SugarCRM's database to Metabase?
Sugar gives you two database paths depending on how you run it.
Self-hosted (Sugar Sell / on-prem)
- Sugar stores everything in its SQL database — connect Metabase to a read replica, not the live application database.
- Build clean models on top of the raw tables (
opportunities,accounts,leads,calls,meetings). - The
opportunities_audittable records field changes — use it for stage history.
SugarCloud
- Use the Sugar REST API or a managed connector to sync into a warehouse on a schedule.
- dlt (code) — write a Python pipeline against the API for incremental loads.
- Capture the audit / change stream so you don't lose stage transitions between syncs.
How should you model SugarCRM data in Metabase?
Core tables
| Table | Grain | Key columns |
|---|---|---|
opportunities | one row per opportunity | id, account_id, sales_stage, amount, amount_usdollar, probability, date_entered, date_closed, assigned_user_id |
opportunities_audit | one row per field change | parent_id, field_name, after_value_string, date_created |
accounts | one row per account | id, name, industry |
leads | one row per lead | id, lead_source, status, date_entered |
calls / meetings | one row per activity | id, parent_id, status, date_start, assigned_user_id |
users | one row per user | id, user_name, reports_to_id |
Modeling advice
- Build a
modeled_sugar_opportunitiestable with cleansales_stage,amount_usdollar(one currency),probability, anddate_closed. - Derive
modeled_sugar_stage_historyfromopportunities_audit(field_name = 'sales_stage') for time-in-stage and cycle length. - Normalize sales stages into an ordered funnel for conversion charts.
- Use
amount_usdollarto avoid mixing currencies in totals. - Reconcile modeled pipeline and win rate against Sugar's own reports before anyone trusts the numbers.
Which SugarCRM metrics should you track in Metabase?
| Metric | Definition | Notes |
|---|---|---|
| Open pipeline | Sum of amount for open opportunities. | Segment by stage, rep, team. |
| Weighted forecast | Sum of amount × probability. | Read alongside unweighted pipeline. |
| Win rate | Closed Won ÷ closed opportunities. | Fix the denominator (closed vs. created) first. |
| Sales cycle length | Created → won, in days. | Report median and p90; it's right-skewed. |
| Stage conversion | Opportunities reaching stage N+1 ÷ reaching stage N. | Needs the audit log. |
| Average deal size | Won amount ÷ won opportunities. | Report the median too; outliers distort the mean. |
What SQL powers SugarCRM dashboards in Metabase?
These assume the modeled tables above (PostgreSQL dialect). Adjust identifiers to match your warehouse.
Closed Won as a share of closed opportunities over the last 12 months.
SELECT
date_trunc('month', o.date_closed) AS month,
COUNT(*) FILTER (WHERE o.sales_stage = 'Closed Won') AS won,
COUNT(*) FILTER (WHERE o.sales_stage IN ('Closed Won', 'Closed Lost')) AS closed,
ROUND(
100.0 * COUNT(*) FILTER (WHERE o.sales_stage = 'Closed Won')
/ NULLIF(COUNT(*) FILTER (WHERE o.sales_stage IN ('Closed Won', 'Closed Lost')), 0),
1
) AS win_rate_pct
FROM modeled_sugar_opportunities o
WHERE o.sales_stage IN ('Closed Won', 'Closed Lost')
AND o.date_closed >= CURRENT_DATE - INTERVAL '12 months'
GROUP BY 1
ORDER BY 1;Open opportunities, raw value, and weighted value by sales stage.
SELECT
o.sales_stage,
COUNT(*) AS open_opps,
ROUND(SUM(o.amount_usdollar), 2) AS pipeline_value,
ROUND(SUM(o.amount_usdollar * o.probability / 100.0), 2) AS weighted_value
FROM modeled_sugar_opportunities o
WHERE o.sales_stage NOT IN ('Closed Won', 'Closed Lost')
GROUP BY o.sales_stage
ORDER BY pipeline_value DESC;Days from created to won; medians beat averages here.
-- Median days from created to won, by month closed
SELECT
date_trunc('month', o.date_closed) AS month,
percentile_cont(0.5) WITHIN GROUP (
ORDER BY EXTRACT(EPOCH FROM (o.date_closed - o.date_entered)) / 86400.0
) AS median_cycle_days,
percentile_cont(0.9) WITHIN GROUP (
ORDER BY EXTRACT(EPOCH FROM (o.date_closed - o.date_entered)) / 86400.0
) AS p90_cycle_days
FROM modeled_sugar_opportunities o
WHERE o.sales_stage = 'Closed Won'
GROUP BY 1
ORDER BY 1;What are common mistakes when analyzing SugarCRM in Metabase?
amount_usdollar (or a rate table) so totals aren't a blend of currencies.opportunities_audit — a snapshot can't tell you when a deal entered or left a stage.