Service dashboard
The main dashboard (/services/{service_id}) shows an overview of your notification activity.
Dashboard sections
The dashboard uses AJAX-based partials that auto-refresh to show live data:- Last 7 days
- Template statistics
- Inbox
- Upcoming
Activity totals - Shows counts for the last 7 days:
- Emails sent: Total emails with delivery stats
- Text messages sent: Total SMS with delivery stats
- Letters sent: Total letters with delivery stats
- Count of sent notifications
- Count of failed notifications
- Failure percentage
- Warning indicator if failure rate exceeds 3%
Live updates
The dashboard uses JSON endpoints to update sections without full page reload:- Update URL:
/services/{service_id}/dashboard.json - Sections updated:
totals,template-statistics,inbox,upcoming - Initial load: Shows loading placeholders (
_totals-lazy.html,template-statistics-lazy.html)
The dashboard only appears for users with
view_activity permission. Users without this permission are redirected to the template chooser.Notifications page
View and search all notifications sent from your service.Accessing notifications
Navigate to/services/{service_id}/notifications to see all notifications, or filter by type:
/services/{service_id}/notifications/email- Email notifications only/services/{service_id}/notifications/sms- SMS notifications only/services/{service_id}/notifications/letter- Letter notifications only
Status filtering
Filter notifications by delivery status:- Total
- Delivering
- Delivered
- Failed
Shows all notifications regardless of status (sending, delivered, failed).Query parameter:
status=sending,delivered,failedSearch functionality
Search notifications by:- Email: Email address
- SMS: Phone number
- Letter: Postal address or file name
- All types: Reference (if API keys exist for the service)
- Stores the search term in Redis with a hash (7-day TTL)
- Uses the hash in URLs to avoid exposing personal data
- Returns cached search results when navigating back
Data retention
Notifications are retained based on service settings:- Default retention: 7 days
- Configurable per service and message type
- Shown in UI: “Messages sent in the last X days”
current_service.get_days_of_retention(message_type)
Downloading notifications
CSV export limits
Two download methods available:- Direct download
- Report request
When available: Notification count ≤
MAX_NOTIFICATION_FOR_DOWNLOAD constantDownload link: Appears at top of notifications pageURL: /services/{service_id}/download-notifications.csvParameters:message_type: email, sms, or letterstatus: Filter by status
- Page size: 10,000 rows
- Respects service data retention days
Download format
CSV exports include:- Recipient information (formatted for human readability)
- Message status
- Sent date/time (numeric format)
- Template name
- Additional metadata based on notification type
{date} - {message_type} - {service_name} report.csv
Monthly statistics
View historical notification volume by month.Monthly view
Access at/services/{service_id}/monthly to see:
- Month-by-month breakdown for selected financial year
- Counts by message type (email, SMS, letter)
- Requested vs. delivered vs. failed counts
- Failure percentage for each month
- Warning indicators for high failure rates (>3%)
Year selector
Switch between financial years:- Default: Current financial year
- Available: Current year and 2 previous years
- URL parameter:
?year=2024 - Financial year: April 1 - March 31
/services/{service_id}/monthly?year=2024
Template usage reporting
Analyze which templates are being used and how often.Template usage page
Access at/services/{service_id}/template-usage to see:
- Monthly breakdown of template usage
- Templates grouped by month
- Sorted by usage count (highest first)
- Visual bar chart showing relative usage
Usage data
For each template in each month:- Template ID and name
- Template type (email/SMS/letter)
- Total count sent
- Whether it’s a precompiled letter
- Cancelled notifications
- Future months
template_statistics_client.get_monthly_template_usage_for_service(service_id, year)
Year filtering
Same financial year selection as monthly statistics:- Current year plus 2 previous years
- URL parameter:
?year=2024
Usage and billing
Track your service usage against allowances and view costs.Usage page
Access at/services/{service_id}/usage (requires manage_service or org user permission):
Annual summary
Shows for selected financial year:SMS:
- Free allowance for the year
- Total fragments sent (chargeable units)
- Remaining allowance
- Total cost (if exceeds allowance)
- Total sent (emails are free)
- Total sent
- Total cost (all letters are charged)
Dashboard usage widget
For users withmanage_service permission, dashboard shows annual usage:
- Updates via AJAX:
/services/{service_id}/dashboard-usage.json - Shows current year usage summary
- Links to full usage page
Letter postage breakdown
Letters are grouped by:- Postage type (ordered: first class, second class, economy mail, international)
- Rate (price per letter)
- Number of letters sent
- Rate charged
- Total cost for that group
Inbox (inbound SMS)
View and manage received text messages.Inbox page
For services withinbound_sms permission, access at /services/{service_id}/inbox:
- Shows received text messages in reverse chronological order
- Pagination (50 messages per page)
- Auto-refreshes via
/services/{service_id}/inbox.json
Message display
Each inbound message shows:- Sender phone number (formatted for human readability)
- Message content (with Excel formula characters stripped:
=+-@) - Received date/time (numeric format)
- Link to conversation thread
Download inbox
Export all inbound messages to CSV: URL:/services/{service_id}/inbox.csv
Columns:
- Phone number
- Message
- Received (timestamp)
Received text messages {current_date}.csv
The inbox download includes ALL inbound messages for the service, not just the current page.
Individual notification details
View detailed information about a specific notification.Notification page
Access at/services/{service_id}/notification/{notification_id}:
- Full notification details
- Rendered template with personalisation
- Current delivery status
- Status history
- Error messages (if failed)
- Letter preview (for letters)
Navigation context
The notification page provides contextual back links based on how you arrived:- From job: Back to job page
- From uploaded letters: Back to uploaded letters for that print day
- From search: Back to search results (preserves search hash)
- From status filter: Back to notifications with same filter
- Just sent: No back link (help=0 parameter)
Letter-specific features
- Precompiled letters
- Templated letters
For uploaded PDF letters:
- Shows page count from metadata
- Displays validation errors with affected page numbers
- Preview shows actual PDF pages as PNG images
- Option to cancel (if not yet sent to printer)
Real-time status updates
Notification status updates via JSON endpoint: URL:/services/{service_id}/notification/{notification_id}.json
Returns: Status partial HTML for dynamic updates
Report requests
For large datasets exceeding direct download limits.Creating a report request
From notifications page:- Click “Request a report” button
- System calls:
report_request_api_client.create_report_request() - Receives
report_request_id - Redirects to:
/services/{service_id}/report-request/{report_request_id}
Report request parameters
user_id: Current user requesting the reportreport_type: Type of report (from form submission)notification_type: Message type filter (email/sms/letter)notification_status: Status filter (sending/delivered/failed/all)
Feature flag
Report requests enabled when:Best practices
Monitor failure rates
Check dashboard daily for failure percentages above 3% - investigate templates or recipient data quality.
Use status filters
When troubleshooting, filter to failed notifications and search by recipient to identify patterns.
Download regularly
Export notification data regularly for your own records, respecting the data retention period.
Review template stats
Use template usage reports to identify unused templates that could be archived.