Skip to main content

Notification Business Rules

Summary

This reference defines 25 source-backed rules across event intake, recipient and preference decisions, template selection, delivery, retry, inbox access and legacy administration.

Audience

Product owners, administrators, developers, QA, support, security reviewers and implementation partners.

Business Purpose

Provide the authoritative catalog for notification acceptance testing, operational interpretation and product decisions. Where legacy and extracted implementations differ, the catalog identifies the scope.

Actors

Product owners, administrators, developers, QA, support, security reviewers and implementation partners.

Business Flow

Rules follow the event from intake through resolution, suppression, rendering, persistence, delivery, retry, audit and employee read state.

Responsibilities

Product owns intent; engineering maintains source alignment; QA validates triggers and outcomes; operations applies the rules during investigation; security validates tenant and access assumptions.

Business Rules

Reference Content

RuleTriggerOutcomeValidationSource
NTF-BR-001 Supported-event gateAn event reaches the extracted consumerOnly one of 42 mapped event types enters dispatchPublish mapped and unmapped event fixturesEventNotificationResolver.cs; NotificationEventConsumer.cs
NTF-BR-002 Event idempotencyAn event identifier was already processedThe duplicate is audited and no new message is createdReplay the same event identifierNotificationDispatcher.cs
NTF-BR-003 Stale-event handlingEvent age exceeds configured allowanceThe event is audited as stale and recorded processedDispatch an event outside the configured windowNotificationDispatcher.cs; NotificationOptions.cs
NTF-BR-004 No-intent outcomeResolver returns no recipients/intentsProcessing records a no-recipient outcomeUse payload without a resolvable audienceNotificationDispatcher.cs
NTF-BR-005 Recipient identityA resolved intent is acceptedRecipient is upserted by tenant, recipient type and external referenceRepeat intent with changed contact dataNotificationDispatcher.cs; NotificationDbContext.cs
NTF-BR-006 Channel de-duplicationIntent contains repeated channel namesEach normalized channel is evaluated onceSupply repeated/mixed-case channelsNotificationDispatcher.cs
NTF-BR-007 Preference precedenceEvent-specific and wildcard preferences both existEvent-specific setting winsConfigure conflicting scopesPreferenceEvaluator.cs
NTF-BR-008 Default preferenceNo applicable preference existsChannel is enabledRemove both preference scopesPreferenceEvaluator.cs
NTF-BR-009 Disabled channelApplicable preference disables a channelChannel is suppressed and auditedDisable the event/channel combinationNotificationDispatcher.cs
NTF-BR-010 Channel addressEnabled channel has no usable addressThat channel is skipped and auditedRemove email or phone as applicableNotificationDispatcher.cs
NTF-BR-011 Tenant template priorityActive tenant and global templates existHighest active tenant version is selectedCreate both scopes and renderTemplateEngine.cs
NTF-BR-012 Global fallbackNo active tenant template existsHighest active global version is selectedDeactivate tenant versionsTemplateEngine.cs
NTF-BR-013 Missing templateNo active tenant or global template existsChannel is skipped and audited as template missingDeactivate all matching versionsNotificationDispatcher.cs; TemplateEngine.cs
NTF-BR-014 Variable substitutionTemplate contains known variablesVariables are replaced from resolved dataRender representative event dataTemplateEngine.cs
NTF-BR-015 Missing variableTemplate variable is absent from dataPlaceholder becomes empty textRender with one variable omittedTemplateEngine.cs
NTF-BR-016 Persist before sendAddress and template resolvePending rendered message is stored before delivery startsObserve message before sender resultNotificationDispatcher.cs
NTF-BR-017 Bounded automatic retrySender reports failureDelivery retries with configurable exponential delay until success or limitUse deterministic failing senderRetryPolicy.cs; NotificationDispatcher.cs
NTF-BR-018 Attempt evidenceA delivery try occursOne success, failure or skipped attempt is appendedCompare attempt count with triesNotificationDispatcher.cs
NTF-BR-019 Successful sendSender succeedsMessage becomes sent with sent time and success auditUse successful senderNotificationDispatcher.cs
NTF-BR-020 Exhausted sendAll allowed attempts fail or sender is absentMessage becomes failed with error and failure auditUse failing or unregistered senderNotificationDispatcher.cs
NTF-BR-021 Manual retryOperator retries a failed messageStatus returns to pending, prior error clears and delivery rerunsRetry a known failed messageNotificationDispatcher.cs; NotificationEndpoints.cs
NTF-BR-022 Event processed semanticsAt least one message record was createdEvent outcome is processed even if created messages failedFail every sender after message creationNotificationDispatcher.cs
NTF-BR-023 Extracted template versionA service template is created for a known key/channelNext version is assigned within tenant/key/channel scopeCreate two versions and compareNotificationEndpoints.cs; NotificationDbContext.cs
NTF-BR-024 Authenticated legacy inboxSigned-in active user lists or updates notificationsOnly that user's current and legacy records are read or changedTest with two user identitiesNotificationsController.cs
NTF-BR-025 Legacy template access and resetAdmin lists, saves, previews or resets an event-key templateOnly super-admin or tenant-admin with tenant context is allowed; reset restores inherited/default behavior by scopeExercise roles and both reset scopesNotificationTemplatesController.cs

Integrations

The rules cover the event consumer, resolver, recipient directory, preference evaluator, template engine, message and attempt stores, senders, legacy inbox and legacy template editor.

Limitations

The catalog describes reviewed code, not confirmed production configuration. It does not convert simulated channel success into external delivery assurance or resolve the dual template models.

Requires Confirmation

Confirm business approval for stale-event policy, mandatory notifications, retry limits, content governance, external-delivery semantics and access controls before promoting these rules beyond Draft.

Source References

  • microservices/src/notification-service/Application/NotificationDispatcher.cs
  • microservices/src/notification-service/Application/EventNotificationResolver.cs
  • microservices/src/notification-service/Application/PreferenceEvaluator.cs
  • microservices/src/notification-service/Application/TemplateEngine.cs
  • Controllers/NotificationsController.cs
  • Controllers/NotificationTemplatesController.cs

See Also

Keywords

Business rule, trigger, outcome, validation, source.

Revision Information

Draft authoritative catalog of 25 rules; reviewed 2026-07-21; next quarterly review 2026-10-21.