Multi-customer dashboards
A customer dashboard is one dashboard you design once. Every customer gets the same layout, the same widgets, and the same queries — but each query is executed with that customer’s ID. Customer A never sees Customer B’s rows.
This is the defining use of CustomerDashboard: a vendor or agency publishes one live dashboard, and each downstream customer signs in to their own slice of the data.
How isolation works
- You create a customer on the dashboard and give them a customer ID. That ID is the value that already exists in your database —
acme-123, a numeric account id, a slug, whatever your tables use. - You optionally add users (email + password) under that customer. Those people sign in on the published dashboard.
- Every widget query that should be private includes the
:customer_idplaceholder, for example:
SELECT month, revenue
FROM invoices
WHERE account_id = :customer_id
ORDER BY month
- When a customer user opens the dashboard, CustomerDashboard binds
:customer_idto their customer ID. They never type it. They cannot change it.
If a query on a customer dashboard omits :customer_id, every customer sees the same result. The editor warns you. That can be intentional for a shared KPI (company-wide benchmark), and dangerous if the query is a customer list.
Internal vs customer dashboards
| Internal | Customer | |
|---|---|---|
| Typical use | Team BI, office TV, one shared report | Client portal, per-account metrics |
| Sign-in for viewers | Optional (private / protected / public) | Required — each customer has users |
:customer_id |
Not used | Required for per-customer widgets |
| Preview in the editor | Live query as yourself | Run as a test customer or a real customer |
What you still share
Theme, logo, number formats, widget titles, and SQL text are the same for every customer. Only the bound parameter and therefore the returned rows change.
Google Sheets cannot filter per customer. A Sheets widget on a customer dashboard shows the same range to everyone. Use a SQL or warehouse source when rows must be isolated.