Geofencing: Difference between revisions
| Line 51: | Line 51: | ||
== Consuming geofence events == | == 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: | 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 <code>resco_mobileaudit</code> entity records. However, geofencing produces records with different <code>resco_operation</code> values: | ||
* GeoFenceEnter (value 473220012) | * GeoFenceEnter (value 473220012) | ||
* GeoFenceExit (value 473220013) | * GeoFenceExit (value 473220013) | ||
| Line 57: | Line 57: | ||
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: | 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_entityname with the logical name of the initiating table (entity) | * <code>resco_entityname</code> with the logical name of the initiating table (entity) | ||
* resco_entityid with the id of the initiating table row (record). | * <code>resco_entityid</code> with the id of the initiating table row (record). | ||
The <code>createdby</code> field of the audit record always contains the user registered in the Location-based services section of Woodford. Use <code>ownerid</code> field to identify user who was logged in on that mobile device. | |||
Revision as of 14:52, 30 April 2024
| Warning | Work in progress! We are in the process of updating the information on this page. Subject to change. |
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.
- 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
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.