Jump to content

Sync Errors: Difference between revisions

From Resco's Wiki
m Jzambor moved page Merge Config to Sync Errors
No edit summary
Line 1: Line 1:
{{WIP}}
{{WIP}}
Merge config is an upcoming feature that allows you to configure the merge form used for resolving synchronization conflicts. For each field, you can set up how it should be handled when a conflict occurs.
When synchronizing their app, users can run into synchronization conflicts, for example, when the same record is modified on the client and on the server. If the [[Conflict resolution]] strategy is configured to "Manual Action" and [[Configuration|Remote Conflict Resolution]] is disabled, users have to resolve conflicts in the app.


To enable this advanced merge configuration, you have to set [[conflict resolution]] to '''Manual Action''' and upload a file with configuration details.
A new item appears as the first item of your [[Home screen]]: '''Sync Errors''' that lists the records with conflicts or upload errors.


# Edit an [[app projects|app project]] and select '''[[Configuration]]''' from the '''Project''' menu.
== Managing sync conflicts in the app ==
# Click '''Merge Config''' to display the editor.
# Enter the configuration.
# Save all changes.


== Sample configuration ==
In the example below, there is a conflict for the contact record called "Simmons, Victoria", including its details in the right pane. The picture shows no upload errors.


<syntaxhighlight lang="text">
[[File:Sync Errors.png|600px]]
#;account
address1_city;readonly;devicewins
address1_country;readonly;serverwins
address1_latitude;serverwins
address1_line1;serverwins
address1_line2;serverwins
address1_line3;serverwins
fax;hide;devicewins
</syntaxhighlight>


== Configuration details ==
Tap '''More''' if you want to show the detail of the affected entity record. The client version is displayed.


Each line in the file corresponds to an entity name or field name.
Tap '''Resolve''' and select how to resolve the conflict:
* Lines starting with <code>#;</code> define the entity.
* '''Clear Error & Retry''' – Delete the error log. The record will be synchronized again during the next synchronization. Typically used when the client fixed the validation problem.
* Lines beneath an entity are the fields.
* '''Clear Error & Ignore''' – Delete the error log. Client and server records will keep their values without any reconciliation.
* '''Help – About sync errors''' – Takes you to https://www.resco.net/sync-errors/
* '''Take Server Version''' – Download the server version of the record and overwrite the client record, then delete the error log.
* '''Email''' – Send one or all errors to your administrator for consideration.
* '''Merge''' – Merge conflicting records manually, specifying the fields to take from the device or CRM server version.
* '''Cancel''' – Resolve the conflict later.


