Overview
AutoLog’s Notification System provides a powerful, event-driven architecture for sending automated emails and alerts. The system consists of three main components: Events, Groups, and Templates.System Architecture
How Notifications Work
All three components (Events, Groups, Templates) must be properly configured for notifications to work.
Dashboard Overview
The Notifications Dashboard provides real-time metrics:Key Performance Indicators
Today’s Notifications- Total notifications sent today
- Resets at midnight
- Useful for monitoring activity volume
- Count of delivered notifications
- High percentage indicates healthy system
- Notifications that couldn’t be delivered
- Investigate if this number is high
- Messages blocked by filters or user preferences
- Normal for opt-out compliance
- Time from trigger to delivery (in seconds)
- Lower is better (target: <5 seconds)
Dashboard metrics update in real-time as notifications are processed.
Recent Notifications Table
Displays the most recent notification activity: Columns:- ID: Unique notification identifier
- Event: Which event triggered it
- Severity: Priority level (Low, Medium, High, Critical)
- Status: Delivery state (Delivered, Sent, Failed, Pending, Queued)
- Date: When the notification was sent
- Delivered: Confirmed received by recipient
- Sent: Handed off to email provider
- Failed: Delivery error occurred
- Suppressed: Blocked by rule or preference
- Pending: Waiting to be processed
- Queued: Scheduled for future sending
Events & Routing
What are Events?
Events are triggers that cause notifications to be sent. Each event represents a specific action or condition in AutoLog. Example events:VEHICULO_SALIDA: Vehicle checked outVEHICULO_REGRESO: Vehicle returnedMANTENIMIENTO_PENDIENTE: Maintenance dueRESERVA_CREADA: Reservation madeACTIVO_MOVIDO: Asset moved
Event Properties
Clave (Key)- Unique identifier in UPPERCASE_SNAKE_CASE
- Used by code to trigger events
- Cannot be changed after creation
- Human-readable event description
- Displayed in UI and reports
- Detailed explanation of when event occurs
- Helps administrators understand purpose
- Priority level: Low, Medium, High, Critical
- Can be overridden when event is triggered
- Affects visual styling and urgency
- Active: Event can trigger notifications
- Inactive: Event is disabled, no notifications sent
- Number of notification groups configured to receive this event
- Click to manage group assignments
Creating an Event
Fill Event Details
- Clave: Unique key (e.g.,
CUSTOM_EVENT_NAME) - Nombre: Display name
- Descripción: What triggers this event
- Severidad: Default priority level
- Activo: Toggle to enable immediately
Editing Events
- Find the event in the list
- Click the edit (pencil) icon
- Modify properties (except clave)
- Save changes
Activating/Deactivating Events
Toggle events on/off without deleting:- Click the toggle switch icon next to the event
- Confirm the status change
- Red toggle = Inactive, Green = Active
Deactivating an event stops all notifications for that event but preserves configuration for future reactivation.
Assigning Groups to Events
Select Groups
A modal shows all available groups:
- Checkboxes indicate current assignments
- Search to filter groups
- Select/deselect as needed
Events can have multiple groups assigned. All members of assigned groups will receive notifications when the event triggers.
Deleting Events (Soft Delete)
- Click the trash icon next to the event
- Confirm deletion
- Event is marked inactive and hidden from normal view
- Can be restored by administrators if needed
Notification Groups
Groups define who receives notifications for specific events.Group Structure
Group Properties:- Nombre (Name): Group identifier
- Descripción (Description): Purpose of the group
- Activo (Active): Whether group is enabled
- Miembros (Members): Users who receive notifications
- Canales (Channels): Delivery methods enabled
Creating a Group
Set Group Details
- Name: Descriptive name (e.g., “Fleet Managers”, “Maintenance Team”)
- Description: Who should be in this group and why
- Active: Enable the group
Managing Group Members
Adding Members
Adding Members
- Open the group details
- Click “Add Members”
- Search for users by name or email
- Select users to add
- Save changes
Removing Members
Removing Members
- Open the group member list
- Click the remove icon next to the user
- Confirm removal
Channel Configuration
Groups can use multiple notification channels: Email- Most common channel
- Sends to user’s registered email address
- Supports HTML templates
- Text message notifications
- Requires phone numbers in user profiles
- In-app push notifications
- Requires mobile app installation
To enable additional channels, contact your system administrator. Email is enabled by default.
Email Templates
Templates define the content and format of notification emails.Template Structure
Each template consists of: Evento (Event)- Which event this template is for
- Example:
VEHICULO_SALIDA
- Delivery method (usually “email”)
- Language code (es, en, etc.)
- Allows multilingual notifications
- Email subject line
- Supports placeholders like
{{empleado_nombre}}
- Email HTML content
- Full HTML support for rich formatting
- Uses placeholder syntax for dynamic data
- Additional configuration (JSON format)
default_payload: Default values for placeholderssubject_prefix: Prefix for all subjects (e.g., “[FLOTA]”)
- Active: Template can be used
- Inactive: Template is disabled
- Whether this is the default template for the event/channel/locale combo
- Only one template can be default per combination
Creating a Template
Using Placeholders
Placeholders are replaced with actual data when notifications are sent: Syntax:{{variable_name}}
Common placeholders:
{{empleado_nombre}}: Employee name{{vehiculo_placa}}: Vehicle license plate{{vehiculo_marca}}: Vehicle make{{vehiculo_modelo}}: Vehicle model{{fecha_salida}}: Checkout date/time{{fecha_regreso}}: Return date/time{{link_detalle}}: Link to details
{{cliente.nombre}} for nested objects
Template Preview
Test your template before using it:Review Output
Check:
- Subject line formatting
- All placeholders replaced correctly
- HTML renders properly
- Links work
Local vs Server Preview
Toggle between preview modes: Local Preview- Renders in browser using JavaScript
- Instant results
- Good for quick checks
- May not reflect server-side logic exactly
- Renders on server (same as production)
- Accurate representation
- Includes metadata processing
- Slightly slower
Use server preview for final validation before publishing a template.
Sending Test Emails
Publishing Templates
Once a template is ready for production:- Click “Publicar como default”
- This makes it the active template for the event/channel/locale combination
- All notifications for that event will use this template
Publishing automatically unpublishes the previous default template.
Template Metadata
Metadata enhances template functionality with JSON configuration: subject_prefixNotification Workflow Example
Scenario: Vehicle Checkout Notification
Groups Retrieved
System finds groups assigned to
VEHICULO_SALIDA:- “Fleet Supervisors” group
- “Vehicle Checkout Recipients” group
Email Composed
Template placeholders are replaced:Subject:
[FLOTA] Vehículo HAA-1234 ha sido retiradoBody:Notifications Sent
Emails dispatched to:
- Ana García (the employee)
- All members of “Fleet Supervisors”
- All members of “Vehicle Checkout Recipients”
Permissions and Access
Notification management requires specific permissions: View Notifications- See dashboard and history
- View events, groups, templates (read-only)
- Create, edit, activate/deactivate events
- Assign groups to events
- Create and edit groups
- Add/remove members
- Configure channels
- Create and edit templates
- Publish templates
- Send test emails
Best Practices
Event Management
Event Best Practices
Event Best Practices
- Use clear, descriptive event names
- Follow naming convention:
RESOURCE_ACTION(e.g.,VEHICULO_SALIDA) - Document events thoroughly in descriptions
- Set appropriate default severity
- Review and deactivate unused events
Group Management
- Keep groups focused (single purpose)
- Regularly audit membership
- Remove inactive users promptly
- Use descriptive group names
- Document group purpose
Template Design
- Keep it simple: Clear, concise messages
- Use branding: Include logo and colors
- Mobile-friendly: Test on mobile devices
- Clear CTAs: Make actions obvious
- Test thoroughly: Use multiple test payloads
- Handle missing data: Use default values or conditional logic
Troubleshooting
Notifications Not Being Sent
Checklist:- Is the event active?
- Are groups assigned to the event?
- Do groups have active members?
- Is the template published as default?
- Check notification history for errors
Email Delivery Issues
Problem: Emails sent but not received Solutions:- Check spam/junk folders
- Verify recipient email addresses
- Confirm email server configuration
- Review suppression lists
- Check email service provider logs
Template Placeholders Not Replaced
Problem: Email shows{{variable_name}} instead of value
Solutions:
- Verify placeholder name matches payload keys exactly (case-sensitive)
- Check that event payload includes the variable
- Use default_payload in metadata for fallbacks
- Test with known-good payload data
Preview Shows Different Content Than Production
Problem: Server preview differs from actual emails Solutions:- Always use server preview for final checks
- Verify template is published as default
- Clear template cache (contact administrator)
- Check if event payload differs from test payload
Advanced Configuration
Custom Event Payloads
Developers can trigger events with custom data:Conditional Logic in Templates
While not fully implemented, you can simulate conditions:Advanced template features may require custom implementation. Contact your developer for assistance.
Related Features
- Dashboard: View notification activity
- Vehicle Operations: Events triggered by vehicle actions
- Reservations: Reservation-related notifications
Technical Reference
Source Files:- Notifications UI:
src/pages/Notificaciones/Notificaciones.jsx - Event services:
src/services/NotificacionesEventosService.js - Group services:
src/services/NotificacionesGruposService.js - Template services:
src/services/NotificacionesPlantillasService.js
listEventos(): Fetch all eventscreateEvento(data): Create new eventsetEventoGrupos(eventId, groupIds): Assign groupslistGrupos(): Fetch all groupsaddMiembros(groupId, userIds): Add group membersapiCreatePlantilla(data): Create templateapiPreviewPlantilla(config): Preview templateapiPublishPlantilla(templateId): Publish template as default