TenantNotificationPreference

Notification preference configuration for a tenant workspace, defining which notification types are enabled, through which channels they should be delivered, to which recipients, and with what frequency. This entity enables granular notification management where tenants can customize their notification experience for different event types (security alerts, usage warnings, billing notifications, maintenance updates). It supports multi-channel delivery (email, SMS, Slack, webhooks), per-type configuration, notification scheduling (immediate, digest, quiet hours), and multiple recipients per notification type. The entity enables scenarios such as sending security alerts to the security team via Slack and email, billing notifications to finance via email only, or usage warnings as daily digests. It serves as the notification routing and preference layer for multi-tenant platforms, ensuring critical information reaches the right people through the right channels at the right time.

9 properties
Schema

Properties

PropertyTypeModeDescriptionRequired
tenantTenant
stored

Reference to the Tenant this notification preference applies to

Required
notificationTypestring
stored

Type of notification this preference configures

Values: security-alert, usage-warning, billing-notification, maintenance-update, feature-announcement, system-outage, compliance-report

Example: "security-alert"

Required
enabledboolean
stored

Whether notifications of this type are enabled for the tenant

Example: true

Required
channelstring
stored

Delivery channel for this notification type

Values: email, sms, slack, webhook, in-app, push

Example: "email"

Required
recipientstring
stored

Recipient address (email, phone, webhook URL, Slack channel)

Example: "security@acme.com"

Required
frequencystring
stored

Notification delivery frequency

Values: immediate, hourly, daily, weekly

Example: "immediate"

Required
quietHoursStartstring
stored

Start time for quiet hours (no notifications sent, format HH:MM)

Example: "22:00"

Optional
quietHoursEndstring
stored

End time for quiet hours (format HH:MM)

Example: "08:00"

Optional
metadatajson
stored

Additional notification configuration (templates, filters, etc.)

Optional

Examples

Example 1

{
  "@type": "TenantNotificationPreference",
  "tenant": {
    "@type": "Tenant",
    "slug": "acme-corp",
    "name": "ACME Corporation"
  },
  "notificationType": "security-alert",
  "enabled": true,
  "channel": "email",
  "recipient": "security@acme.com",
  "frequency": "immediate"
}

Example 2

{
  "@type": "TenantNotificationPreference",
  "tenant": {
    "@type": "Tenant",
    "slug": "acme-corp",
    "name": "ACME Corporation"
  },
  "notificationType": "billing-notification",
  "enabled": true,
  "channel": "email",
  "recipient": "billing@acme.com",
  "frequency": "immediate"
}

Example 3

{
  "@type": "TenantNotificationPreference",
  "tenant": {
    "@type": "Tenant",
    "slug": "acme-corp",
    "name": "ACME Corporation"
  },
  "notificationType": "usage-warning",
  "enabled": true,
  "channel": "slack",
  "recipient": "#engineering-alerts",
  "frequency": "daily",
  "metadata": {
    "slackWebhookUrl": "https://hooks.slack.com/services/xxx",
    "threshold": 80
  }
}

Example 4

{
  "@type": "TenantNotificationPreference",
  "tenant": {
    "@type": "Tenant",
    "slug": "techstart",
    "name": "TechStart Inc"
  },
  "notificationType": "maintenance-update",
  "enabled": true,
  "channel": "email",
  "recipient": "admin@techstart.com",
  "frequency": "weekly",
  "quietHoursStart": "22:00",
  "quietHoursEnd": "08:00"
}