How to build VTEX dashboards in Metabase
VTEX is an enterprise commerce platform for storefronts and marketplaces, holding orders, catalog, and customer data across regions and sellers. Metabase is where you turn that activity into shared, trustworthy dashboards. This guide covers two complementary paths: a lightweight MCP + CLI routethat pulls live data with the VTEX MCP server and loads a CSV into Metabase with the Metabase CLI for quick analysis, and a durable pipeline route that syncs VTEX into a database so you can build dashboards anyone can read.
How do you connect VTEX to Metabase?
Most teams combine both routes: use the VTEX MCP server and Metabase CLI route to pull live data and stand up a quick analysis, and the pipeline route for the dashboards people depend on.
Live data in, quick analysis out
Pair a VTEX MCP server (to read live order, catalog, and seller data) with the Metabase CLI, whose upload command loads a CSV into Metabase as a ready-to-query table and model.
- Quick lookups like "orders by seller this week?"
- Loading a VTEX CSV export into Metabase in seconds
- Spot-checks and one-off analyses without a warehouse
- Great for exploration, not governed reporting
- Use read-only mode on the VTEX MCP to avoid accidental writes
- CSV uploads are snapshots — refresh or move to the pipeline for history
Durable dashboards with history
Sync VTEX into a database or warehouse with the OMS and Catalog APIs or dlt, then point Metabase at it.
- GMV, AOV, and cohort dashboards leaders depend on
- Marketplace and seller performance across regions
- Peak-season comparisons across quarters and years
- You own the refresh schedule and the data model
- The OMS Orders API paginates — plan incremental syncs
- Reconcile marketplace vs. own-inventory orders
What can you analyze from VTEX data in Metabase?
- GMV & sales — gross merchandise value, orders, AOV
- Channels & sellers — revenue across storefronts and marketplace
- Catalog performance — top SKUs, units, and categories
- Regions — revenue split across markets
- Order flow — status funnel and cancellation rate
- Repeat purchase — cohorts and orders per client
Which VTEX dashboards should you build in Metabase?
GMV overview
The pulse of an enterprise storefront.
- Gross merchandise value vs. prior period (number + trend)
- Orders per day (line)
- Average order value (number + trend)
- Revenue by sales channel / seller (bar)
Catalog performance
What's selling across the catalog.
- Top products/SKUs by net revenue (bar)
- Units sold by SKU (table)
- Revenue by category (bar)
- Cancellation rate by product (bar)
Customers & repeat purchase
Are buyers coming back?
- Repeat-purchase rate by cohort (line)
- Orders per client distribution (bar)
- Revenue by region (bar)
- Revenue by acquisition month (cohort table)
Order flow
From placed to invoiced.
- Order status funnel (handling → invoiced) (bar)
- Cancellation rate by week (line)
- Payment method mix (bar)
- Delivery/SLA performance (table)
How do you use the VTEX MCP server with the Metabase CLI?
Pair a VTEX MCP server with the Metabase CLI for fast, hands-on analysis. The official VTEX Developer MCP (part of the VTEX AI Developer Toolkit) connects assistants to VTEX docs, the Help Center, Developer Portal, and API reference; community servers expose VTEX commerce APIs for orders, catalog, and more. The Metabase CLI's upload command loads a CSV into Metabase and creates a ready-to-query table and model. For analysis, connect VTEX in read-only mode.
Example workflow
- Ask a VTEX MCP which seller or channel drove the most orders this week.
- Export the order or catalog performance 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
- A VTEX MCP is great for live lookups — not for scheduled or audited reporting.
- The official VTEX Developer MCP is dev/docs oriented, not store operations; commerce-API MCP servers are community, not first-party — verify them.
- A CSV upload is a point-in-time snapshot; refresh it with
mb upload replaceor move to the pipeline for real history. - Use a read-only option so analysis can't trigger writes.
mb upload csvneeds an uploads database configured under Admin → Settings → Uploads.
How do you set up the VTEX MCP server and the Metabase CLI?
VTEX Developer MCPofficial
- Scope
- Docs, Developer Portal, API reference
- Toolkit
- Part of the VTEX AI Developer Toolkit
- Commerce data
- Community servers expose commerce APIs
- Note
- Confirm the current endpoint in VTEX docs.
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": {
"vtex-dev": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://developers.vtex.com/mcp"]
}
}
}# 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 VTEX CSV export — creates a table AND a model
mb upload csv --file vtex-orders.csv --collection root
# Refresh that same table later from a new export
mb upload replace <table-id> --file vtex-orders.csvThe VTEX Developer MCP endpoint and setup evolve — confirm the current URL in the VTEX docs before relying on it. The Metabase CLI stores its credentials securely after mb auth login, and mb upload csv needs an uploads database enabled.
Can you generate a VTEX dashboard with AI?
Yes. Use the prompt below with any assistant that can run a VTEX MCP server and the Metabase CLI. It works end to end: if VTEX tables already exist in Metabase it analyzes those; otherwise it pulls the data over a VTEX MCP, loads it with mb upload csv, then builds the dashboard — using VTEX order status, separating marketplace orders, and skipping cards it has no data for.
Create a polished Metabase dashboard for VTEX ecommerce analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.
Goal: Help commerce leaders understand GMV, average order value, repeat purchase,
catalog performance, and order flow from VTEX data.
Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for VTEX tables and
models). If durable VTEX 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 a VTEX MCP server in read-only mode:
orders (OMS), order items, products/SKUs, clients, sales channels, and sellers.
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:
VTEX CSV exports are often flat and pre-aggregated (one row per order or SKU, with
columns like order value, units, and status). Warehouse tables are raw and
order-grained (join orders to order items and filter by order status). Inspect the
actual tables and column names first; do not assume exact names or that a
particular table exists. Map what you find into these analytical concepts where
possible: Orders (OMS), Order items, Products/SKUs, Clients (customers), Sales
channels, and Sellers (for marketplace).
Important:
- Build on whatever data is present; don't claim Metabase connects natively to
VTEX — it reads a database or CLI-uploaded tables.
- Report NET revenue and GMV consistently; state the definitions.
- Use VTEX order status to define which orders count (e.g. invoiced).
- Separate marketplace/seller orders from own-inventory orders where relevant.
- Use order-level grain for AOV.
- Define a "repeat customer" once (2+ paid orders) and reuse it everywhere.
- 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: VTEX Store Overview
Sections:
1. Executive summary (KPI cards): GMV last 30 days; Orders; AOV; Repeat-purchase
rate; Cancellation rate.
2. Sales & channels: GMV by day; Orders by day; AOV trend; Revenue by channel/seller.
3. Catalog performance: Top SKUs by net revenue; Units by SKU; Revenue by category.
4. Customers & retention: Repeat-purchase rate by cohort; Orders per client;
Revenue by region.
5. Order flow: Status funnel; Cancellation rate; Payment method mix.
Filters: Date range, Sales channel, Seller, Category, Region.
Reuse the models Metabase auto-created from uploaded CSVs, or (for a warehouse)
create reusable models: modeled_vtex_orders, modeled_vtex_order_items,
modeled_vtex_skus, and modeled_vtex_clients.
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. Keep it practical, dense,
and executive-readable. Avoid vanity metrics.How do you sync VTEX data into a database or warehouse?
For dashboards that need history and reliability, land VTEX data in a database first, then connect Metabase to that database.
Connector options
- OMS Orders API(raw) — the source of truth for orders; paginate and upsert on a schedule.
- Catalog API — sync products, SKUs, and categories to enrich order items.
- dlt(code) — write a Python pipeline against the VTEX APIs for full control.
- Managed ETL (verify) — check whether your ETL vendor offers a VTEX source; availability varies.
Notes
- Land raw tables first, then build clean models on top.
- Money may be stored in minor units — normalize it.
- Separate marketplace (seller) orders from own-inventory orders for accurate GMV.
How should you model VTEX data in Metabase?
Core tables
| Table | Grain | Key columns |
|---|---|---|
orders | one row per order | order_id, client_email, status, value, sales_channel, creation_date |
order_items | one row per item | order_id, sku_id, name, quantity, selling_price |
skus | one row per SKU | sku_id, product_id, name, category_id |
clients | one row per client | email, first_name, region |
Modeling advice
- Normalize
statusand pick which states count as paid (e.g. invoiced). - Normalize money from minor units and keep the currency.
- Compute AOV at the order grain; define GMV and net revenue once.
- Tag marketplace vs. own-inventory orders to split seller GMV.
Which VTEX metrics should you track in Metabase?
| Metric | Definition | Notes |
|---|---|---|
| GMV | Total order value in a period. | Split own-inventory vs. marketplace. |
| Average order value (AOV) | GMV ÷ orders. | Order grain; segment by channel. |
| Repeat-purchase rate | Clients with 2+ paid orders ÷ all. | Fixed window; watch by cohort. |
| Cancellation rate | Cancelled ÷ placed orders. | Watch by seller and product. |
| Channel mix | Revenue share by sales channel. | Core for multi-channel setups. |
What SQL powers VTEX dashboards in Metabase?
These assume synced tables in a warehouse (PostgreSQL dialect). Money is divided by 100 to illustrate minor-unit normalization — adjust to your setup.
Invoiced-order value over the last 30 days.
SELECT
date_trunc('day', o.creation_date) AS day,
COUNT(*) AS orders,
SUM(o.value) / 100.0 AS gmv
FROM orders o
WHERE o.status = 'invoiced'
AND o.creation_date >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY 1
ORDER BY 1;AOV computed at the order grain, on invoiced orders.
SELECT
date_trunc('week', o.creation_date) AS week,
COUNT(*) AS orders,
ROUND((SUM(o.value) / 100.0) / NULLIF(COUNT(*), 0), 2) AS aov
FROM orders o
WHERE o.status = 'invoiced'
GROUP BY 1
ORDER BY 1;Units and gross revenue by product over 90 days.
SELECT
i.name AS product,
SUM(i.quantity) AS units,
SUM(i.selling_price * i.quantity) / 100.0 AS gross_revenue
FROM order_items i
JOIN orders o ON o.order_id = i.order_id
WHERE o.status = 'invoiced'
AND o.creation_date >= CURRENT_DATE - INTERVAL '90 days'
GROUP BY i.name
ORDER BY gross_revenue DESC
LIMIT 20;Share of clients with two or more paid orders.
WITH client_orders AS (
SELECT client_email, COUNT(*) AS paid_orders
FROM orders
WHERE status = 'invoiced'
AND client_email IS NOT NULL
GROUP BY client_email
)
SELECT
ROUND(100.0 * COUNT(*) FILTER (WHERE paid_orders >= 2)
/ NULLIF(COUNT(*), 0), 2) AS repeat_purchase_rate_pct
FROM client_orders;