Document toolboxDocument toolbox

UserCommunication

The Microbizz message system allows messages to be sent to users, using either SMS, push messages or the Microbizz API. The preferred method may be selected per user, although MB may override this.

The message system resides in the class UserCommunication. The central method is send().

Any message is always saved as an API message, and may additionally be transmitted using either SMS or the Google / Apple push message services.

Push messages may include a small amount of additional data, which the app can use to do things like show a specific task.

Push messages

In order to be able to use the push message services, the app has to generate a 'token' which is then sent to Microbizz and stored with the user. When Microbizz wants to send a push message to an app, it sends the message + token to Google / Apple which then forwards the message to the correct mobile phone.

Push message additional data

The additional data is briefly describe in UserCommunication::push().

Notifications and UI

New messages for a user are listed in a user property called pendingmessages so that these can be displayed in the top right corner of the Microbizz web system, below the envelope icon.

The envelope icon gives access to the messages inbox and list of read and sent messages.

Problems

Known problems at the time of writing (2017-10-10):

* If you reconfigure an app (eg. from user A to user B), the token is not updated, and so push messages sent to user A will be received by user B. This will still happen even if the users are on two different contract numbers.