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.
Properties
| Property | Type | Mode | Description | Required |
|---|---|---|---|---|
| tenant | Tenant | stored | Reference to the Tenant this notification preference applies to | Required |
| notificationType | string | stored | Type of notification this preference configures Values: Example: | Required |
| enabled | boolean | stored | Whether notifications of this type are enabled for the tenant Example: | Required |
| channel | string | stored | Delivery channel for this notification type Values: Example: | Required |
| recipient | string | stored | Recipient address (email, phone, webhook URL, Slack channel) Example: | Required |
| frequency | string | stored | Notification delivery frequency Values: Example: | Required |
| quietHoursStart | string | stored | Start time for quiet hours (no notifications sent, format HH:MM) Example: | Optional |
| quietHoursEnd | string | stored | End time for quiet hours (format HH:MM) Example: | Optional |
| metadata | json | 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"
}