In Part 1 of this series, we discussed the end-user experience of the offline-first Field Service Mobile application. In this second part we will go through some of the configuration and best practices for a successful offline rollout.
Mobile Offline Configuration & Best Practices
Leverage the out of the box mobile offline profile
The out of the box Field Service Mobile offline profile is a great starting point when enabling offline for your organization. It has common Field Service tables pre-configured along with some recommended filters to limit data. When modifying the mobile offline profile, it is recommended to not remove existing tables, but only add new/custom tables required by your organization. If you do want to remove tables from the OOTB profile, be sure there are no references or cross-linking in the views as relationships between tables can at times be difficult to identify at first glance.
Limit offline data synchronized to the device
One of the most important things to set your organization up for success with mobile offline is enabling the right data for your business scenarios. Given bandwidth and device constraints it is critical that data being synced from the server is limited as much as possible to have a fast and efficient experience.
We recommend you evaluate your offline data needs by considering the following:
- What are the core business scenarios for a given Work Order assigned to the frontline worker using the application?
- What is the minimum historical data which is required offline?
- What relationships exist between tables which will be required to drive lists/views/lookups and cross references?
- What elements on the application may not be needed offline and can be considered online only (excluded from the offline profile)?
Determining above may take several conversations with business stakeholders and frontline workers. It is recommended to document these details in text before diving in to configure your mobile offline profile.
Offline sync and application data
In addition to the data sync, the first sync will include app data which is used to drive the views and forms of the application. This app data is highly compressed when downloading over the network and unpacks after being downloaded to the device.
App data includes scripts, images, and other resources from the Microsoft Field Service solution and any additional customization from solution providers and admins.
While many of the out-of-the-box scripts should not be modified by the organization, for custom app data be sure to follow best practices:
- Minify scripts to reduce file size.
- Reduce image assets sizes.
- Only include assets which are strictly required for mobile app usage.
Test as a user in real world conditions
It is important to test changes to your offline profile directly on the mobile application while using an account that mirrors the role that real end-users will ultimately be using to access the device. This is important because different roles in the organization may have different data access levels and have dramatically different results during offline synchronization.
When testing you can evaluate the Offline Status Page in the application to see which tables are being synchronized and how many records per table are being downloaded.
In addition to testing with the correct user role, be sure to test or simulate real world conditions; for example, you will want test cases to mirror the following:
- Cellular (strong)
- Cellular (weak/low signal)
- No network
Testing in various network conditions will help you identify hidden issues where a table is missing from the profile or filter condition may be excluding a necessary record. In some cases, internal business logic may go to the server to get the missing record from the mobile offline profile; this provides a better user experience by avoiding errors for connected scenarios but can result in errors when the application is running without network.
This level of testing will give further validation that your offline configuration has met your business requirements and frontline workers will have success in any network condition.
Avoid extensive use of Web Resources with the offline application
Web resources have several offline limitations which can differ by mobile operating system. Due to these limitations and inconsistency between device operating systems, it is recommended to leverage PowerApps Composition Framework (PCF) controls
Details on web resource limitations can be found in Power Apps documentation.
Be aware of larger file types such as images, videos, and documents
Large files and images require some special handling to enable for offline and limit so to avoid consuming excessive amounts of bandwidth or disc space.
For details on best practices when configuring files and images, please refer to Configure mobile offline profiles for files and images – Power Apps | Microsoft Learn
Leverage client-side business logic
The offline-enabled Field Server Mobile application will sync data from the server at regular intervals. If part of a workflow depends on interaction with the server, the response may take minutes to return to the client when the network is available, and not at all if the user is truly offline. To avoid the delay and make the offline experience more consistent, it is recommended to move as much business logic to the client as possible.
This may involve moving some capabilities traditionally handled by a server-side plugin to the client so it can function properly in offline mode.
More information on Business Rules: Apply custom business logic with business rules and flows in model-driven apps – Power Apps | Microsoft Learn
Set sync intervals for your tables
Within the Mobile Offline Profile configuration each table can have its own sync interval. This interval determines how often that table is checked for updates.
You can change the sync interval for each table to reduce the frequency of syncing as users use the app. This may reduce network and battery usage.
It is recommended to set intervals to be less frequent on tables which are not updated often.
If you’d like to slow down all data downloads, update the sync interval for all tables in the offline profile to a higher interval.
With the release of Offline Sync Settings in Wave 2 2023, users can control their individual sync settings and set their client to only sync while on Wi-Fi. These settings can be leverages for scenarios where the Frontline Worker may for work extended periods of time without the need to sync, or have data capacity limits on their cellular plans.
Moving the mobile offline profile between environments
Commonly, configuration of the mobile offline profile is done in a sandbox environment and will need to be moved up to a test environment before ultimately being updated in production. To ensure consistently between environments it is recommended you move the offline profile as part of a managed solution.
This can be accomplished by creating a new solution and then binding the offline profile to that solution which can be exported. Simply re-import the solution to the new environment then publish and your changes will be updated with consistency between environments.
Read Part 3 of this blog series!
If there are new enhancement suggestions, it is recommended to submit those asks via the Field Service Mobile Ideas portal: Field Service Mobile – Ideas. This will allow the product team to evaluate new requests and plan for future product release waves.
And for more best practices, please refer to Platform Offline Best Practices for further offline guidance.