Manager digest

Sends one consolidated daily email to each manager listing the timesheets that need their attention.

How it works

Instead of one notification per submitted timesheet, managers receive a single roll-up per day:

  1. Finds non-empty inboxes — every approvals inbox row that contains at least one pending timesheet item
  2. Splits items into two sections — timesheets awaiting approval, and timesheets where the employee has not yet submitted (missing-submission rows)
  3. Builds one notification per manager — with the count, the employee names, the period of each item, and a single call-to-action linking to Approvals
  4. Deduplicates per day — the deduplication key is (manager, run date), so re-running the job on the same day produces no extra emails

In-app notifications still fire in real time on each submission — the digest is on top of that, not a replacement for it.

When it runs

The job runs automatically and only triggers on workspaces where at least one inbox contains a timesheet item. Inboxes containing only time-off items do not produce a digest (out of scope for v1).

Parameters

This job has no parameters.

Job results

MetricDescription
sentNumber of digest notifications created
skippedManagers whose inbox had no timesheet items, or who have no linked user account
duplicatesSame-day re-runs (dedup hit, expected)
errorsFailures during processing

Troubleshooting

IssueSolution
Manager not receiving a digestConfirm the manager has a linked user account and that their approvals inbox actually contains pending timesheet items (check Approvals)
Same employee appears twiceThe digest lists one row per period awaiting action. If both the previous and current periods are pending for one employee, two rows is expected
Digest missing right after a rebuildThe approvals inbox is rebuilt from events. If lifecycle events for a period are missing target IDs, the inbox row will not materialise. Re-run Timesheet statement reminder to re-emit them