Sending a Push Notification (bizzStream.sendPushNotification)
You can use bizzStream.sendPushNotification
to send push notifications to users with the BizzStream
application installed on their mobile device.
Push notifications appear as pop-up messages on users' phones, showing the first 178 characters. Android devices may display up to 240 characters. We advise keeping messages short and concise to quickly capture users' attention and clearly convey the purpose of the notification.
bizzStream.sendPushNotification(userIds, message)
Parameter | Type | Required | Description |
---|---|---|---|
userIds | Array | Yes | A list of user ids |
message | String | Yes | The message of the push notification consisting out of maximal 260 characters |
Return value
None.
Example
The following example shows how to send a push notification in a script:
bizzStream.sendPushNotification(
['a6gA9rYaGTFKPrT5P', '9AGoJxZwyfeRHShXq'],
`Hi ${serverDocument.name}, please register your timesheets.`,
);
This script will send a push notification with the text "Hi Peter, please register your timesheets.". The push notification will be sent to the users with IDs a6gA9rYaGTFKPrT5P and 9AGoJxZwyfeRHShXq.