# Start with defining the entity for that you want to set up per-field merge configuration. Use the format <code>#;entity_name</code>, for example, <code>#;contact</code>.
See also a [https://www.youtube.com/watch?v=qB6do_cw7s8&t=116s short demo of this feature]. {{Badge|Webinar}}
# Next, list some or all fields. One field per line, in the format <code>field_name;merge_behavior</code>, for example, <code>address1_city;devicewins</code>
# Repeat steps 1 and 2 for all entities where you need to finetune merge behavior on field level.


The following conflict resolution behavior is supported:
== Sync conflict merge form ==
* serverwins: server version is selected by default. For example: <code>address1_country;serverwins</code>
* devicewins: device version is selected by default. For example: <code>address1_city;devicewins</code>
* (field not listed in the file): user can select the preferred version manually


Additionally, two flags control the behavior of the merge form:
This special form serves to merge the client and server versions of a record. The form shows all fields in conflict (with different values) with both server and local values. Fields updated locally since the last sync are marked by an asterisk (*) next to the display name.
* hide: the field is not displayed on the merge form; the configured behavior applies automatically. For example: <code>fax;hide;devicewins</code>
* readonly: the field is displayed on the form, but users cannot modify it; the configured behavior applies automatically. For example: <code>phone;readonly;devicewins</code>
 
== Merge form in the app ==
 
When the app encounters a conflict that users have to resolve in the app, a new home item, '''[[Conflict_resolution#Resolving_conflicts_on_the_client|Sync Errors]]''', appears at the very top of the list.
 
Select a record and tap '''Resolve'''. (Depending on your device and settings, [[View#Buttons|view buttons]] appear when you select a record or swipe from the right.) The merge form is displayed:


[[File:Merge form.png|600px]]
[[File:Merge form.png|600px]]
The form shows all fields in conflict (with different values) with both server and local values. Fields updated locally since the last sync are marked by an asterisk (*) next to the display name.


The '''app preselects the recommended values''':
The '''app preselects the recommended values''':
Line 71: Line 49:
* All fields without a conflict.
* All fields without a conflict.
* All fields automatically resolved with the Merge Config flag "hide".
* All fields automatically resolved with the Merge Config flag "hide".
== Merge Config ==
Woodford administrators can configure the merge form used for resolving synchronization conflicts. For each field, you can set up how it should be handled when a conflict occurs. To enable this advanced merge configuration, you have to upload configuration details:
# Edit an [[app projects|app project]] and select '''[[Configuration]]''' from the '''Project''' menu.
# Click '''Merge Config''' to display the editor.
# Enter the configuration.
# Save all changes.
=== Sample configuration ===
<syntaxhighlight lang="text">
#;account
address1_city;readonly;devicewins
address1_country;readonly;serverwins
address1_latitude;serverwins
address1_line1;serverwins
address1_line2;serverwins
address1_line3;serverwins
fax;hide;devicewins
#;contact
address1_city;devicewins
</syntaxhighlight>
=== Configuration details ===
Each line in the file corresponds to an entity name or field name.
* Lines starting with <code>#;</code> define the entity.
* Lines beneath an entity are the fields.
# Start with defining the entity for that you want to set up per-field merge configuration. Use the format <code>#;entity_name</code>, for example, <code>#;contact</code>.
# Next, list some or all fields. One field per line, in the format <code>field_name;flag(s)</code>, for example, <code>address1_city;devicewins</code>
# Repeat steps 1 and 2 for all entities where you need to finetune merge behavior on field level.
The following conflict resolution flags are supported:
* '''serverwins''': server version is selected by default. For example: <code>address1_country;serverwins</code>
* '''devicewins''': device version is selected by default. For example: <code>address1_city;devicewins</code>
* (field not listed in the file): user can select the preferred version manually
Additionally, two flags control the behavior of the merge form. They have to be used in combination with a conflict resolution flag.
* '''hide''': the field is not displayed on the merge form; the configured behavior applies automatically. For example: <code>fax;hide;devicewins</code>
* '''readonly''': the field is displayed on the form, but users cannot modify it; the configured behavior applies automatically. For example: <code>phone;readonly;devicewins</code>




Line 76: Line 97:


   
   
[[Category:Synchronization]]
[[Category:Synchronization]] [[Category:Resco Mobile CRM]]

Revision as of 08:00, 17 June 2022

Warning Work in progress! We are in the process of updating the information on this page. Subject to change.

When synchronizing their app, users can run into synchronization conflicts, for example, when the same record is modified on the client and on the server. If the Conflict resolution strategy is configured to "Manual Action" and Remote Conflict Resolution is disabled, users have to resolve conflicts in the app.

A new item appears as the first item of your Home screen: Sync Errors that lists the records with conflicts or upload errors.

Managing sync conflicts in the app

In the example below, there is a conflict for the contact record called "Simmons, Victoria", including its details in the right pane. The picture shows no upload errors.

Tap More if you want to show the detail of the affected entity record. The client version is displayed.

Tap Resolve and select how to resolve the conflict:

  • Clear Error & Retry – Delete the error log. The record will be synchronized again during the next synchronization. Typically used when the client fixed the validation problem.
  • Clear Error & Ignore – Delete the error log. Client and server records will keep their values without any reconciliation.
  • Help – About sync errors – Takes you to https://www.resco.net/sync-errors/
  • Take Server Version – Download the server version of the record and overwrite the client record, then delete the error log.
  • Email – Send one or all errors to your administrator for consideration.
  • Merge – Merge conflicting records manually, specifying the fields to take from the device or CRM server version.
  • Cancel – Resolve the conflict later.

See also a short demo of this feature. Webinar

Sync conflict merge form

This special form serves to merge the client and server versions of a record. The form shows all fields in conflict (with different values) with both server and local values. Fields updated locally since the last sync are marked by an asterisk (*) next to the display name.

The app preselects the recommended values:

  • If a relevant Merge Config exists for this entity, preselect the configured value.
  • If a field was updated locally, preselect local value.
  • If none of the above applies, preselect server value.

You can override the default selection.

  • In each field line, tap the value that you prefer.
  • Alternatively, tap Server or Local in the top row to select all server or all local values.

Tap Save to save the record to the local database. The sync conflict is resolved locally, and the new version will be updated to the server on the next sync.

In addition to the selectable fields, the merge form may list:

  • Automatically resolved fields: Two groups of fields are resolved automatically:
    • Fields without update permission
    • Fields with Merge Config flag "readonly".
  • System fields: Select system fields such as "modified on", "owner", and "status reason" are always visible at the bottom of the sync conflict merge form. The reason is to provide additional information about the respective updates on both local and server version.

Some fields are hidden:

  • All fields without a conflict.
  • All fields automatically resolved with the Merge Config flag "hide".

Merge Config

Woodford administrators can configure the merge form used for resolving synchronization conflicts. For each field, you can set up how it should be handled when a conflict occurs. To enable this advanced merge configuration, you have to upload configuration details:

  1. Edit an app project and select Configuration from the Project menu.
  2. Click Merge Config to display the editor.
  3. Enter the configuration.
  4. Save all changes.

Sample configuration

#;account
address1_city;readonly;devicewins
address1_country;readonly;serverwins
address1_latitude;serverwins
address1_line1;serverwins
address1_line2;serverwins
address1_line3;serverwins
fax;hide;devicewins
#;contact
address1_city;devicewins

Configuration details

Each line in the file corresponds to an entity name or field name.

  • Lines starting with #; define the entity.
  • Lines beneath an entity are the fields.
  1. Start with defining the entity for that you want to set up per-field merge configuration. Use the format #;entity_name, for example, #;contact.
  2. Next, list some or all fields. One field per line, in the format field_name;flag(s), for example, address1_city;devicewins
  3. Repeat steps 1 and 2 for all entities where you need to finetune merge behavior on field level.

The following conflict resolution flags are supported:

  • serverwins: server version is selected by default. For example: address1_country;serverwins
  • devicewins: device version is selected by default. For example: address1_city;devicewins
  • (field not listed in the file): user can select the preferred version manually

Additionally, two flags control the behavior of the merge form. They have to be used in combination with a conflict resolution flag.

  • hide: the field is not displayed on the merge form; the configured behavior applies automatically. For example: fax;hide;devicewins
  • readonly: the field is displayed on the form, but users cannot modify it; the configured behavior applies automatically. For example: phone;readonly;devicewins