Apart from the below MS Doc steps, some additional things to do to implement geo-fencing for Asset entity.
https://docs.microsoft.com/en-us/dynamics365/field-service/geofencing
1. Geo-code Asset entity:
Before we start following the doc, geo-code the asset – update the assets with geo-coordinates (latitude/longitude) and then write a workflow to copy the asset’s geo-coordinates to Work Order on Work Order Creation.
This is because system copies the service account geo-coordinates to work order on its creation.
2. Create Entity Configuration for Asset:
Lets follow the steps in the doc.
When I reached step #7, i deleted the Entity Configuration for Account and create new one for Asset. Under the hood, it creates a lookup to Asset in Geofence entity.
3. Update the step ‘Create a geofence’ in OOB workflow GenerateGeofenceWhenBookingIsCreated
Geofencing Logical Entity Name = msdyn_customerasset
Geofencing entity ID = GUID of the asset record.
First, create a new lookup field to asset in booking entity and set its value on booking creation from the Work Order’s primary customer asset field.
Secondly, i used Dynamics 365 custom workflow tools, to get asset guid from record.
4. Geotracked Record Status is empty
Once its all done and i created a booking, a geofence record got created by the system – all good, but Geotracked Record Status is empty. Final Hurdle.
If you too face this issue, read below:
Reason : As per the documentation, Latitude / Longitude in Bookable Resource should have set based on the mobile audit values. In my case, it’s not.
Fix : I built a Power Automate (MS Flow) that fetches the latitude/longitude values from Mobile Audit on its record creation and update the bookable resource latitude/longitude values.
Now, i can see geofence events getting created:-)
One last thing – i noticed Geofence Alerts solution was not installed, due to which the workflows are not available to send mobile push notifications.
Not a problem, you can implement it by your own by following below:
https://docs.microsoft.com/en-us/dynamics365/field-service/mobile-push-notifications
Hope this helps someone
Cheers