Push notifications are essential for any app with chat and messaging because users receive messages from people they care about, about topics highly relevant to them, or from interactions they value. Users participate in conversations for good reasons and they don’t want to miss a message. The need for push notifications only increases if a user is responsible for reading and responding to a message as in, for example, work settings.
It is now a common standard to give users options to control when they receive push notifications. In fact, users expect it. As users try to balance the utility of notifications with setting boundaries around them, users now expect to set up “Do not disturb” statuses, snooze notifications, or control when they receive a push notification.
SendBird has three categories of options for push notifications:
SendBird allows your users to set preferences for push notifications using two dimensions:
SendBird calls these general options for push notifications, “Push Trigger Options.”
There are three user options available for setting push notification preferences. Note that the SendBird documentation refers to these as Push Trigger Options.
Please note that options for push notifications are only available in group channels. They are not available for open channels.
There is one additional group channel preference compared to the user preferences described in the last section: default. Note that the SendBird documentation refers to these as Push Trigger Options.
See our documentation for further reference:
In SendBird’s parlance, to ‘Snooze’ push notifications means the user does not receive any notifications for a specific period of time, which has a user-defined start and end. This period does not repeat.
Please note that Snooze is only a user option and not a group channel option. A user’s Snooze setting will override any other user or channel push preferences during the Snooze period.
You can enable the option to ‘Snooze’ in the client app or from Platform API. The start- and end-time are in Unix Milliseconds, or 13-digit numbers.
See additional references for setting a snooze on notifications:
In SendBird’s parlance, to set a ‘Do not disturb’ (DND) means that the user routinely does not receive any notifications at certain times of the day. These periods repeat every day.
Note that DND is a user option and not an option for group channels. A user’s DND setting will routinely override any user or channel preferences for push notifications during the set period of time.
You can enable DND in the client app or from Platform API. The start- and end-time are expressed as integers: start_hour and start_min, end_hour and end_min.
See our references for setting a ‘Do not disturb’ on notifications:
SendBird also gives you an option to set the push notification preference at the message level.
Both text and file messages have an optional Boolean property, send_push, that allows you to toggle on or off a push notification for a message. It defaults to being on, or True.
You can read more about the send_push optional message property in the Platform API documentation here.
Given many options for notifications, it’s important to understand how the options are applied and what results from the combination of user, group channel, and other options.
Basically, you enable push notification preferences at the message, user, and group channel level. DND and Snooze, if in effect, always supersede Trigger Options (at the user and group channel level).
The following flow chart gives you the permissions hierarchy in granular detail.
Thanks to the proliferation of messenger apps and chat collaboration software, user options for controlling push notifications are now a standard feature, more or less expected by users. SendBird’s SDKs and Platform API enable you to easily build these features for your users and deliver the excellent messaging experience they’ve come to expect.