Skip to content

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.

bizzStream.sendPushNotification(userIds, content)
Parameter Type Required Description
userIds Array Yes A list of user id's
content String Yes The content of the push notification consisting out of maximal 256 characters where placeholders may be used.

Example

The following method calls the Google Maps Distant Matrix API to calculate the distance between the Dam in Amsterdam and the Coolsingel in Rotterdam:

bizzStream.sendPushNotification(
    ['a6gA9rYaGTFKPrT5P', '9AGoJxZwyfeRHShXq'],
    "Hi " + serverDocument.name + ", please register your timesheets."
);

If the document on the server has a field name with the value Peter, a notification will be send to the users with IDs a6gA9rYaGTFKPrT5P and 9AGoJxZwyfeRHShXq. This notification has the text "Hi Peter, please register your timesheets.