SanctuaryDOCS
Open App
Serve Stats

Serve Stats and Burnout Detection

Serve
Access:Super Admin

The Serve module runs several background jobs to keep volunteer statistics current and protect volunteers from burnout. These jobs feed the Serve dashboard, volunteer profiles, and team leader notifications.

Job Schedule

FieldTypeDescription
Serve Stats RecalculationDaily, 2amRecomputes serve counts, confirmation rates, and estimated hours for every active team member across all tenants.
Burnout ScanMonday, 1amIdentifies volunteers serving significantly more than their team average. Sends burnout alert notifications to team leaders.
Escalation CheckEvery 6 hoursFinds volunteer confirmation requests that have timed out and auto-assigns the slot to the next available candidate.
Re-confirmationDaily, 10amSends "Still coming?" reminder emails to confirmed volunteers whose service is within the next 24-48 hours.

Serve Stats Recalculation

This nightly job uses a single SQL aggregation query (no N+1 queries) to compute statistics for all active team members in a tenant. The following metrics are calculated:

FieldTypeDescription
Serve Count (90 days)IntegerNumber of confirmed serve slots in the last 90 days.
Serve Count (YTD)IntegerNumber of confirmed serve slots in the current calendar year.
Serve Count (All Time)IntegerTotal confirmed serve slots ever.
Estimated Hours (90 days)DecimalEstimated volunteer hours in the last 90 days (serve count x 2 hours per service).
Confirm RateDecimalRatio of responses given to total confirmation requests. Higher rates indicate more reliable volunteers.
Last Served AtTimestampDate of the most recent confirmed service.
First Served AtTimestampDate of the earliest confirmed service.

Burnout Scan

Every Monday at 1am (tenant local time), the burnout scanner evaluates each active team and compares individual serve counts against the team average:

  1. For each team, calculate the average 90-day serve count across all members
  2. Flag any member whose 90-day count exceeds the average by the configured threshold multiplier (default: 2x)
  3. Create or update a BurnoutAlert record for flagged volunteers
  4. Send an in-app notification to the team leader with the volunteer's name, their serve count, and the team average

Configuration

FieldTypeDescription
Burnout Threshold MultiplierDecimalA volunteer is flagged when their 90-day serve count exceeds (team average x multiplier). Configured via Tenant Configuration (serveBurnoutThresholdMultiplier). Default: 2.0.

Escalation Check

Every 6 hours, the escalation job looks for volunteer confirmation requests that have gone unanswered past the configured timeout (default: 48 hours):

  1. Find pending slot confirmations where sentAt is before the cutoff and no response has been recorded
  2. Mark the confirmation as declined with a note “Auto-escalated: no response”
  3. Set the serve slot back to OPEN status
  4. Attempt to auto-assign the slot to the next best available candidate (not blacked out, not already assigned, not overloaded)
  5. If no suitable candidate is found, the slot remains open for manual assignment

Escalation Configuration

FieldTypeDescription
Escalation TimeoutHoursHow long to wait for a volunteer response before escalating. Configured via Tenant Configuration (serveEscalationTimeoutHours). Default: 48 hours.

Re-confirmation Emails

Daily at 10am, the re-confirmation job sends reminder emails to volunteers who have already confirmed but whose service is coming up within the configured window (default: 24–48 hours).

The job respects user notification preferences — if a volunteer has muted SERVE_REMINDER_DUE notifications or disabled email for that type, the reminder is skipped.

Re-confirmation Configuration

FieldTypeDescription
Hours Before ServiceHoursHow far before the service to send re-confirmation. Configured via Tenant Configuration (serveReconfirmHoursBefore). Default: 48 hours.

Related Pages

PreviousStatement Generation
NextSubscription Management