MEDIUM story-external-portal-coordination-global-admin-005 5 pts
5
Story Points
Medium
Priority
External Portal Coordination
Feature

User Story

As a Global Administrator
I want to monitor the health of the portal webhook infrastructure, including endpoint availability, payload rejection rates, and processing queue depth
So that So that I can detect degraded integration health before it impacts users and take corrective action — such as reprocessing failed events or investigating signature mismatches — without requiring direct Supabase dashboard access

Acceptance Criteria

  • Given a global admin opens the webhook health view, when it loads, then they see the active webhook endpoint URL, total payloads received in the last 24 hours, and rejection count with rejection reason breakdown
  • Given webhook payloads are being rejected at a rate above 10% in a rolling hour, when a global admin views the health dashboard, then a high-rejection-rate alert is prominently displayed
  • Given the webhook infrastructure is unreachable or the Edge Function has error-exited, when a global admin views the health dashboard, then an infrastructure outage alert is shown with the last-known healthy timestamp
  • Given a global admin identifies a batch of failed events, when they select those events and trigger reprocessing, then the events are re-enqueued for the portal sync service with a reprocessing flag
  • Given a global admin views the health dashboard, when they filter by a specific organization, then the metrics narrow to webhook events scoped to that organization's integration configuration

Business Value

The webhook infrastructure is a critical integration boundary that operates asynchronously and without user-facing feedback. Silent failures — such as the Dynamics portal changing its webhook target URL, a secret rotation mismatch, or an Edge Function regression — will cause the app and portal to silently diverge in data state. A dedicated health monitoring view enables global admins to detect and resolve these failures proactively, before coordinators or peer mentors notice inconsistent data.