# Prompt pack: build a sales dashboard with AI (Lovable vs. Claude)

From the crmmeister.com article by Ahmed Essam. These are the exact prompts sent on 11 October 2026.
Replace the company, colours and snapshot date with yours. Attach your deals.csv and targets.csv.

## 1. The spec (paste below either first prompt)

```text
WHO IT IS FOR
I run sales at Quellwerk Software (B2B workflow software, 8 sales reps). Every Monday I review the pipeline with my team. I want one dashboard that answers: are we on target, where is the pipeline, which deals are stuck, who needs help, which lead sources pay off.

THE DATA
- deals.csv: one row per deal. Columns: deal_id, deal_name, account, industry, company_size, owner, lead_source, stage, probability_pct, value_eur, created_date, expected_close_date, close_date, stage_entered_date, last_activity_date, lost_reason, calls, emails, meetings.
- Stages: Qualified, Discovery, Demo, Proposal, Negotiation (open), Closed Won, Closed Lost.
- targets.csv: monthly new-business target in EUR (month, target_eur).
- The data is a snapshot taken on 30 September 2026. Treat that date as "today".

CLEAN THE DATA FIRST (the export is messy, like every CRM export)
- Stage names can differ in upper/lower case: treat "closed won" as "Closed Won".
- Some deals are duplicates: same account (ignore extra spaces), same value, same created date. Count them once.
- Empty owner = "Unassigned". Empty lead source = "Unknown".
- Empty value = leave it out of every sum and average, but still count the deal.
- A won deal with value 0 is left out of average deal size.
- A close date before the created date is a typo: leave that deal out of the sales cycle average.
- Show all of this in a "Data quality" panel: each issue, how many deals, and their deal IDs, so I can fix them in the CRM.

FILTERS (top of the page, every number and chart updates together)
- Period: This quarter (Jul to Sep 2026, default), Last quarter (Apr to Jun 2026), Last 6 months, Last 12 months.
- Rep (all or one), Lead source (all or one), Stage (all or one).
- Show which filters are active and a "Reset filters" button.

TWO BLOCKS, CLEARLY LABELLED
1. "Results in the period" uses closed deals whose close date falls in the selected period:
   - Won revenue vs. target (target = sum of the monthly targets in the period), with % of target.
   - Win rate = won deals / (won + lost deals).
   - Average deal size (won deals).
   - Average sales cycle in days (created date to close date, won deals).
   - Won revenue per month against the monthly target (chart).
   - Lost reasons (chart, deals lost per reason; empty reason = "Not given").
2. "Pipeline today (30 Sep 2026)" uses open deals and ignores the period filter:
   - Open pipeline value and weighted pipeline (value x probability_pct).
   - Pipeline by stage (chart: value and number of deals per stage).
   - Stalled deals: open deals with no activity for 21 days or more before 30 Sep 2026. Count, value, and a list.

TABLES
- Rep scorecard: per rep won revenue, deals won, win rate, open pipeline, activities (calls + emails + meetings on the rep's deals in view, meaning deals closed in the period plus open deals).
- Lead sources: per source won revenue and win rate.
- Deal list: all deals in view, searchable, sortable by any column, with an "Export CSV" button for the current view.

INTERACTION
- Hover on any chart shows the exact numbers.
- Clicking a bar (a stage, a rep, a source, a lost reason, a month) filters the deal list to those deals. Show what it is filtered by and a way to clear it.
- When a filter combination has no deals, show a short friendly empty state, never a broken chart or "NaN".

DESIGN
- Light and calm. Background #FFFFFF, soft panels #F3F6FB, text #141A2B, secondary text #4C5670, lines #E3E8F1. Main colour ink navy #1A2C6B, accent cobalt #2F5BFF, highlight lemon #FFE27A (use sparingly), green #0B6B4C for good, red #AE2239 for bad.
- Fonts: Encode Sans for text, Martian Mono for numbers and small labels.
- Numbers formatted like "€1.24M", "€23,500", "21.7 %".
- Works on a phone (390 px wide) and with the keyboard only.
```

## 2. Lovable, prompt 1

Attach deals.csv and targets.csv. Cost in this test: 9.4 credits.

```text
Build a sales dashboard as a client-only web app: React + Vite single-page app, no backend, no database, no login, do not enable Lovable Cloud. The data comes from the two attached CSV files (deals.csv and targets.csv): copy them into the project as static data and load them at build time, so the app works without any server.

When you are done, test it in the browser: click through every filter and the chart drill-downs, and check that won revenue, win rate, average deal size, open pipeline and stalled deals for "This quarter" and "Last 12 months" match a separate calculation from the CSV. Fix anything that does not match.

Here is what I need:

[paste the spec here]
```

