Skip to main content

SLA Alerts and Email Digest

Complaints have a processing deadline per phase and an overall deadline (SLA). The SIG reports delays through alert endpoints, a daily email digest and automatic escalation.

Endpoints​

MethodEndpointAccessDescription
GET/api/plaintes/alerteslogged-in userOverdue complaints and counters
GET/api/plaintes/alertes/statslogged-in userCounters only
GET/api/plaintes/alertes/resumelogged-in userSummary for the user's dashboard
POST/api/plaintes/alertes/checkROLE_ADMINRuns the check and sends the alerts

GET /api/plaintes/alertes/stats​

{
"success": true,
"data": {
"total_ouvertes": 60,
"en_retard_phase": 8,
"en_retard_sla": 5,
"echeance_proche": 12,
"critiques": 2
}
}

critiques counts complaints more than 3 days overdue.

GET /api/plaintes/alertes/resume​

{
"success": true,
"data": {
"totalOuvertes": 60,
"enRetardPhase": 8,
"enRetardSla": 5,
"echeanceProche": 12,
"critiques": 2,
"plaintesUrgentes": [
{
"id": "…",
"reference": "PLT-2026-000123",
"plaignant": "…",
"priorite": "haute",
"joursRestantsPhase": -2,
"joursRestantsSla": 1,
"isPhaseEnRetard": true,
"isSlaEnRetard": false
}
],
"hasAlertes": true
}
}

POST /api/plaintes/alertes/check​

Response: { "success": true, "message": "Vérification des alertes effectuée", "data": { … } }.


Daily digest​

The digest has no endpoint: it is sent by a scheduled command.

php bin/console app:plaintes:send-digest # envoi
php bin/console app:plaintes:send-digest --dry-run # simulation
  • Each user receives a single email listing all overdue complaints that concern them, with each complaint's project.
  • A complaint already reported in the last 24 hours is not repeated.
  • Emails go through the asynchronous queue (Messenger), never through an SMTP call inside the request.
  • ENABLE_PLAINTE_ALERTS=false disables the alerts.

Recommended schedule: once a day at 8 am.

0 8 * * * php bin/console app:plaintes:send-digest

Overdue check​

php bin/console app:plaintes:check-overdue [--dry-run] [--stats-only]

Automatic escalation​

php bin/console app:plaintes:escalade [--dry-run]

When the workflow phase does not configure its own levels, escalation follows two tiers:

LevelRecipientTrigger
0AgentNo escalation
1Component coordinator, based on the complaint's moduleEscalation delay exceeded once
2National coordinatorDelay exceeded twice

For sensitive cases, the delay is halved. Recommended schedule: every two hours.

0 */2 * * * php bin/console app:plaintes:escalade

Manual escalation is described in Escalation.