Auto Sync
Introduction
Auto Sync is a streamlined update to the Sync V4 process. It is part of the FieldFX Sync Engine and can also be used with FX EAM (Enterprise Asset Management) and Work Orders in FieldFX.
Field user’s devices already automatically download data from the back office at intervals that vary by object. Auto Sync allows for a full two-way sync by automating the uploading of data to the back office, too.
Rather than relying on users to manually sync during the day or at the end of their work shift, Auto Sync uses an available Internet connection to automatically perform a sync from FieldFX Mobile every few minutes.
Admins can troubleshoot any sync packet issues with the Admin Portal’s tool for Auto Sync, the Sync Event Viewer.
In the event there is a Sync Upload Error, admins can use the Packet Viewer in the Audit Log.
After finishing the AutoSync setup, log out of FieldFX completely and log back in. |
Prerequisites
To use Sync 4.0, you need to:
Have these user licenses | Have these permissions | Complete these tasks and review these topics before continuing |
---|---|---|
|
Benefits
-
Back Office users can receive updates on the progress of field jobs as they happen, as long as the field user has an available Internet connection.
-
Lower the risk of data transfer delay or loss when a field user does not sync their device as expected.
-
Large upload sizes are reduced, limiting the instances of long syncs as long as the mobile users have network access.
-
Auto Sync is multi-threaded, rather than relying on one queue for all sync requests.
-
One failed event does not hold up subsequent events.
How Auto Sync Works
Data Uploading
Data Upload Auto Sync must be activated. |
-
When a FieldFX Mobile user makes a change, the field device automatically initiates the sync process as soon as the change is complete.
FieldFX Mobile waits three seconds after a user completes one change in case they also make another change.
If a field user does not have an available Internet connection, the changes are stored until a connection becomes available. Queued changes automatically upload when a connection is reestablished.
-
Events in the sync load to the
FX5__Sync_Events__c
object from the mobile device. -
Apex code runs to process the events, marking successfully synced events for deletion.
The code processes the events according to the size of each event:
-
For events under the batch size, events process synchronously
-
For events over the batch size, events process asynchronously using the batching API from Salesforce
-
-
A nightly process removes events marked for deletion.
The
FX5__SyncEventKeptHistoryInDays__c
custom setting controls how long to keep events marked for deletion. The default is 40 days. -
Review failed events in the Sync Events Viewer in the Admin Portal (admin.fieldfx.com).
Data Downloading
-
Data downloads from FieldFX Back Office to a user’s device automatically at intervals that vary by object type.
The download depends on the availability of an Internet connection.
-
During a download sync:
-
The mobile device pulls down custom settings.
-
The device checks to see if the metadata information has expired.
Metadata includes information such as descriptions, layouts, compact layouts, search layouts, field sets, and so on. Expiration defaults to 24 hours (1440 minutes), and can be changed with the
FX5__SyncMetadataCacheDurationMinutes__c
FX Setting custom settings. -
If metadata is expired, the mobile device downloads configuration data.
-
The device then downloads data for each object from back office to the mobile device based on the object’s sync interval.
-
If there is a sync date for an object, an incremental sync is used for the object data.
-
If there is not a sync date for an object, a full sync is used for the object data.
-
-
Syncs file attachment bodies (headers come with the data).
-
Syncs attachments (from Chatter or Files API based on org configuration).
-
Default Download Sync Intervals
The following default values are used for downloading object data: |
|
To customize the interval for an object, add a custom setting, copying the API Name for the object exactly as above.Enter the desired value in minutes.
To ignore an object for syncing purposes, add it to the FX5__Sync_ExcludedTypes__c
custom setting in FX Settings.
Considerations
The org must enable attachments through the Files API, as Auto Sync relies on the Files API for the automatic syncing of data.
Auto Sync does not use or support either Chatter or Notes & Attachments lists. All reports and files that sync do so through the Files API. |
Field users must have an active and available Internet connection for data to sync. Offline data automatically syncs when an Internet connection becomes available.
Troubleshooting Failed Events
Failed events (and only failed events) can be reviewed in the Sync Event Viewer in the Admin Portal.
The Sync Event Viewer lists the event failures grouped by user.
Common reasons an event can fail include (but are not limited to):
-
Permissions
-
Validation Rules
-
Exceeded API limits
-
Missing or deleted data.
When an event fails, it can cause all the subsequent related events to fail as well.
For instance, a create event
for a Job or a Ticket fails for some reason.
Any event that is dependent on the existence of that record also fails.
If a Ticket fails to create, all of the ticket’s Items, Logs, Checklist Steps, Reports, and so on, also fail to create.
Events can fail if an associated record, like the Ticket for Ticket Item, was deleted by someone in back office.
-
If the record is still in the Salesforce Recycle Bin, the Sync Event Viewer displays a message stating that the object’s parent was deleted and attempts to provide a link directly to the item in the Recycle Bin so that the admin can restore or undelete the record.
-
Once the parent record has been restored, the event should be able to successfully reprocess.
Unneeded events can be ignored, then deleted, allowing for other events for a user to be preprocessed.
For more details on how to troubleshoot failed events, see the articles on the Sync Event Viewer Admin Portal tool.
Learn about resolving Sync Upload Errors using the Packet Viewer in the Audit Log.
Common Event Errors
Too Many DML Statements |
This error indicates that too many triggers and process flows are writing data while Sync Events process.
|
||
Too Many SOQL Queries |
This error indicates that too many triggers and process flows are querying data while Sync Events process.
|
Recommended Reading
-
Learn the basics about Sync 4.0.
-
Sync Rules for Records - Learn the rules that control when records sync between FieldFX Back Office and FieldFX Mobile.
-
Learn the rules that control when attachments sync between FieldFX Back Office and FieldFX Mobile.
The Attachments feature in FieldFX has been deprecated and replaced with the Files API. To upload files to tickets or jobs, make sure the FXL File Viewer Lightning Components is added to the ticket or job record page.
Follow the steps in Set Up Attachments Using the Files API.
-
Learn how the AltSync feature works.
-
Learn how the Auto Sync feature works. Learn how to set up the Auto Sync feature.
-
Learn how to use the Sync Event Viewer Admin Portal tool to view Auto Sync events.
-
Learn how to use the Packet Viewer in the Audit Log to resolve Sync Upload Errors.