## 3. Claude, prompt 1

Claude Code with the CSVs and fonts in one folder. In the Claude app, attach the CSVs instead.

```text
I have two CSV files from my CRM in this folder: deals.csv and targets.csv. The fonts are in ./fonts. Build me a sales dashboard as ONE single HTML file called dashboard.html that I can open by double-clicking, with no server and no build step.

Technical rules:
- Put the data from both CSV files inside the HTML file.
- No external requests at all: draw the charts yourself with SVG, no chart library, no CDN. Embed the two fonts from ./fonts as base64.
- Plain JavaScript, no modules (they do not run from a double-clicked file).

When you are done, open it in a headless browser at 1440 px and 390 px wide, click through the filters and fix anything broken. Then check the main numbers (won revenue, win rate, average deal size, open pipeline, stalled deals) for "This quarter" and "Last 12 months" with a separate calculation straight from the CSV, and fix any number that does not match.

Here is what I need:

[paste the spec here]
```

## 4. Prompt 2 for both: the data refresh

Lovable cost in this test: 1.8 credits.

```text
I exported a fresh copy of the data from the CRM. Replace deals.csv and targets.csv with the new files (same columns, more deals, the targets changed). Change nothing else: no layout, no design, no logic changes. Afterwards run your number check again for "This quarter" and "Last 12 months" and tell me the new numbers.
```

## 5. Prompt 3: the fix round (Lovable version, 3.4 credits)

```text
A colleague tested the dashboard. The numbers are all correct, but these things are broken. Fix them as one batch. Change nothing else: no new features, no design changes, no changes to how any number is calculated.

1. "Reset filters" leaves the text in the deal search box, while the page says "Default view". Reset must also clear the search.
2. In "Lead sources" the win rate column is cut off on a laptop screen (1280 and 1440 px wide): the header reads "WIN" and the values "36", "33". All columns must be fully visible at 1280 px.
3. The CSV export writes lost reason "Not given" on deals that are open or won. Only lost deals get "Not given"; other deals get an empty lost reason.
4. The CSV export breaks umlauts when opened in Excel (ü becomes Ã¼). Make the file open correctly in Excel.
5. When a rep, source or stage is selected, "% of target" still compares against the whole team's target, and nothing says so. Add a short note next to it, like "Team target, no per-rep targets in the data".
6. The data quality panel is missing 2 issues: lost deals without a lost reason, and open deals whose expected close date is already past. Add both, with count and deal IDs.
7. After pressing "Clear" on a drill-down or "Reset filters" with the keyboard, the focus jumps to the top of the page. Keep the focus on a sensible element instead.
8. On a phone (390 px): the rep scorecard headers run into each other ("WON REVENUEWON"), and the stage chart's axis labels overlap. Fix both.
9. Small text: "1 DEALS IN VIEW" should be "1 deal in view", and "Nothing stalled. Nice." should not appear when there are no open deals at all.

Afterwards check that the numbers for "This quarter" and "Last 12 months" are unchanged and tell me what you changed.
```

Claude version:

```text
A colleague tested the dashboard. The numbers are all correct, but these things are broken. Fix them as one batch. Change nothing else: no new features, no design changes, no changes to how any number is calculated.

1. The deal list is wider than the screen on a laptop (1280 and 1440 px): 14 columns, "Closed / expected" is cut in the middle of the text, and nothing shows that you can scroll sideways. Make it fit at 1280 px or make the sideways scroll obvious, and never cut text in the middle.
2. On a phone (390 px) the wide tables cut values in the middle ("36.", "€1" in the lead sources and stalled tables), and the rep scorecard only shows 3 columns. Make the important values readable on a phone without guessing.
3. Some buttons are too small to tap: the sort headers are 15 px tall and "Show in deal list" is 19 px. Make every clickable element at least 24 px tall.
4. The stalled deals box on desktop shows only about 3 of 17 deals before you have to scroll inside it. Show more of them.
5. The rep and lead source tables list rows that are all zeros when a filter leaves them empty. Hide rows that have nothing in the current view.
6. The page uses the same HTML id ("stalled") twice. Make ids unique.

Afterwards run your checks again, confirm that the numbers for "This quarter" and "Last 12 months" are unchanged, and tell me what you changed.
```

## 6. Your own check

Before you trust any dashboard, calculate won revenue, win rate and open pipeline yourself (spreadsheet is fine)
and compare. The dataset README has the reference numbers for the demo data.
