Notifications Features
The Agglestone Messaging Service provides powerful notification capabilities that let you send messages to users that are stored in their personal inbox for later reading. All features are accessible through REST APIs, making it easy to build notification functionality directly into your own applications.
Notification Inbox
Every user has their own personal inbox where all notifications are stored. This inbox acts as a complete record of all messages sent to the user, allowing them to view their notification history, paginate through messages, and manage their notifications over time.
Notifications in the inbox are persisted permanently (until deleted), so users can always access their notification history. This makes the inbox perfect for onboarding information, important messages, system announcements, account updates, and any other communications that users need to reference later.
Sending Notifications
Creating Notifications
Create notifications that are immediately stored in the recipient’s inbox. You can specify the recipient user, the notification type, subject, message content, and priority level. Notifications are created instantly and are immediately available in the user’s inbox.
Notification Types
Notifications support different types, allowing you to categorize messages appropriately. Common notification types include user invites, registration welcomes, system announcements, password resets, account verifications, and more. This categorization helps users understand the nature of each notification and allows your application to handle different notification types appropriately.
Priority Levels
Set priority levels for notifications to indicate their importance. Notifications can be marked as low, normal, high, or urgent priority. This allows users to prioritize which notifications they read first and helps your application surface the most important messages.
Rich Content
Notifications support both plain text and HTML content, giving you flexibility in how you format and present messages. You can include links, formatting, and structured content in notifications to provide rich, engaging messages to your users.
Email Delivery
Optional Email Notifications
Notifications can optionally be delivered via email in addition to being stored in the inbox. When you create a notification, you can specify whether it should also be sent as an email. This ensures users never miss important messages even when they’re not actively using your application.
Email delivery is handled automatically by the service, so you don’t need to manage email infrastructure yourself. Simply specify that a notification should be sent via email, and the service handles the rest. Alternatively you can specify the configuration details of an external email provider’s API, to route these emails through their service.
Managing Notifications
Viewing Your Inbox
Retrieve paginated notifications from your inbox. You can paginate through all your notifications, making it easy to build inbox interfaces, notification lists, or any other view of a user’s notification history.
Filtering Notifications
Filter notifications by date range to get messages created after a specific time. This allows you to implement features like “show notifications from the last week” or fetch notifications created since a user last checked their inbox.
Viewing Individual Notifications
Retrieve specific notifications by their ID. This allows you to display full notification details, build notification detail views, or access complete notification information when needed. Users can only access their own notifications.
Marking as Read
Mark notifications as read or unread. This allows users to track which notifications they’ve already viewed and helps your application display unread counts or highlight new notifications. Users can mark their own notifications as read or unread as needed.
Deleting Notifications
Permanently delete notifications from a user’s inbox. This allows users to clean up their notification history and remove messages they no longer need. Users can only delete their own notifications.
Real-Time Notifications
When a new notification is created for a user, they receive a real-time notification event through their SignalR and WebSocket connection if they are currently connected. These events are lightweight notifications that indicate a new message has arrived, allowing your application to immediately update the user interface and fetch the full notification details.
The SignalR and WebSocket connection automatically handles reconnection, so users stay connected even if their network connection is temporarily interrupted. When reconnecting, users should fetch any unread notifications that were created while they were disconnected.
Notification Status
Notifications have status indicators that track their lifecycle. Notifications can be in various states including pending, scheduled, sent, read, failed, or cancelled. This status information helps you understand the delivery state of notifications and allows your application to handle different notification states appropriately.
Scheduled Notifications
Schedule notifications to be sent at a future time. When creating a notification, you can specify a scheduled delivery time. The notification will be created immediately but will remain in a scheduled state until the specified time arrives, at which point it will be processed and delivered.
Multi-Tenant Architecture
The Agglestone Messaging Service is built on a multi-tenant architecture where each tenant operates in complete isolation. This means:
- Tenant-Scoped Inboxes – Each user’s inbox is tenant-scoped and completely separate from other tenants
- Isolated Notifications – All notifications are tenant-scoped and cannot be accessed across tenant boundaries
- Independent Delivery – Email delivery and notification processing are tenant-scoped, ensuring complete isolation
- Separate Configuration – Notification settings and delivery configuration are independent per tenant
This architecture ensures that your notification data and user inboxes remain completely private and secure, while allowing you to build comprehensive notification functionality into your applications.
—
Want to learn more about chat functionality? Check out Chat Features.