WFRLoop Docs
Architecture

Derived Queries

Counts and patterns the dashboard surfaces, computed from the Reminders table

The brief lists three derived values, all computed from the reminders table. They are reproduced verbatim below, then expanded with one extra query the dashboard needs.

From the brief

  • Repeat count = corrections for same employee+process excluding current.
  • Recognition count = recognitions per employee.
  • Process counts = corrections and recognitions per process.

Where each one shows up

  • Repeat count drives the repeat indicator on the dashboard reminder list, the repeat count metadata on the reminder detail view, and the warning banner for repeat corrections on that same screen.
  • Recognition count drives the per-employee count in the dashboard team section, the recognition count stat on the employee profile, and the recognition ratio (corrections vs recognition) shown there.
  • Process counts drive the correction count, recognition count, and total per process on the process list, and the grouping shown on the process detail screen.

Pending count (dashboard only)

The dashboard has a "pending" stat and a "Pending" filter in the filter bar. The brief does not give an explicit formula for it, but it follows from the schema: recognitions are "logged but no action required" (no acknowledgement step), and status is only ever pending or acknowledged. So:

  • Pending count = reminders where status = 'pending' and type = 'correction'.

Recognitions never pend, so they should not be counted here even if the implementation happens to default their status to pending.

On this page