Available in: Axsy Mobile for Salesforce, Axsy Field Service, Axsy Public Sector, Axsy Retail Execution
In some cases, multiple Salesforce users may be working with the same Salesforce records in parallel, causing potential conflicts. When multiple users make updates to the same field, it's the most recent change uploaded to the Salesforce Platform that takes precedence.
NOTE: With the above rule in mind, it's important to note that when a user is offline, the time at which a change is actually uploaded to the Salesforce Platform may come later than the time the user makes the change in the app. The time the user is online again and pending changes are synced is what is viewed by the Salesforce Platform as the time of the change. The examples below illustrate how sync conflicts are handled.
A web and online mobile user edit the same record
As the mobile user is online, the changes are synced to the Salesforce Platform straightaway and there is no sync conflict. Therefore, the most recent change made to the record – whether on the web or a mobile device – will be implemented.
Example: A web user updates the Priority field of a Work Order to "Medium" at 14:09, and the mobile user updates the Priority field to "High" at 14:30. The Priority of the Work Order will be set to "High" on the Salesforce Platform.
A web and offline mobile user edit the same record
The time that the mobile user returns online again is considered the time of the field update, not the actual time the update was made while they were offline. If the time at which the mobile user returns online is after the time at which the web user edited the field, then the mobile user's changes are recorded on the Salesforce Platform as the most recent.
Example: A mobile user updates the Priority field of a Work Order to "Medium" at 14:09 while offline. A web user updates the Priority of the Work Order to "High" at 14:12. The mobile user then goes online at 15:00. The Work Order's Priority will be set to "Medium" on the Salesforce Platform.
An offline mobile user edits a record that a web user has deleted
If a record is deleted while the mobile user is offline and editing that record, when the user goes online again there will be an error in the Pending Changes Queue indicating a sync failure.
Example: An offline mobile user is updating a Note they had previously created while online. A web user then goes on to delete the Note while the user is still offline.
To clear the message from the Pending Changes Queue, mobile users should navigate to Settings > Synchronise > Pending Changes, swipe left on the error and select Undo.
Figure 1 - Swiping left on an error in the Pending Changes Queue will allow you to Undo the change that caused the error
How Sync Conflicts Appear in the Axsy Events Console
Sync errors will be included as Events in the Axsy Events Console.
IMPORTANT: As per this article, a sync conflict from two users editing the same record won't actually generate a sync error. A sync error is only generated in the scenario where an offline mobile user edits a record that has been deleted.
Figure 2 - Sync errors will show up as Events in the Axsy Events Console
Figure 3 - Selecting an error from the Event list will show general details on the Event
Figure 4 - Select the "Upload Errors" tab will display the status code and message associated to the sync error