Skip to content

Novu console: attach the org category + routing conditions so ADR 23 preferences actually gate delivery #1055

Description

@teetangh

What is outstanding

ADR 23 (#1051, merged) made notifications carry their org scope and made the org preference categories writable. The application half is complete and live — every flag below is written to the Novu subscriber record by POST /api/novu/subscriber and PUT /api/novu/preferences.

The other half is Novu console configuration and cannot be done from this repository. Until it exists, the preference switches save, display and read back correctly but do not gate delivery — a member who turns off billing alerts still receives them.

Nothing is broken in the meantime: every flag defaults permissive, so the switches are simply inert.

Runbook

The exact mapping — which subscriber.data key, which workflow slug, which step, plus two end-to-end checks — is in the repo at:

docs/enterprise/50-operations/09-novu-console-conditions.md

Summary of what needs attaching in the Novu console:

Key Applies to
routingBell / routingEmail the In-App / Email step of every workflow
categoryOrgBilling 10 invoice, wallet, payout and overage workflows
categoryOrgMembership 5 invite, roster and SSO workflows
categoryOrgProgram 4 cap, exhaustion, renewal and export workflows

Verification

  • Org dashboard → Settings → Notifications → turn Billing & Payouts off → trigger an invoice event → nothing should arrive. Turn back on → it should.
  • Workspace settings → Notification routingEMAIL_ONLY → trigger any org event → email arrives, bell stays silent. Note the routing flags are written by syncSubscriber, which runs on dashboard mount — reload after changing the setting.

Known limitation, deliberate

ORG_* payloads do not carry a NotificationScope. They are unambiguous by construction, so a discriminator would be redundant — but it means they appear under the inbox's All tab and not under a specific organization's tab, which filters on organizationId. If an operator wants org-lifecycle events filed under their org's tab, that is a code change (add the scope to those payloads), not a console condition.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    launch: pre-mvpGates launch — money, data, or a failure we would not detectnotificationsNotification and email system

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions