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 dashboards for committed and usage-based revenue, AR, and quote-to-cash. Because Metabase reads from SQL databases, the reliable way to connect them is a small pipeline: sync Alguna into a database or warehouse on a schedule, then point Metabase at it. This guide walks through that path end to end — including a free option with no paid connector.
How do you connect Alguna to Metabase?
Metabase connects to SQL databases and warehouses — not to SaaS APIs directly, and there's no native Alguna connector. So connecting Alguna to Metabase means one thing: run a small pipeline that copies Alguna data into a database on a schedule, then connect Metabase to that database. Once the data lands, the models, metrics, and SQL later in this guide all work.
The good news: this doesn't require a paid tool. Use a managed connector if you want zero maintenance, or a free, code-based sync you host yourself — both are covered in Build the pipeline below, and in more depth in our guide to building a data pipeline.
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 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.
Can you generate an Alguna dashboard with AI?
Yes — and once Alguna data is synced into a database, this is the fastest way to a strong first draft. First give an AI assistant a way to read your Metabase schema and create questions and dashboards, then paste the prompt below. It builds the dashboard from your database tables and tells the agent to skip metrics the schema can't support instead of faking them.
Two ways to let an assistant query and build in Metabase
Both connect to a Metabase instance that's already pointed at your synced database — the pipeline above moves the data; these just let the assistant read and write Metabase. Pick whichever fits your setup:
Metabase MCP
- Best for
- Chat clients (Claude, Cursor, Codex)
- Enable
- Admin → AI → MCP
- Endpoint
https://<your-metabase>/api/metabase-mcp- Auth
- OAuth handled by Metabase
Metabase CLI
- Best for
- Terminal agents, scripts, and CI
- Install
npm install -g @metabase/cli- Auth
- Browser OAuth (v62+) or an API key
- Docs
- @metabase/cli
Set up the Metabase MCP server
Enable it under Admin → AI → MCP, then point your client at the endpoint:
# Metabase built-in MCP (replace with your instance URL)
claude mcp add --transport http metabase https://your-metabase.example.com/api/metabase-mcp{
"mcpServers": {
"metabase": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://your-metabase.example.com/api/metabase-mcp"]
}
}
}Clients with native remote support can use a "url" field instead of the mcp-remote bridge. Confirm the current endpoint in the Metabase MCP docs.
Set up the Metabase CLI
Install it globally, then authenticate once (the binary is mb):
# Install the CLI (the binary is `mb`)
npm install -g @metabase/cli
# Authenticate once — opens your browser on Metabase v62+, or use an API key
mb auth login --url https://your-metabase.example.com
mb auth statusOn Metabase v62+ mb auth login opens your browser; older servers fall back to an API key. A terminal-based assistant can then inspect your schema (mb db schemas, mb table get --include fields) and create content (mb card create, mb dashboard create) against the synced tables.
Prompt: build the Alguna Billing Overview dashboard
With MCP or the CLI connected, paste this into your assistant to generate the dashboard:
Create a polished Metabase dashboard for Alguna billing analytics using the
available Alguna tables in this database.
Goal: Help finance and RevOps leaders understand committed and usage-based
revenue, invoicing, accounts receivable, and quote-to-cash from Alguna data.
First, inspect the schema and identify the available Alguna tables. Do not assume
exact table names. Map the raw data into these analytical concepts where
possible: Customers, Quotes, Contracts, Subscriptions, Products/Prices, Usage
measurements (metering), Invoices, Invoice line items, and Payments.
Important:
- Build the dashboard from durable database/warehouse tables (Alguna API/webhooks).
- 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.
- Do not claim Metabase connects natively to Alguna unless that is explicitly
true in this environment.
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.
Before finalizing, create or recommend reusable Metabase 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 schema. Reconcile totals against the
Alguna dashboard. Keep it practical, dense, and executive-readable. Avoid vanity
metrics.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;