Using response templates (Staff workflow)
Templates help you communicate consistently and quickly.
What templates are
Templates are pre-written messages that can be: - public (visible to citizens), or - internal (staff-only notes)
Templates can be applied manually or triggered automatically by rules.
When to use templates
Use templates for: - “We received your report” - “We scheduled work” - “We need more information” - “Resolved / closed”
How to apply a template
Your deployment may expose templates through: - The backoffice UI (recommended), and/or - Django Admin tools (for previewing and testing)
Placeholders (dynamic values)
Templates can include placeholders that are filled from the occurrence, such as: - occurrence title - reporter name - status - service request ID
If a placeholder can’t be filled, the system keeps the message readable (it won’t crash).
Behind the scenes (grounded in code)
- Template model:
apps/occurrences/models.py→ResponseTemplate - Rendering logic:
ResponseTemplate.render() - Auto-response rules:
AutoResponseRule - Runtime application:
WorkflowPolicyService.apply_auto_response - Backoffice template APIs:
ResponseTemplateViewSetregistered inconfig/api_router.py(backoffice/templates)