# Sales dashboard recipe

Example: [2026 Sales dashboard](https://docs.google.com/spreadsheets/d/1e_LhMWqkwO_vx2gnghMLBU4Z0TnprPyG86quHW3r1rs/edit).
The workbook is a mixed manual/formula reference. No single repository publisher
has been verified for all of its ranges. `killdeer/scripts/square_market_report.js`
documents a market-ledger implementation, not ownership of the whole workbook.

## Authoring contract

Read the [dashboard authoring SOP](../dashboard.md) before implementation. Deliver
a private native Google Sheets workbook unless another format is explicitly
requested. The linked workbook is the default template/reference: inspect its
relevant tabs, layout, labels, formulas, number formats, charts, manual inputs and
generated areas and record inspection evidence. Follow its presentation; use a
native private copy where appropriate and never modify the reference without
explicit authorization. Define generated ranges and preserve manual inputs.

Blocked sources require a clearly labelled private Google Sheets mockup in the
same layout, with unavailable actuals unknown, copied sample actuals removed or
visibly marked, coverage, source dates, provenance and unresolved differences.
A Sheets-creation capability gap must be reported separately; HTML or local
spreadsheets are supporting/fallback artifacts and do not complete this contract.
Completion follows the SOP's acceptance criteria, including verified formulas,
formatting, reference protection and a final link to the created workbook.

## Structure and dependencies

`2026 FM Dashboard` compares category and market sales against goals and prior
years, then presents COGS, overhead and net results. `FM Weekly costs` draws labor
from `timesheets_raw` and other costs. Wholesale and monthly accounting tabs are
separate views. Some cells use `IMPORTRANGE` into a prior-year workbook.

Preserve manual goals, assumptions and imported weekly data. Define exact output
ranges before adding automation. Audit formulas and date windows: repeated
patterns are not proof that every reference or quarterly range is correct.
Do not silently copy a suspected formula error into a new dashboard.

## Reusable sales definition

Use `square.market_events` for one source account/location/local sale date.
The existing source normalizer uses completed orders, removes taxes, tips and
separately identified fees, and subtracts reconciled completed returns against
their original sale event. It does not add payment receipts as more revenue.
Unknown refund reconciliation leaves the affected sales value unknown.

Classify a location using explicit reviewed rules. Square is a source, not a
sales-channel label. Keep unknown channels visible and separate CSA transactions
from market-booth sales even if they use the same venue. Refunds from a later
capture can revise an earlier event's sales.
One Square location can also hold multiple physical market events; a location
label is not sufficient evidence to assign a venue. Retain the local date and
reviewed event mapping when comparing the workbook's market-specific rows.

## Reproduce a bounded result

For a remote agent without private checkout access, discover
`dataBank.salesBundle` via the catalog and follow the
[private Sales bundle contract](../sales-bundle.md). Availability is currently
`configured`: authenticated raw download, trusted hash/source-owned validation and
anonymous denial passed; valid ungranted-identity denial remains pending. The
file ID and trusted expected hash remain in the private handoff. Reuse the
source-owned export and shared aggregation;
Reports supplies no alternate normalizer. Preserve integer cents and original
pilot integer strings, provenance, partial/unknown/refund/classification states
and the two unresolved workbook differences in its comparison evidence.

The private pilot groups classified market events for September 7–27, 2026 by
week and location and reconciles those subtotals to the eligible event total.
Compare with the workbook's net-sales rows for the same dates and scope. Identify
refund timing, discount/deposit treatment, trades and manual inputs as possible
differences to investigate; never insert a balancing adjustment without evidence.
The initial private pilot includes separate dated location/day observations to
isolate remaining source/workbook disagreements. A match to both archived orders
and payments supports the source subtotal, but does not itself explain a different
manual workbook cell or establish that an absent archived event had no sales.
Known subtotals are not necessarily complete totals; missing data is not zero.
Never fill gaps from workbook values. Preserve source-scoped account/location
identities: workbook market labels are not verified Square location identities.
No verified dated venue mapping is available in this selected export.

Product category analysis needs line-item/category identity and historical mapping
evidence; a location/date aggregate alone cannot reproduce category rows. Broader
profit measures additionally require the workbook's reviewed cost definitions,
labor, market fees, transport and accounting inputs. Keep estimated COGS or fixed
weekly overhead visibly separate from recorded expenses.

For the complete discovery/access test, private prototype and reconciliation
handoff, follow the [Sales pilot](sales-pilot.md).
