{"ns":"insights","title":"Lumen Insights","version":"4.3","summary":"Lumen Insights is a sales dashboard over an order warehouse with data through 30 Sep 2026. Analysts see KPI tiles with the change against the previous period, pick a date range, slice and cross-filter the charts, drill from Region to Country to Customer, browse and export the matching order lines, save views, and schedule report subscriptions. Editors may save views; Viewers may only look.","problem":"Decision makers act on the numbers on the screen, so every total, delta, filter and export must agree with the underlying orders, and the same range and filters must always give the same figures.","personas":[{"name":"Analyst (Editor)","need":"Slice the quarter, drill into a region, export the matching rows, and keep the view or schedule it for leadership."},{"name":"Viewer","need":"Read the dashboard and export data without being able to change shared content."},{"name":"Leadership recipient","need":"Receive a regular digest with the agreed schedule, format and recipients."}],"goals":["KPI values, deltas and totals are exact and consistent between tiles, charts, tables, exports and the query service.","Every filter narrows every visual, the order lines and the export in the same way.","Only authorised users can read data; only Editors can save views."],"features":[{"id":"AUTH","title":"Sign-in and roles","summary":"Bearer sign-in, session and Editor versus Viewer.","reqs":[{"id":"FR-AUTH-01","weight":"Must","text":"A user signs in with work email and password and lands on \"Sales overview\" for the current quarter, showing role and name.","accept":["Sign-in form has \"Work email\", \"Password\" and \"Sign in\"","Editor sees \"Editor\" and \"Priya Analyst\"","The date button reads \"This quarter: Jul 1, 2026 – Sep 30, 2026\"; sidebar shows Sales overview, Saved views, Subscriptions and \"Data through Sep 30, 2026\""]},{"id":"FR-AUTH-02","weight":"Must","text":"Wrong credentials give a generic message and keep the user on the form; data endpoints refuse requests without a valid token.","accept":["UI: alert \"Incorrect email or password.\"","Service login with a wrong password: 401 \"Invalid credentials\"","Reading KPIs without a token: 401","The public metadata call needs no token and reports anchor 2026-09-30, data from 2025-10-01"]},{"id":"FR-AUTH-03","weight":"Should","text":"The session is kept in the tab across reloads and dropped on sign-out.","accept":["After a reload the dashboard is still shown","After \"Sign out\" the form is shown and stays shown after another reload"]},{"id":"FR-AUTH-04","weight":"Should","text":"Viewers cannot save views: the \"Save view\" button is absent and the service refuses the request.","accept":["Viewer header shows \"Viewer\" and \"Victor Viewer\"; date range, \"Filters\" and \"Export CSV\" remain","Saving a view through the service with a Viewer token returns 403 and creates no view"]}]},{"id":"KPI","title":"KPI tiles","summary":"Six tiles with change against the previous period.","reqs":[{"id":"FR-KPI-01","weight":"Must","text":"Six KPI tiles show the value for the range and the percentage change against the previous period of the same length, labelled \"vs prev. period\".","accept":["This quarter: Revenue $15.1M ▲ 5.7%; Orders 1,766 ▲ 2.3%; Avg order value $8,540 ▲ 3.4%; Gross margin 54.4% ▼ 2.9%; Return rate 2.43% ▼ 25.0%; Active customers 412 ■ 0.0%","Revenue tooltip: \"Previous period Mar 31, 2026 – Jun 30, 2026: $14.3M\"","Service values: revenue 15082257.84, orders 1766, aov 8540.35, marginPct 54.39, returnRatePct 2.43, customers 412; deltaPct 5.69, 2.26, 3.36, -2.89, -25, 0","A fall is shown as ▼ and a rise as ▲; the sign is never inverted"]},{"id":"FR-KPI-02","weight":"Should","text":"Delta colour follows whether the change is good for the metric: a fall in return rate is good, a fall in margin is bad.","accept":["Revenue, Orders, Avg order value and Return rate ▼: good (green)","Gross margin ▼: bad (red); Active customers ■: neutral"]},{"id":"FR-KPI-03","weight":"Could","text":"When the previous period starts before the data does, every delta reads \"—\".","accept":["Last 12 months: Revenue $51.5M, Orders 5,978, Active customers 420, all deltas \"—\"; \"Order lines (5,978)\", \"Page 1 of 399\""]}]},{"id":"DATE","title":"Date range","summary":"Presets and custom range.","reqs":[{"id":"FR-DATE-01","weight":"Should","text":"The date picker offers seven presets, and choosing one updates the range and every visual.","accept":["Presets: Last 7 days, Last 30 days, Last 90 days, This quarter, Last quarter, Year to date, Last 12 months; \"This quarter\" is highlighted","Last 30 days: \"Sep 1, 2026 – Sep 30, 2026\", Revenue $5.1M, Orders 606, Active customers 330, \"Order lines (606)\""]},{"id":"FR-DATE-02","weight":"Could","text":"A custom range is picked with two clicks; Apply is disabled until both ends are set; later days than the data are disabled; the ends swap if clicked in reverse.","accept":["Footer \"Sep 1, 2026 → pick an end date\" with Apply disabled; applied range \"Custom: Sep 1, 2026 – Sep 30, 2026\"","Days after Sep 30, 2026 are disabled; Escape closes without changes","Clicking Sep 30 then Sep 1 reads \"Sep 1, 2026 → Sep 30, 2026\""]},{"id":"FR-DATE-03","weight":"Should","text":"A range whose start is after its end is rejected by the service.","accept":["422 \"from must be on or before to\"","A date not written YYYY-MM-DD: 422 \"from must be YYYY-MM-DD\""]}]},{"id":"FLT","title":"Slicers, charts and drill-down","summary":"Filters, chips, cross-filter and drill-down.","reqs":[{"id":"FR-FLT-01","weight":"Should","text":"A slicer value filters KPIs, charts and order lines together and appears as a removable chip; removing the chip restores the figures.","accept":["Region options North America, EMEA, APAC, LATAM; ticking EMEA shows chip \"region: EMEA\" and \"Filters (1)\"","EMEA: Revenue $4.2M, Orders 494 ▼ 4.8%, Return rate 2.63% ▼ 31.7%, \"Order lines (494)\"","Removing the chip returns Orders to 1,766","Segment slicer search \"mid\" lists only Mid-market; two ticked reads \"Segment 2 selected\""]},{"id":"FR-FLT-02","weight":"Should","text":"The region chart drills Region to Country to Customer one level per click, and the breadcrumb drills back up.","accept":["\"Revenue by region\" table: North America 5,996,273.25 / 711; EMEA 4,218,125.87 / 494; APAC 3,686,080.37 / 405; LATAM 1,181,778.35 / 156","EMEA click: \"Revenue by country — EMEA\", breadcrumb \"All regions › EMEA\", first bar United Kingdom","United Kingdom click: \"Top customers in United Kingdom\", first Nakatomi Partners, chips region and country","\"All regions\" returns to \"Revenue by region\" with no chips"]},{"id":"FR-FLT-03","weight":"Could","text":"Clicking a channel slice adds the channel as a filter and clicking it again removes it; \"Clear all\" removes slicers but keeps the date range.","accept":["Channel mix table: Mobile 4,039,681.25; Partner 3,053,560.84; Retail 1,947,156.35; Web 6,041,859.4","Web slice: chip \"channel: Web\", Orders 698, Active customers 345","\"Clear all\" after Last 30 days with two filters leaves \"Last 30 days: Sep 1, 2026 – Sep 30, 2026\" and Orders 606"]},{"id":"FR-FLT-04","weight":"Could","text":"The revenue trend switches between weekly and monthly buckets.","accept":["Monthly table: 2026-07 5,111,854.65; 2026-08 4,872,652.4; 2026-09 5,097,750.79"]}]},{"id":"ORD","title":"Order lines and export","summary":"Drill-through table, search and CSV.","reqs":[{"id":"FR-ORD-01","weight":"Should","text":"The order lines table shows 15 rows per page, newest first, and sorts by any column.","accept":["\"Order lines (1,766)\", \"Page 1 of 118\"; first ORD-05958 2026-09-30 Wonka Energy","Revenue descending: first ORD-04448 $118,365; ascending: first ORD-05245 $267","Last page \"Page 118 of 118\" has 11 rows and \"Next ›\" is disabled"]},{"id":"FR-ORD-02","weight":"Could","text":"Search matches order id, customer and product.","accept":["\"nakatomi partners\": \"Order lines (12)\"; \"ORD-05958\": \"Order lines (1)\"","No match: \"No orders match the current filters.\""]},{"id":"FR-ORD-03","weight":"Must","text":"Export CSV contains exactly the order lines that match the current range and filters, and the confirmation count equals the rows in the file.","accept":["EMEA and Partner: \"Order lines (100)\", \"Page 1 of 7\"","Downloads orders_2026-07-01_2026-09-30.csv with toast \"Exported 100 rows to orders_2026-07-01_2026-09-30.csv\"","Header id,date,customer,product,category,region,country,channel,segment,units,revenue,cost,returned and 100 data rows, all EMEA / Partner","Unfiltered export has 1,766 data rows"]}]},{"id":"VWS","title":"Saved views","summary":"Save, open and delete named views.","reqs":[{"id":"FR-VWS-01","weight":"Must","text":"An Editor saves the current range and filters as a named view and finds it on the Saved views page, sorted by name.","accept":["Dialog \"Save view\": \"Saves the date range and filters: Jul 1, 2026 – Sep 30, 2026, 1 filter(s).\"","Empty name: \"Give the view a name.\"","Toast \"Saved view “APAC Q3” (VW-NNNN)\"; cards APAC Q3, EMEA partner deep-dive, Global — last 12 months"]},{"id":"FR-VWS-02","weight":"Should","text":"Opening a view restores its range and filters on the dashboard.","accept":["\"EMEA partner deep-dive\" (VW-0002): \"Custom: May 1, 2026 – Sep 30, 2026\", chips region: EMEA and channel: Partner, \"Order lines (178)\"","\"Global — last 12 months\" (VW-0001): \"Last 12 months: Oct 1, 2025 – Sep 30, 2026\", no chips, Orders 5,978"]},{"id":"FR-VWS-03","weight":"Could","text":"Deleting a view removes its card and leaves the others."}]},{"id":"SUB","title":"Report subscriptions","summary":"Scheduled report digests.","reqs":[{"id":"FR-SUB-01","weight":"Should","text":"The Subscriptions page lists each schedule in words with format and recipients.","accept":["\"Monday revenue digest\" | \"Weekly on Monday at 08:00\" | PDF | leadership@lumen.io"]},{"id":"FR-SUB-02","weight":"Should","text":"The form validates the name, recipients and email addresses and defaults to Weekly, Monday, 08:00, PDF.","accept":["Empty form: \"Name is required\" and \"Add at least one recipient\"","\"not-an-email\": \"“not-an-email” is not a valid email address\" and no chip is added"]},{"id":"FR-SUB-03","weight":"Must","text":"A monthly subscription takes a day of month (1 to 28), a time, a format and recipients, and is listed with the schedule in words.","accept":["Cadence Monthly replaces \"Day\" with \"Day of month\" (1–28)","Day 5, 09:30, Excel, ops@lumen.io and cfo@lumen.io: row \"APAC monthly\" | \"Monthly on day 5 at 09:30\" | Excel | \"ops@lumen.io, cfo@lumen.io\""]},{"id":"FR-SUB-04","weight":"Could","text":"A subscription can be edited and deleted.","accept":["Edit shows the form pre-filled with \"Save changes\"; Day Friday gives \"Weekly on Friday at 08:00\"","Delete removes the row"]}]},{"id":"QRY","title":"Query service","summary":"Grouped aggregation and its validation.","reqs":[{"id":"FR-QRY-01","weight":"Must","text":"The query service returns grouped rows and a totals row, and the totals equal the sum of the rows.","accept":["By region for 2026-07-01 to 2026-09-30: North America 5996273.25/711, EMEA 4218125.87/494, APAC 3686080.37/405, LATAM 1181778.35/156; totals sum(revenue) 15082257.84, count 1766","EMEA by country: five countries, first United Kingdom 1369561.73; totals 4218125.87"]},{"id":"FR-QRY-02","weight":"Should","text":"An invalid query is rejected with a precise 422 message.","accept":["Unknown dimension: 422 \"Unknown dimension \\\"planet\\\". Allowed: region, country, …\"","Unknown measure: 422 \"Unknown measure \\\"median(revenue)\\\"\"","Unknown field: 422 \"Unknown field \\\"price\\\" in sum(price). Allowed: revenue, cost, …\""]}]}],"nfr":[],"glossary":[{"term":"Previous period","meaning":"The period of the same length that ends the day before the selected range starts."},{"term":"Slicer","meaning":"A filter control for one field, such as Region or Channel."},{"term":"Drill-through","meaning":"The order lines that make up the current figures."}],"outOfScope":["Chart rendering details beyond labels and the \"Show as table\" data","Actual delivery of subscription emails"]}