Notifications
WorkDesk delivers real-time notifications via EdgeStream — no polling, no page refresh. A notification bell shows unread count; clicking it opens the notification panel with full history and read-state management.
Notification Types
hil_task_assigned
A new HIL task has been routed to you or your role. Includes task type and workflow name.
workflow_completed
A workflow you triggered has finished successfully. Links to execution history.
hil_task_overdue
A task assigned to you has passed its dueAt deadline without action.
system_alert
Maintenance windows, policy changes, or platform-wide announcements from admins.
EdgeStream Delivery
WorkDesk subscribes to the EdgeStream topic notifications.{userId} immediately on login. When the backend publishes a notification event to this topic, it is instantly pushed to the connected browser — no polling interval, no latency beyond network round-trip.
// React hook — subscribes to EdgeStream notification topic
import { useSubscription } from '@bizfirstai/edge-stream-react';
import { useNotificationStore } from '../stores/notificationStore';
function NotificationBell() {
const { addNotification, incrementUnread } = useNotificationStore();
useSubscription(`notifications.${currentUserId}`, (event) => {
addNotification({
id: event.payload.notificationId,
type: event.payload.type,
title: event.payload.title,
body: event.payload.body,
linkedUrl: event.payload.linkedUrl,
createdAt: event.payload.createdAt,
isRead: false,
});
incrementUnread();
});
const unreadCount = useNotificationStore(s => s.unreadCount);
return (
<div className="notification-bell">
<i className="fa-solid fa-bell" />
{unreadCount > 0 && <span className="badge">{unreadCount}</span>}
</div>
);
}
Notification Payload Shape
// EdgeStream event payload for notifications.{userId}
{
"notificationId": "notif-789abc",
"type": "hil_task_assigned",
"title": "New Approval Task",
"body": "You have been assigned an approval task in 'Expense Approval Flow'",
"linkedUrl": "/workdesk/inbox/task/3fa85f64-...",
"priority": "normal", // normal | high | urgent
"createdAt": "2026-05-25T10:30:00Z",
"metadata": {
"taskId": "3fa85f64-...",
"executionId": "7bc12d45-...",
"workflowName": "Expense Approval Flow"
}
}
Marking Notifications Read
Read state is persisted per-user in the WorkDesk database. When an employee opens the notification panel, all visible notifications are automatically marked read. Individual notifications can also be explicitly marked read.
// Mark a single notification read
POST /api/workdesk/notifications/{notificationId}/read
// Mark all notifications read
POST /api/workdesk/notifications/read-all
Notifications are retained for 30 days. After 30 days they are archived. Employees can search or filter the full 30-day notification history from the Notification History page.