Account

Reports

A report is a page with a goal. Widgets are questions on that page. The range at the top applies to every widget clock.

In the admin

Open /p/[slug]/reports. Create a page (Sales, Attendance, Pipeline), then add widgets. Editors and above can create and edit. Open Edit page to drag widgets and set each one to a third, half, or full width. Order and width are stored on the report. Viewers can read. The same pages appear in the Reports nav group.

Widget kinds

  • Number — one value: count, sum, or unique.
  • Trend — that value by day across the selected range.
  • Breakdown — grouped by an enum, date, or relation. Relations show the related label, not the id.
  • Table — latest matching rows.

Sources

Collection records, People, Payments, or Email. Logs are not a report source.

Each widget has a clock: createdAt or a collection date field such as paidAt. The page range filters on that clock. Optional filters are exact field matches. Sum and unique need a field. Payments amounts are stored in cents.

Tools

  • reports.list — saved pages.
  • reports.define — create a page with a name, goal, and optional widgets.
  • reports.add_widget — add a question. Pass kind, source, metric, and when needed collection, field, clock, breakdown, filters, columns.
  • reports.get — definition plus results for a range (7d, 14d, 30d, 90d, this-month, this-year, all).
  • reports.layout — reorder widgets and set s / m / l width.
  • reports.remove_widget and reports.delete.

These tools use the data scope. There is no SQL and no multi-hop join. One relation hop is enough to label a breakdown.

See also

Data for records, Payments and Email for those sources.