Real-time notification entity. Notifications are org-scoped and can target a specific user or broadcast to all active users in the organization.
Fields
| Field Name | Type | Display Name |
|---|
| NotificationId | Int32 | Notification id |
| OrganizationId | Int32 | Organization id |
| Title | String | Title |
| Message | String | Message |
| Type | NotificationType | Type |
| Priority | NotificationPriority | Priority |
| TargetUserId | String | Target user id |
| EntityType | String | Entity type |
| EntityId | Nullable`1 | Entity id |
| ExpiresAt | Nullable`1 | Expires at |
| Created | DateTime | Created |
| CreatedBy | String | Created by |
| LastModified | DateTime | Last modified |
| LastModifiedBy | String | Last modified by |
Enums
NotificationType
| Value | Name | Description |
|---|
| 0 | System | System-generated notification |
| 1 | OrderUpdate | Order status or field change |
| 2 | TaskAssignment | Workflow task assigned to user |
| 3 | Alert | Urgent alert requiring attention |
| 4 | Info | Informational notification |
NotificationPriority
| Value | Name |
|---|
| 0 | Low |
| 1 | Normal |
| 2 | High |
| 3 | Urgent |
Relationships
- Organization — belongs to one
Organization
- UserNotifications — one-to-many join to
UserNotification (per-user read state)
Targeting
- If
TargetUserId is set, a UserNotification row is created only for that user.
- If
TargetUserId is null, the system broadcasts: a UserNotification row is created for every active UserEmployee in the organization.
Entity Linking
EntityType and EntityId allow linking a notification to a specific domain entity (e.g., EntityType = "Order", EntityId = 12345). The frontend can use these to navigate to the related entity.
Domain Methods
ChangeTitle(string) — update title (required)
ChangeMessage(string?) — update message body
ChangeType(NotificationType) — change notification type
ChangePriority(NotificationPriority) — change priority level
ChangeExpiresAt(DateTime?) — set or clear expiration
See Also