Geofencing: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
{{Location TOC | {{Location TOC}} {{Wikipedia|Geofence}} | ||
Geofencing is a [[Location-based services|location-based service]] in which a software application uses GPS to trigger a pre-programmed action when a mobile enters or exits a virtual boundary set up around a geographical location, known as a geofence. | Geofencing is a [[Location-based services|location-based service]] in which a software application uses GPS to trigger a pre-programmed action when a mobile enters or exits a virtual boundary set up around a geographical location, known as a geofence. | ||
The geofencing feature of [[Resco mobile apps]] (Android, iOS) introduced in [[Releases/Spring 2024|release 17.1]] allows you to get immediate updates when your front-line workers enter or leave one of your predefined locations (such as office, service location, etc.). This works reliably on a wide range of devices with minimal battery impact and improved user privacy (only presence at pre-set locations is monitored, not the overall location). | |||
# Configure the tables you want to geofence in Woodford. | # Configure the tables you want to geofence in Woodford. | ||
Revision as of 11:46, 2 July 2024
Geofencing is a location-based service in which a software application uses GPS to trigger a pre-programmed action when a mobile enters or exits a virtual boundary set up around a geographical location, known as a geofence.
The geofencing feature of Resco mobile apps (Android, iOS) introduced in release 17.1 allows you to get immediate updates when your front-line workers enter or leave one of your predefined locations (such as office, service location, etc.). This works reliably on a wide range of devices with minimal battery impact and improved user privacy (only presence at pre-set locations is monitored, not the overall location).
- Configure the tables you want to geofence in Woodford.
- When mobile users enter the specified location, a mobile audit event is generated. This works even if the app is in the background, the screen is off, etc.
- Capture mobile audit event on your backend to trigger additional logic (e.g., using Power Automate to update work order status).
Prerequisites
- Woodford (release 17.1 or later)
- Resco Mobile CRM app (release 17.1 or later): Android or iOS version
- Microsoft Power Platform, Dynamics, Salesforce, or Resco Cloud
Woodford configuration
- Start Woodford and select Location-based services from the Administration menu.
- Register one dedicated user for your organization. It is required for our real-time flushing service which forwards resco_mobileaudit records to your CRM under this user.
- Edit an app project and select Maps & Routes > Geofencing from the Project menu.
- Enable geofencing and set it up as needed (see below)
- Save all changes and publish the app project.
For testing, we recommend the following configuration:
- Set Log verbosity to "Diagnostic".
- Allow all business days and hours (00:00 – 23:59).
- Don't use a geofence radius smaller than 100 meters.
- Make sure to choose the right latitude/longitude fields.
- Use a defensive filter (not to exclude some records). Remember that this filter is combined with a sync filter (even in online mode). The Android operating system limits the number of geofenced records to 100.
Usage in the app
After syncing Resco Mobile CRM app with an app project that has an active geofencing configuration, the app will require several additional permissions
- Notifications
- Location > Allow all the time
- Background location
- Battery > Unrestricted
If you enable notifications in geofencing configuration in Woodford and grant the appropriate permissions, users will receive notifications, for example when they enter a geofence. Clicking the notification opens the record that initiated the geofence. Before displaying the form, app checks whether the record is changed on server.
The Send Log action in About dialog includes new "realtime.log". If diagnostic log is enabled, it contains details about all geofencing events including each Enter/Exit event with anonymous ID of record which is related to the geofence.
Known issues
- Some Android vendors have their own layer of security blocking the background startup/autostart. User must explicitly allow it for Resco Mobile CRM app. This applies to Xiaomi, Vivo, Oppo, Huawei, and maybe also others.
- On Android devices, results are much more reliable if device has an active mobile connection.
- On iOS devices, results are much more reliable if device has Wi-Fi enabled (active connection is not necessary).
Consuming geofence events
The mobile audit data generated from the app can be further processed on the server, for example, using Power Automate/Power Platform workflows. There's a small difference between location tracking and geofencing that must be adjusted in server-side processing. Both services produce the same resco_mobileaudit entity records. However, geofencing produces records with different resco_operation values:
- GeoFenceEnter (value 473220012)
- GeoFenceExit (value 473220013)
- instead of original GpsChanged (473220011)
In addition to that, geofencing audit records contain references to originating bookable resource booking/appointment table row (or other tables) that are associated with the triggered geofencing event. A mobile audit record has these reference fields:
resco_entitynamewith the logical name of the initiating table (entity)resco_entityidwith the id of the initiating table row (record).
The createdby field of the audit record always contains the user registered in the Location-based services section of Woodford. Use ownerid field to identify user who was logged in on that mobile device.