Alerts
TeeTime “alerts” are operator- or system-generated notifications that surface time-sensitive conditions to staff and/or players. In practice, TeeTime uses:
- Real-time tee-sheet events over WebSocket (starter/admin dashboards).
- Messaging templates (WhatsApp-first, plus push/in-app/SMS/email fallbacks) for player/staff notifications.
This page documents the alert families that exist today and where they’re emitted.
Pace alerts
When a group falls behind pace, TeeTime can emit:
- WebSocket event:
pace.alert - Messaging templates:
tee.pace.alert(critical) andtee.pace.warning(warning)
The emitter is PaceAlertService, which is called when pace/check-in updates are processed.
Config:
PACE_ALERTS_ENABLED=trueenables pace alerts.PACE_WARNING_THRESHOLD_MINUTES(default10)PACE_CRITICAL_THRESHOLD_MINUTES(default20)PACE_FCM_ENABLED=trueenables messaging delivery for pace alerts.
References:
libs/tee-time-services/src/lib/gateway/pace-alert.service.tslibs/tee-time-services/src/lib/gateway/tee-sheet.gateway.tslibs/tee-time-services/src/lib/messaging/teetime-messaging.types.ts
Weather alerts
Weather monitoring is a scheduled sweep that evaluates configured thresholds for courses and can:
- Send player notifications using the
tee.weather.alerttemplate. - Optionally reconcile course status using
CourseStatusService.evaluateForCourseDate(...).
Config:
WEATHER_ALERT_CRON(default15 * * * *)WEATHER_ALERT_CRON_TZ(defaultAfrica/Johannesburg)WEATHER_ALERT_LOOKAHEAD_HOURS(default6)WEATHER_ALERT_COOLDOWN_MINUTES(default180)
Notes:
- Delivery requires the messaging service + a resolver that can list monitored courses and resolve affected bookings.
- If either is missing, the scheduler logs and no-ops (safe by default).
References:
libs/tee-time-services/src/lib/messaging/weather-alert-scheduler.service.tslibs/tee-time-services/src/lib/messaging/weather-notification.service.tslibs/tee-time-services/src/lib/messaging/weather-monitoring.port.tslibs/tee-time-services/src/lib/messaging/teetime-messaging.types.ts
Waitlist notifications
Waitlist flows emit both real-time events (for admin dashboards) and player messaging templates:
- Templates:
tee.waitlist.slot_availabletee.waitlist.offer_expiredtee.waitlist.confirmed
- WebSocket events (non-exhaustive):
waitlist.joined,waitlist.leftwaitlist.offer-created,waitlist.offer-accepted,waitlist.offer-declined,waitlist.offer-expired
References:
libs/tee-time-services/src/lib/gateway/tee-sheet.gateway.tslibs/tee-time-services/src/lib/messaging/teetime-messaging.types.ts
Direct/bulk notices
The tee-time messaging adapter supports:
tee.player.message(direct)tee.bulk.notice(bulk)
Channel priority is WhatsApp-first by default (TEETIME_CHANNEL_PRIORITY), and delivery is bridged into the messaging service via
TeeTimeMessageQueueAdapter.
References:
libs/tee-time-services/src/lib/messaging/teetime-messaging.types.tslibs/tee-time-services/src/lib/messaging/teetime-message-queue.adapter.ts