How to build Alguna billing dashboards in Metabase
Alguna is a modern CPQ and billing platform that connects quote-to-cash for B2B SaaS — pricing, quoting, usage metering, invoicing, and collections. Metabase is where you turn that into shared, trustworthy dashboards for committed and usage-based revenue, AR, and quote-to-cash. This guide covers two complementary paths: a lightweightMCP + CLI route that pulls live data with the Alguna MCP server and loads a CSV into Metabase with the Metabase CLI for quick analysis, and a durable pipeline route that syncs Alguna into a database so you can build committed-revenue, usage, and AR dashboards anyone can read.
How do you connect Alguna to Metabase?
Most teams combine both routes: use the Alguna MCP server and Metabase CLI route to pull live data and stand up a quick analysis, and the pipeline route for the revenue and AR dashboards finance depends on.
Live data in, quick analysis out
Pair the Alguna MCP server (to look up live quotes, contracts, subscriptions, and invoices) with the Metabase CLI, whose upload command loads a CSV into Metabase as a ready-to-query table and model.
- Quick lookups like "which invoices are overdue this week?"
- Loading an Alguna CSV export into Metabase in seconds
- Spot-checks and one-off analyses without a warehouse
- Great for exploration, not governed revenue reporting
- Use a read-only Alguna API key so analysis can't trigger writes
- CSV uploads are snapshots — refresh or move to the pipeline for history
Durable dashboards with history
Sync Alguna via its API and webhooks into a database, then point Metabase at it.
- Committed MRR/ARR, usage revenue, and invoiced-revenue dashboards
- Quote-to-cash cycle and AR/DSO analysis over time
- Joining billing data with product-usage metering and CRM data
- Requires a destination database and a sync to maintain
- Usage-based revenue needs careful, documented rating logic
- Reconcile against the Alguna dashboard before anyone trusts the numbers
What can you analyze from Alguna data in Metabase?
- Committed MRR/ARR — recurring commitments from contracts
- Usage-based revenue — metered consumption and overages
- Invoicing and AR — invoiced revenue, accounts receivable, DSO, and aging
- Quote-to-cash — quote acceptance, win rate, and cycle time
- ARPU and LTV — value per account across pricing models
- Discounting — list vs. realized price and its revenue impact
Which Alguna dashboards should you build in Metabase?
Committed & usage revenue
Recurring commitments plus what usage adds on top.
- Committed MRR/ARR right now (number + trend)
- Usage (metered) revenue by month (line)
- Committed vs. usage revenue split (stacked bar)
- Net new MRR from new and expanded contracts (waterfall)
Invoicing & AR
Invoiced revenue and how fast it's collected.
- Invoiced revenue by month (bar)
- Accounts receivable and DSO (number + line)
- AR aging buckets: current, 30/60/90+ (table)
- Overdue invoices by customer (table)
Quote-to-cash
How deals move from quote to booked revenue.
- Quotes issued, accepted, and win rate (funnel)
- Average quote-to-cash cycle time (number)
- Bookings by product and pricing model (bar)
- Discounting vs. list price (table)
Usage & metering
What drives usage-based revenue.
- Metered usage by feature/meter over time (line)
- Customers near a committed-usage threshold (table)
- Overage revenue by customer (bar)
- Usage per account vs. plan tier (scatter/table)
How do you use the Alguna MCP server with the Metabase CLI?
Pair the Alguna MCP server with the Metabase CLI for fast, hands-on analysis. Alguna hosts a remote MCP server (reached through the mcp-remote bridge) that looks up live quotes, contracts, subscriptions, and invoices; the Metabase CLI's upload command loads a CSV into Metabase and creates a ready-to-query table and model. For analysis, scope the Alguna API key to read-only.
Example workflow
- Ask the Alguna MCP which invoices are overdue this week, or pull a customer's contract, usage, and invoices.
- Export the contracts, usage measurements, and invoices you want to keep as CSVs.
- Run
mb upload csvto load them into Metabase as tables and models, then build questions and dashboards on top.
Be honest about the limits
- The Alguna MCP is great for live lookups — not for scheduled or audited revenue reporting.
- A CSV upload is a point-in-time snapshot; MRR movement and AR trends still need a warehouse sync, or refresh with
mb upload replace. - Respect Alguna API rate limits and scope the API key to read-only.
mb upload csvneeds an uploads database configured under Admin → Settings → Uploads.
How do you set up the Alguna MCP server and the Metabase CLI?
Alguna MCPofficial
- Endpoint
https://api.alguna.io/mcp- Sandbox
https://api.sandbox.alguna.io/mcp- Transport
- Remote via the
mcp-remotebridge - Auth
Authorization: Bearerwith an API key
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)
# Alguna (remote via mcp-remote bridge)
claude mcp add alguna -- npx -y mcp-remote https://api.alguna.io/mcp \
--header "Authorization: Bearer <YOUR_ALGUNA_API_KEY>"{
"mcpServers": {
"alguna": {
"command": "npx",
"args": [
"-y", "mcp-remote", "https://api.alguna.io/mcp",
"--header", "Authorization:Bearer ${ALGUNA_API_KEY}"
],
"env": { "ALGUNA_API_KEY": "<YOUR_ALGUNA_API_KEY>" }
}
}
}Get an API key in the Alguna dashboard under Settings → API keys, and use the sandbox base URL (api.sandbox.alguna.io) to validate your setup first.
# 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 an Alguna CSV export — creates a table AND a model
mb upload csv --file alguna-invoices.csv --collection root
# Refresh that same table later from a new export
mb upload replace <table-id> --file alguna-invoices.csvThe Metabase CLI stores its credentials securely after mb auth login.
Can you generate an Alguna dashboard with AI?
Yes. Use the prompt below with any assistant that can run the Alguna MCP server and the Metabase CLI. It works end to end: if Alguna tables already exist in Metabase it analyzes those; otherwise it pulls the data over the Alguna MCP, loads it with mb upload csv, then builds the dashboard — separating committed and usage revenue and skipping cards it has no data for.
Create a polished Metabase dashboard for Alguna billing analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.
Goal: Help finance and RevOps leaders understand committed and usage-based
revenue, invoicing, accounts receivable, and quote-to-cash from Alguna data.
Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for Alguna tables and
models). If durable Alguna data is already present — synced from a warehouse or
uploaded earlier — use it and skip to Step 2.
- If nothing is there, pull it with the Alguna MCP server using a read-only API
key: customers, quotes, contracts, subscriptions, usage measurements, and
invoices. 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:
Do not assume exact table names. Map the available raw tables into these
analytical concepts where possible: Customers, Quotes, Contracts, Subscriptions,
Products/Prices, Usage measurements (metering), Invoices, Invoice line items, and
Payments. Inspect the actual tables and column names first.
Important:
- Build on whatever data is present; don't claim Metabase connects natively to
Alguna — it reads a database or CLI-uploaded tables.
- Separate committed recurring revenue (MRR/ARR) from usage-based (metered)
revenue and overages; document the rating logic.
- For AR, compute DSO and aging from open invoices, not paid ones.
- Report revenue in a single reporting currency.
- Only build a card if its underlying column/metric exists in the data.
- A single CSV is a point-in-time snapshot: MRR movement and AR trends need
history, so build trend cards only if a warehouse sync or multiple uploads
provide it.
Dashboard title: Alguna Billing Overview
Sections:
1. Executive summary (KPI cards): Committed MRR; ARR; Usage revenue this month;
Invoiced revenue; Accounts receivable; DSO.
2. Committed & usage revenue: Committed vs. usage split; Net new MRR; Usage
revenue trend.
3. Invoicing & AR: Invoiced revenue; AR aging buckets; Overdue invoices.
4. Quote-to-cash: Quotes issued/accepted/win rate; Quote-to-cash cycle time;
Bookings by pricing model.
5. Usage & metering: Metered usage over time; Customers near a committed
threshold; Overage revenue.
Filters: Product, Pricing model, Customer segment, Currency, Date range.
Reuse the models Metabase auto-created from uploaded CSVs, or (for a warehouse)
create reusable models: modeled_alguna_contracts, modeled_alguna_usage,
modeled_alguna_invoices, and modeled_alguna_mrr (a monthly committed-MRR model).
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 the
Alguna dashboard. Keep it practical, dense, and executive-readable. Avoid vanity
metrics.How do you build the Alguna → Metabase pipeline?
For dashboards that need history and reliability, land Alguna data in a database first, then connect Metabase to that database.
Connector options
- dlt / custom pipeline (free, code) — wrap the Alguna API in a Python pipeline for full control over shaping and scheduling.
- Alguna API (free, raw) — paginate customers, contracts, subscriptions, usage, and invoices into your own pipeline.
- Webhooks (free, events) — Alguna sends billing events; stream them into a table for near-real-time dashboards.
Notes
- Land raw tables first, then build clean models on top.
- Keep the usage-rating logic in one modeled layer so committed and usage revenue never drift.
- Compute AR and DSO from open invoices, not paid ones.
- Committed MRR is derived from active contracts and their recurring terms.
How should you model Alguna data in Metabase?
Core tables
| Concept | Grain | Key columns |
|---|---|---|
customers | one row per customer | id, name, created_at, segment |
contracts | one row per contract | id, customer_id, start_date, end_date, committed_amount |
subscriptions | one row per subscription | id, contract_id, product_id, status, billing_period |
usage_measurements | metered events | customer_id, meter_name, value, rated_amount, measured_at |
invoices | one row per invoice | id, customer_id, total, amount_due, status, issued_at, due_date |
invoice_line_items | one row per line | invoice_id, type (recurring/usage/one-time), amount |
Modeling advice
- Build a
modeled_alguna_mrrtable for committed recurring revenue, separate from usage revenue. - Keep usage rating in one model so overage and committed-usage logic is auditable.
- Model AR from open invoices with an aging bucket per invoice.
- Tag invoice lines by type so recurring, usage, and one-time don't blur.
- Reconcile invoiced revenue and AR against the Alguna dashboard.
Which Alguna metrics should you track in Metabase?
| Metric | Definition | Notes |
|---|---|---|
| Committed MRR/ARR | Recurring commitment from active contracts. | Separate from usage revenue. |
| Usage revenue | Rated metered consumption + overages. | Document the rating logic. |
| Invoiced revenue | Total billed in a period. | Recognize per your accounting policy. |
| DSO | Avg days to collect an invoice. | Compute from open invoices. |
| Quote-to-cash cycle | Quote issued → first payment. | Surfaces process bottlenecks. |
| Win rate | Accepted quotes ÷ issued quotes. | Segment by product and size. |
What SQL powers Alguna dashboards in Metabase?
These assume the modeled tables above (PostgreSQL dialect, amounts in minor units). Adjust identifiers to match your schema.
Recurring commitment from active contracts.
-- Committed MRR/ARR from a monthly committed-MRR model
SELECT
ROUND(SUM(committed_mrr), 2) AS committed_mrr,
ROUND(SUM(committed_mrr) * 12, 2) AS committed_arr,
COUNT(*) AS active_contracts
FROM modeled_alguna_mrr
WHERE month = date_trunc('month', CURRENT_DATE);Open receivables bucketed by days past due.
-- AR aging from open invoices
SELECT
CASE
WHEN CURRENT_DATE - due_date <= 0 THEN 'current'
WHEN CURRENT_DATE - due_date <= 30 THEN '1-30'
WHEN CURRENT_DATE - due_date <= 60 THEN '31-60'
WHEN CURRENT_DATE - due_date <= 90 THEN '61-90'
ELSE '90+'
END AS aging_bucket,
COUNT(*) AS invoices,
ROUND(SUM(amount_due) / 100.0, 2) AS open_amount
FROM invoices
WHERE status IN ('open', 'overdue')
GROUP BY 1
ORDER BY MIN(CURRENT_DATE - due_date);Rated metered consumption over the last year.
-- Metered usage revenue by month
SELECT
date_trunc('month', measured_at) AS month,
meter_name,
ROUND(SUM(rated_amount) / 100.0, 2) AS usage_revenue
FROM usage_measurements
WHERE measured_at >= CURRENT_DATE - INTERVAL '12 months'
GROUP BY 1, meter_name
ORDER BY 1, usage_revenue DESC;