Tenant Analytics Reference Public

Daily Operations

Daily operating procedures for ERPat Tenant Analytics operators: read the Analytics tab, run a manual chunked fleet sweep, re-sweep a single tenant, and rebuild the platform rollups by date.

Guide version: r1 Module version: 1.1.0 Updated: 2026-07-27 Estimated time: 7 min 3 views
Guide

Daily Operations

Everything you do hands-on with Tenant Analytics: reading the Analytics tab, running a manual fleet sweep with the live console, re-sweeping a single tenant after a fix, and rebuilding the platform rollups for a date.

????
The nightly sweep usually does this for you. On a healthy platform the tenant_analytics_snapshot cron runs every night at 03:00, so most days you just read the tab. The manual actions below are for catching up after downtime, verifying a change immediately, or refreshing one tenant you just fixed.

Opening the Analytics tab

Go to Settings → Tenants and choose the Analytics tab. It loads for administrators on the platform's main database. If you open it from inside a tenant session you are redirected away — this is a platform-operator view only.

The tab has four regions: the KPI cards, the toolbar (date + metric group), the per-tenant snapshots table, and the platform-aggregate panel.

1. The KPI cards

Four cards summarise the currently selected date at a glance:

KPI cards on the Analytics tab.
CardMeaning
Tenants sweptHow many tenants have a snapshot for this date, out of the total number of tenants targeted (e.g. 18 / 20).
CoverageThe percentage of targeted tenants that were successfully swept for the date. Low coverage means a sweep was partial or missed tenants.
FailuresHow many tenants recorded a failed snapshot for the date — a tenant the sweep could not connect to or measure.
Last runHow long ago the most recent sweep finished (or “running” / “never”).

2. The toolbar: date & metric group

Two selectors drive everything below them:

  • Date — defaults to the latest date that has data. Pick any date within the retention window to look back in time. A Recent dates jump list offers the most recent swept dates.
  • Metric group — choose which of the seventeen groups (overview, payslips, payrolls, employees, attendance, leaves, establishments, schedules, departments, de minimis, loans) the table and aggregate panel show.

Changing either one refreshes the snapshots table, the aggregate panel, and the KPI numbers.

3. The per-tenant snapshots table

One row per tenant for the selected date and group. Columns:

Columns in the per-tenant snapshots table.
ColumnWhat it shows
TenantCompany name and slug.
Tenant statusThat tenant's platform status as of the sweep (active, suspended / maintenance, archived).
Group statusHow the measurement went for this group: ok, partial, unavailable (the tenant doesn't have that module/table), or failed.
RowsThe record count behind the metric (e.g. number of payslips) — a quick sense of scale.
Build msHow long that tenant's measurement took, in milliseconds.
UpdatedHow long ago this snapshot was written.
ActionsA menu with View payload and (with the run permission) Re-sweep tenant.

View payload opens a modal showing that tenant's full JSON measurement for the group. Every payload carries a meta block — see Reading the numbers below.

4. The platform-aggregate panel

To the right, the aggregate panel shows the fleet-wide total for the selected date and group — exactly what the public API would return. It shows:

  • Tenants counted / total and tenants failed — how many tenants contributed to the aggregate.
  • The aggregate JSON itself (sums of the numeric metrics across all tenants).
  • An API on / API off badge, and the public API URL when the API is enabled (otherwise a hint that it is off).
????
The aggregate carries no tenant identities. Names, slugs, statuses and module maps are stripped before the rollup is built — only numeric totals survive. That is why the aggregate is safe to expose through the public API while the per-tenant table is not.

Running a manual sweep

When you need fresh numbers now — after downtime, a data fix, or a new tenant — run a sweep from the tab instead of waiting for the nightly cron. It requires the tenant_analytics_run permission.

  1. Open the sweep console

    Click Run snapshot now on the Tenants tab bar. A modal opens with the sweep options.

  2. Choose the options

    Date — the snapshot date (defaults to today). ScopeAll tenants (respects the include-inactive setting) or Active only. Metric groups — all seventeen are ticked by default; untick any you want to skip. Dry run — measure everything but write nothing (a safe rehearsal).

  3. Start it and watch the console

    Click Start sweep. The modal switches to a live view: a progress bar and percentage, an elapsed timer, four counters (Total / Processing / Done / Failed), a scrolling timestamped console, and a per-tenant status list (Pending → ok / partial / failed).

  4. Let it finish

    The sweep runs in small batches so no single request runs long. When it completes it rebuilds the platform rollups for the date (unless it was a dry run) and refreshes the tab automatically.

Don't close the modal while a sweep is running. The window blocks its own close during a run so a batch isn't interrupted. Wait for it to finish (or fail) before closing.
????
Retry Failed. If any tenants failed, a Retry Failed button appears when the sweep ends. It re-runs only the failed tenants — handy after you've fixed whatever blocked them (a suspended database, a connection issue). The console also has a built-in stall guard that stops automatically if progress halts.

Re-sweeping a single tenant

Fixed one tenant's data and want its numbers refreshed without sweeping the whole fleet? Use the row action:

  1. Find the tenant

    In the snapshots table, locate the tenant's row for the current date and group.

  2. Re-sweep it

    Open the row's action menu and choose Re-sweep tenant, then confirm. It re-measures that tenant for the selected metric group (or all groups), replaces its snapshot, and rebuilds the platform rollups for the date.

  3. Confirm the result

    The table, aggregate panel, and KPIs refresh. The tenant's group status should now read ok.


Rebuilding the platform rollups

The rollup is the platform aggregate the tab (and public API) reads. Sweeps rebuild it automatically, but you can rebuild it on demand for a date — for example after manually adjusting snapshots, or if a rollup looks stale.

  1. Pick the date

    Set the toolbar Date to the day you want to recompute.

  2. Rebuild

    Click Rebuild rollups on the tab bar. It re-aggregates that date's existing snapshots into the platform rollups — no tenants are re-measured, so it is quick.

Rebuild vs. sweep. A rebuild only re-totals snapshots you already have — it never visits a tenant. A sweep re-measures tenants and then rebuilds. If the underlying numbers changed, sweep; if only the aggregate looks wrong, rebuild.

Reading the numbers correctly

A few conventions matter when interpreting a payload:

Zero means one of two very different things
Every snapshot payload carries a meta block with a module-enabled map, the list of tables present, and a collected-at timestamp. Use it to tell “0 because there genuinely is no data” from “0 because that tenant doesn't run the module/table” (which shows as an unavailable group status).
Money counts only finalised payroll
Payslip money totals (gross, net, deductions, tax, contributions) count only pending and approved payslips. Drafts are excluded by design, mirroring how the rest of ERPat reports payroll money.
Windows: today, month-to-date, year-to-date, last 30 days
Money and count metrics are sliced into time windows so you can see both the running total and recent activity for the selected date.
Inactive tenants are included by default
Suspended and archived tenants are swept too (unless you narrow the scope), so the fleet total reflects the whole platform, not just live tenants.

A suggested routine

????
Daily: open the tab, confirm Coverage is high and Failures is 0 for yesterday. If failures > 0: switch to the affected group, find the failed tenants, resolve the cause, then use Re-sweep tenant (or a scoped manual sweep with Retry Failed). After any data fix on a tenant: re-sweep just that tenant. Weekly: skim the fleet totals for unexpected swings.

Next steps

Was this guide helpful?

Report a content problem