Preferences
Subscriber notification preferences in Enbbox. Channel-level and workflow-level preference management for email, SMS, push, in-app, and chat notifications.
Preferences give subscribers control over which notifications they receive and through which channels. This improves user experience and reduces notification fatigue.
Preference Levels
Global Preferences
Subscribers can enable or disable entire channels:
// Subscriber disables SMS notifications globally
await enbbox.subscribers.updateGlobalPreferences("user-123", {
preferences: [{ channelType: "sms", enabled: false }],
});Workflow Preferences
Per-workflow channel preferences:
// Subscriber disables email for marketing updates
await enbbox.subscribers.updateWorkflowPreference("user-123", {
workflowId: "marketing-updates",
channel: { email: false },
});Preference Hierarchy
Preferences are evaluated in order of specificity:
- Critical workflow flag — Always delivered (overrides all preferences)
- Workflow-level channel preference — Most specific subscriber setting
- Global channel preference — Subscriber's default for the channel
- Workflow default — The workflow's configured default preference
Critical Workflows
Some notifications must always be delivered regardless of subscriber preferences:
- Password reset emails
- Security alerts
- Legal notices
- Payment confirmations
Mark a workflow as critical in the workflow editor to bypass subscriber preferences.
Preference UI
The <Inbox /> component includes a built-in Preferences panel that allows subscribers to manage their notification settings directly in your application.
You can also build a custom preference UI using the API:
// Get subscriber preferences
const prefs = await enbbox.subscribers.getPreferences("user-123");
// Update preferences
await enbbox.subscribers.updatePreference("user-123", {
workflowId: "weekly-digest",
channel: { email: true, sms: false },
});Default Preferences
Configure default preferences at the workflow level to establish baseline notification behavior for all subscribers. Subscribers can then customize from there.