How to create and manage geofences to use them with event rules
In this blog we will show you how to create and manage geofences. You can use geofences to generate alerts based on events.
- Create the geofences
- Define groups of geofences
- Add existent geofences into groups
- Create an Event Rule for geofence alerts
- Test your rule
1. Create the geofences
In your Vehicle Tracker application, go to the Geofence panel. If you don’t see the Geofence panel, go to Workspace and select the [default] view. You can learn more about workspaces here.
To add a new geofence, click in .
If you want to define a geofence that is not circular, you can select the option and define a New Polygon or even route geofences selecting New Route.
In this step, we can draw the geofence directly on the map to the left of the screen, and at the same time, define a Name and a Description (optional) for our new geofence.
Even though we could have created a Group for our new geofence on the same screen, for the purpose of this guide we won’t add it yet.
Click in Save to save your geofence.
You will now notice that your new geofence has been added to an uncategorized group.
Repeat this step as many times as geofences you need in your application.
2. Define groups of geofences
To define a group of geofences click in and define a group name.
Select the option Use in Geocoding if you want this geofence will show up in your reports or in the Status panel instead of street addresses.
Select the option Always Visible if you want this geofence group be visible at all times on the map of your application.
Click in Save to save your new group.
You will notice the new group below the geofences area.
3. Add existent geofences into groups
To add existent geofences into groups, you have different ways:
- When creating the geofence (as explained when creating the geofence)
- By editing the geofence
- Adding geofences into groups using Batch mode
We will continue with the example, using the second method first:
Right click in the geofence you want to add into a group, and select the option Edit Geofence
On the Edit Geofence menu, to add your geofence into a group type your group name in the Groups box. You’ll notice that entering just the first characters of your group name will suffice to display the results.
Click on the button if you need to define a new group.
After assigning the group to your geofence, click in Save.
Now the Group category (where you added your geofence into) will display that geofence with the color assigned to the group.
Optional: assign geofences into groups using the Batch option
If you need to assign multiple geofences into one specific group, you can do this in batch mode. This will allow you to save time and simplify the process.
To access to the batch mode, select the Batch operation option
Now you will see small boxes over all your existent geofences. Select all the geofences you want to add into the desired group
Now click in Add button to go to the next step.
The next step is to select the group where these geofences will be into.
4. Create an Event Rule for geofence alerts
To create email or sms alerts based on geofences, follow this guide.
5. Test your rule
The best way to test your rules before put them into production, is using SimOne. To use SimOne follow this guide.
Discuss this blog post on the forum please