Emergency Handling Flow
Emergency Resolution Flowchart
flowchart TD
A[Field Team: Report Unavailable] --> B[EmergencyEvent Created]
B --> C[Central Ops: Inform Customer of Delay]
C --> D[Central Ops: Search Backup Teams in Zone]
D --> E{Available Team Found?}
E -->|Yes| F[Create EmergencyAssignment]
F --> G[Create New Survey/Installation Assignment]
G --> H[Notify Backup Team]
H --> I[Backup Team Confirms & Executes]
I --> J[Emergency Resolved]
E -->|No| K[Search Adjacent Zones]
K --> L{Available Team Found?}
L -->|Yes| F
L -->|No| M[Create PriorityReschedule]
M --> N[Propose New Date to Customer]
N --> O{Customer Confirms?}
O -->|Yes| P[Update Survey/Installation Date]
P --> J
O -->|No| Q[Propose Alternative Date]
Q --> N
Backup Team Search Logic
The backup search follows this priority order:
Same zone, same specialization: Teams in the same zone with matching
team_type(survey or installation) andis_available=TrueSame zone, dual specialization: Teams in the same zone with
team_type='both'Adjacent zones: Teams in neighboring zones (requires zone adjacency mapping)
No backup found: Fall through to priority reschedule
Each team checked is logged as a BackupSearch record for audit trail.
Resolution SLA
Emergency events should be resolved within 4 hours of creation
Unresolved emergencies after 2 hours are escalated on the Central Ops dashboard
All emergency events appear as high-priority items in the Central Ops queue