Skip to main content

Configuration

setTabConfig

  • Using this config, you can customize the name of the tabs or disable them altogether.
  • By default, all the three tabs are enabled.
You can set it on Notifications Tool:
You can alternatively set it on Notifications Panel if you have directly embedded it:
Using APIs:

considerAllNotifications

Controls the notification count and unread indicator for the notification panel. When enabled, the notification count and unread badge include items from all tabs; when disabled (default), they only include items from the “For You” tab. Default: false
Using Props:

enableCurrentDocumentOnly

Programmatically filters notifications to show only those from the current document. By default it shows notifications for the 15 most recently active documents accessible to the current user in the current organization.
Hooks:
API:

setMaxDays

Notifications older than the specified number of days will not be displayed. Default: 15 days.
Using API:

panelOpenMode

Notifications Panel opens in one of the following ways:
  • popover: It opens as a popover on the Notification Tool.
  • sidebar: It opens as a sidebar from the right edge of the screen.
Default: popover.

pageSize

Control initial notification load count.

enableReadNotificationsOnForYouTab

  • You can control whether read notifications are displayed in the “For You” tab. By default, read notifications are removed from this tab.
  • This feature allows you to customize the visibility of read notifications in the “For You” tab, providing more flexibility in how notifications are displayed to users.
Default: false.
Using Props:
Using APIs:

enableCrossOrganization

  • When enabled, notifications from docs user has access to in other organizations are merged into the “For You” tab.
  • Only the “For You” feed is supported.
  • The enableCrossOrganization prop accepts a boolean, a CrossOrganizationConfig object, or a JSON config string; the enable-cross-organization attribute accepts "true" / "false" or a JSON config string.
Default: false.
Using Props:
Using APIs:
CrossOrganizationConfig fields: See CrossOrganizationConfig for the full type definition.
Passing { enabled: false } as the config to enableCrossOrganization() routes to disable. Passing null or calling without arguments opts in with all defaults.

getCrossOrganizationConfig

Retrieve the current cross-organization configuration. Use getCrossOrganizationConfig$() to subscribe to ongoing changes.

enableUserScopedNotifications

  • By default, the “For You” tab and the unread count are derived from the organization’s 15 most recently active documents. An unread notification whose document falls outside that window is not fetched, so it disappears from the tab and the count until the document becomes active again.
  • When enabled, the SDK also fetches the signed-in user’s newest notifications for the current organization directly, independent of that window. Those notifications are merged into the “For You” store, deduped by notificationId, and merged additively into the “All” tab.
  • The enableUserScopedNotifications prop accepts a boolean, a UserScopedNotificationsConfig object, or a JSON config string; the enable-user-scoped-notifications attribute accepts "true" / "false" or a JSON config string.
Default: false.
Using Props:
Using APIs:
UserScopedNotificationsConfig fields: See UserScopedNotificationsConfig for the full type definition. Behavior:
  • Setting the prop and calling the API method write to the same setting, so the last write wins. Drive it from one place only, and note that setting it on either VeltNotificationsTool or VeltNotificationsPanel is equivalent.
  • Calling enableUserScopedNotifications() before initialization or setDocument() is safe. The setting latches and takes effect on the first full fetch after the organization pipeline initializes.
  • The user-scoped fetch runs on full fetches only, and is suppressed under currentDocumentOnly. Narrowing the scope explicitly wins over this setting.
  • Switching organization or document clears the stores as before, and the next full fetch re-sends the setting, so user-scoped notifications never carry across organizations.
  • In the “For You” store, a notification that arrives through both the per-document path and the user-scoped path appears once. In the “All” tab, document notifications win on ID collision and user-scoped notifications outrank cross-organization ones; the result is sorted by timestamp descending.
  • Cross-organization “For You” behavior and the maxNotificationDays retention bound are unchanged.
  • The fetch requires matching backend support. Against an older backend it falls back to the windowed behavior instead of failing.
Passing { enabled: false } as the config to enableUserScopedNotifications() routes to disable and keeps the previously configured limit. Passing null or calling without arguments opts in with all defaults.
The first load after opting in at a busy organization surfaces previously invisible unread notifications in one batch. This is the intended correction. The unread count is capped at the configured limit.

disableUserScopedNotifications

Turn the user-scoped fetch back off. The “For You” tab and the unread count return to the recently-active-documents window with no other change.

enableSelfNotifications

  • By default notifications api and components exclude notifications where the current user is the action user.
  • This feature allows you to enable self notifications.
Default: false.
Using props:
Using API:

Data

getNotificationsData

  • Get the notifications data for the current user.
  • Velt returns a notification for a private comment only to users who can see that comment. Learn more →
  • The returned data includes notifications from up to the number of days specified by max days configuration.
  • “For You” tab: By default only the latest 50 notifications are fetched. This is done to reduce clutter and noise.
  • “Document” and “All” tabs: By default, up to 15 notifications are fetched for each of the 15 most recently active documents accessible to the current user. This highlights the most relevant and recent activity.
  • Params:
    • query: Optional. GetNotificationsDataQuery
      • type: Filter for notification type: all, for you, or documents.
        • forYou: returns notifications where the current user is involved.
        • all / documents: returns all notifications from the documents the user has access to.
  • Returns Notification[]
