Technical Guide

Sending Messages

Messages are sent via MQTT Topics. By defualt, there are 4 topic types supported:

  • Device

  • Store

  • Role

  • Group

To post messages / notifications to a Topic, BlueFletch Enterprise supports two methods:

  • BlueFletch Portal

  • Rest API

BlueFletch Portal

By using the BlueFletch Portal, an Admin can send messages to a specific topic. Simply log into the Portal and navigate to the 'Enterprise Launcher' tab, then 'Notifications'.

Enter the desired topic and json object of the message, then press send. See Notification Body for the format of the JSON Object.

Rest API

Posting a JSON object to the 'Notify' endpoint will send messages to the Topic.


Parameters : topic a string representing the Topic to post the message.

Header : x-bf-pb-apikey the organization's API Key

Body : the Json object representing the message to send. See Notification Body for the format of the JSON Object.

Example CURL

curl -X POST ""  -H "x-bf-pb-apikey: apikeyhere"  -H "accept: */*" -H "Content-Type: application/json" -d "{ \"notificationId\": 6001, \"contentTitle\": \"Customer Phone Call\", \"contentText\": \"Call Jenny\", \"expandedTitle\": \"\",  \"expandedText\": [],  \"packageName\": \"\",  \"intentAction\": \"android.intent.action.CALL\", \"intentExtras\": [{ \"key\": \"DATA\", \"value\": \"tel:\/\/8675309\" } ], \"autoCancel\": true, \"onGoing\": false, \"useSound\": true, \"useHeadsUp\": false}"

Notification Body



number indicates the Notification Id. Should be unique per notification. Can use the same Id to replace an existing message being displayed


string Title of the message to display


string Text of the Message body


string Expanded Text of the Message body


array Array of string to display in the expanded message


string Represents the package to invoke if the message display is press by the user


string Represents the ACTION to invoke if the message display is pressed by the user


array Array of Intent Objects to insert within the intent posted when if the message display is pressed by the user


boolean true/false, allow the user to dismiss the message


boolean true/false,


boolean true/false,


boolean true/false


string Optional parameter to specify a custom audio file on the device for notifications if useSound=true AND useHeadsUp=true, e.g. "/sdcard/Download/ems/MyRingTone", where a file named MyRingTone.mp3 exists in /sdcard/Download/ems folder. Note to not include the file extension in the field value.

Intent Object



string key of the Intent data


string value for the intent object

Example Notification Body

    "notificationId": 6001,
    "contentTitle": "Customer Phone Call",
    "contentText": "Call Jenny",
    "expandedTitle": "",
    "expandedText": [],
    "packageName": "",
    "intentAction": "android.intent.action.CALL",
    "intentExtras": [
            "key": "DATA",
            "value": "tel://8675309"
    "autoCancel": true,
    "onGoing": false,
    "useSound": true,
    "useHeadsUp": false

Configuring the Messaging Client

Configuring the Messaging Client is only required if you are configuring another MQTT broker in addition to the BlueFletch MQTT broker cluster.

The Messaging application can be configured to connect to one or more MQTT brokers. The application configuration is declared in the BlueFletch Launcher configuration and the Launcher sends it to the Messaging application.

Messaging by default is configured to connect to the BlueFletch MQTT broker cluster in BlueFletch's Google Cloud Instance. To add a new broker for the Messaging application to connect to, create a new configuration in Launcher as follows:

Add the notifications array at the root level of the launcher.json file:

    "notifications" : [
          "brokerId" : "myCustomBroker",
          "name" : "My Custom Broker",
          "url":  "ssl://<mqttBrokerHost:Port>",
          "urls": "",
          "randomizeUrls" : true,
          "enableOrganizationGroup" : true,
          "useEnhancedMessaging" : true,
          "muteNotificationsOnCall" : true,
          "notificationAcquireWakelocks" : true,
          "receiveOfflineMessages" : false,
          "mqttUserName" : "<mqttUserName>",
          "mqttPassword" :  "<mqttPassword>",
          "enableNotificationsAlwaysOn" : true,
          "enableHeadsUpNotifications" : true,
          "subscribeToIdentityGroups": false



string A free form string ID used by Messaging internally to differentiate brokers. Must not contain spaces.


string Friendly name for this broker connection. This will be displayed in the Messaging UI.


string The full URL (scheme, host and port) for the MQTT broker. Use this if connecting to one broker, or if you have a load balancer in front of your broker cluster. For secure MQTT, use the ssl:// scheme.


string A comma delimited list of URLs corresponding to each server in an MQTT broker cluster. This is typically used to define which server to connect to (first on the list) and the failover servers (Messaging App will try the next one on the list). Leave empty to disable.


boolean Set to true to randomly pick the server to connect to among the urls list, otherwise Messaging will use the servers in the order listed.


boolean If set to true, Messaging will create a parent topic corresponding to your BFE Organization ID. This means that to the final topic string will be /<orgId>/topicName. Default is set to true.


boolean If set to true, Messaging will create a broadcast intent internally in the device for other applications to receive the message payload directly.


boolean If set to true, Messaging will not make a notification sound if the device is currently on an audio call.


boolean If set to true, Messaging will wake up the device when a message arrives.


boolean (Deprecated) Must always be set to false.


string The user ID for the MQTT connection.


string The password for the MQTT connection.


boolean If set to true, will automatically subscribe with the device serial number and site even when no user session is present.


boolean (Deprecated) Must always be set to true.


boolean If set to true, Messaging will subscribe to a topic for each identity group the user belongs to. Note that this may generate a lot of topics in your MQTT broker.

Last updated