The Analysis is always a powerful tool when it comes to TagoIO, and that does not change for Notifications. Here you will learn how to send a notification for your TagoRun users using Analysis, how to use buttons, and how to handle user decisions over your notification.
When sending a notification using Analysis, the immediate features available are buttons. You can have up to four different buttons in your notification. There are different behaviors you can set a button to do:
You also have a few customizable options:
We provide you with an Analysis template that will have a code for a demonstration. The following analysis does send a notification to all your users with given tags.
Follow these instructions to setup your analysis and send the notifications. You can make any change to the analysis after it is installed in your account, to properly fit your needs.
With this all up and running, you can open the script of your analysis and start to change it as needed. The code is fully commented on and detailed to guide you.
You can also create an Action to trigger the Analysis or set it to run every X minutes.
You will notice it in the Analysis code, this is a quick copy and paste for you to use.
{ "title": "title of your notification", "message": "message of your notification", "buttons": [{ "label": "label of the button", "id": "id_of_the_button", // no space allowed "color": "color of the button", "url": "url to redirect the user", "analysis": "analysis to run when clicked" }], "buttons_autodisable": true // auto disable the buttons when one is clicked. }