Using Hooks:
Using API:
To unsubscribe from the subscription:

getUnreadNotificationsCount

  • Retrieve the count of unread notifications, which includes a breakdown for different tabs.
  • The ‘Document’ tab is not included in the response because it contains all the notifications present in the ‘All’ tab.
Sample response:
Using Hooks:
Using API:

Event Subscription

on

  • Subscribe to Notification Events. Here is the list of events you can subscribe to and the event objects you will receive.

onNotificationClick

  • The onNotificationClick event fires when a notification is clicked in the Notifications Panel.
  • It returns a Notification object with details about the clicked notification.
  • Listen to this event via either the Notification Tool or the Notification Panel, but not both.
  • Use this event to implement custom actions in response to notification clicks, such as navigating to a specific part of the app.

Actions

markNotificationAsReadById

  • Mark a single notification as read using its notificationId.
  • The notification will be marked as read in all tabs.

openNotificationsPanel

  • Programmatically open or close the notification panel using the provided APIs.
  • This will not work if you have embedded the notification panel in your app.

setAllNotificationsAsRead

  • Mark all notifications as read, either globally or for a specific tab.
  • Using ‘all’ or ‘document’ as the tabId marks all notifications as read across all tabs (equivalent to calling setAllNotificationsAsRead() without arguments).
  • Using ‘for-you’ as the tabId only marks notifications in the ‘for-you’ tab as read.

Notification Settings

  1. This feature currently only updates the settings for the current user in the current Velt document. If you are using multiple documents or folders, the settings will apply to the root document.
  2. Make sure to first enable the settings feature in Velt Console.

enableSettings

  • Enable or disable the settings feature for notifications. This allows users to configure their notification preferences.
  • Params: none
  • Returns: void
Using Props:
Using APIs:

enableSettingsAtOrganizationLevel

Enable organization-level notification settings. When enabled, settings apply to all documents in the organization instead of per-document. Params: none Returns: void
Using Props:
Using APIs:

settingsLayout

Control how notification settings are displayed. Two layout modes are available. Default: accordion Type: NotificationSettingsLayout Options:
  • accordion: Settings displayed in expandable accordion
  • dropdown: Settings displayed in dropdown menu

setSettingsInitialConfig

  • Set the initial default configuration for notification settings. This defines the available settings options and their default values.
  • By default we have config added for inbox (in-app notifications) and email.
  • You can extend this to add more channels where you intend to send notifications to your users. eg: slack, jira, asana, linear etc.
  • If you do extend it to other custom channels, you will need to send the data to those channels yourself using our webhooks. Learn more
  • This config will automatically generate the settings UI for the user to configure their notification preferences.
  • Params: NotificationInitialSettingsConfig[]
    • Here is what the value types mean:
      • ALL: Subscribes the user to all notifications whether or not the user is involved in the notification on the current document.
      • MINE: Subscribes the user to notifications that are related to the current user on the current document.
      • NONE: Subscribes the user to no notifications on this channel on the current document.
  • Returns: void
Default:
Using Hook:
Using API:

muteAllNotifications

  • Mutes all notifications across all the channels for the current user in this current document.
  • In case of multiple documents or folders, this will mute all notifications for the user in the root document.
  • Params: none
  • Returns: void

setSettings

  • Update notification settings configuration for the current user.
  • Here you need to provide the id of the channel config and its value id.
  • Params: NotificationSettingsConfig
  • Here is what the value types mean:
    • ALL: Subscribes the user to all notifications whether or not the user is involved in the notification on the current document.
    • MINE: Subscribes the user to notifications that are related to the current user on the current document.
    • NONE: Subscribes the user to no notifications on this channel on the current document.
  • Returns: void
Using Hook:
Using API:

getSettings

Using Hook:
Using API:

Notification Delivery

Batching and Delay Configuration

Configure a delay-and-batch pipeline for notification delivery. When enabled, notifications pass through a delay hold, a seen check, and optional batching before being delivered.
This configuration is set at the API Key level in the Velt Console. It applies to all documents in the organization.
Delivery pipeline:
  1. Delay: Holds the notification for delaySeconds before proceeding.
  2. Seen check: If the recipient has already seen the triggering activity during the delay window, the notification is suppressed.
  3. Batch: Collects additional activities within the batch window before flushing as a single digest.
  4. Deliver: Sends the notification (or batched digest) to the recipient.
Webhooks and workflow triggers always fire immediately and are never subject to delay or batching.
Document-level and user-level batching operate independently. A notification can accumulate in both windows simultaneously; whichever window closes first (by time or maxActivities) triggers a flush for that scope.