Skip to main content

Notification

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 NameTypeDisplay Name
NotificationIdInt32Notification id
OrganizationIdInt32Organization id
TitleStringTitle
MessageStringMessage
TypeNotificationTypeType
PriorityNotificationPriorityPriority
TargetUserIdStringTarget user id
EntityTypeStringEntity type
EntityIdNullable`1Entity id
ExpiresAtNullable`1Expires at
CreatedDateTimeCreated
CreatedByStringCreated by
LastModifiedDateTimeLast modified
LastModifiedByStringLast modified by

Enums

NotificationType

ValueNameDescription
0SystemSystem-generated notification
1OrderUpdateOrder status or field change
2TaskAssignmentWorkflow task assigned to user
3AlertUrgent alert requiring attention
4InfoInformational notification

NotificationPriority

ValueName
0Low
1Normal
2High
3Urgent

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