Triggers: Setting up a Geofence



To setup a geofence trigger, you will need to supply the latitude and longitude of the location as well as the radius in km around the location that will set the trigger perimeter. The conditional operator, enters, will trigger when a location data stream (streaming in valid latitude,longitude coordinates) transitions from outside the geofence to inside the geofence. The conditional operator, exits, will trigger on a transition from inside to outside the geofence.

1. From the desired data bucket settings (the "settings" link under the bucket name on the bucket shelf), select the Triggers tab.
2. Select the stream key that contains valid latitude,longitude values (e.g. 
36.154749,-86.7867043).
3. Select the conditional operator, either "enters" or "exits".
4. Enter the geofence radius in km.
5. Enter the geofence center in latitude,longitude coordinates (e.g. 
36.154749,-86.7867043). 
6. Click '+' to add the trigger.
7. Select the desired action (e.g. SMS, email).


When triggered, the message alert will contain a URL (e.g. 
init.st/nsnaxfp). This URL links a preview image of the map with the geofence center and triggered location marked.


*Tip: You can easily test out a Geofence trigger setup by sending in data through URL parameters (example of testing a geofence via URL parameters). 


Feedback and Knowledge Base