1 Rules

TO DO

This section is incomplete and will be concluded as soon as possible.

Definition of synchronization rules used by wic_user_mobile_properties to set a specific user's sync rule.

Contains all the synchronization tables between the server and the device, as well as the settings and parameters of each table.



wic_sync_rules
Label Description
Rule Rule
Name Name

2 Tables

TO DO

This section is incomplete and will be concluded as soon as possible.

Ordered list of tables, with device parameters used to synchronize data between the server and the device.



wic_sync_tables
Label Description
Synchronization rule code Synchronization rule code
Order

Order in which different tables are synchronized.

When loading tables, users must keep in mind the integrity of the relationships between them.

Let's take the apps_pos_ticketh, apps_pos_ticketl, and apps_pos_ticketc tables as an example. We must first synchronize the ticketh data, then the lines (ticketl) and, finally, the possible receipts (ticketc).

Table

Name of the table in the database where the query will be made.

Group

Informative column used to group and classify certain tables.

Mode Mode: [D]ownload, [U]pload, [N]eutral

  • Default: D
  • Values:
    • D: Download.
    • U: Upload.
    • N: Neutral.
    • M: Up & Down.
Primary key

Required in Download, Neutral and Merge Mode tables.

The primary key determines the unique index of the table. It is also essential for managing registrations, modifications and downloads in Download Mode.

Query limit

If this value is reported, the device will limit list views to show only the number of records indicated.

Example: the device synchronizes all customers' data, but only 10 rows are displayed in order to protect customer data.

Date of modification

Used in Download and Merge Mode tables.

Determines if the server-side record has been modified. Using the date of the latest synchronization of the table, device records are updated.

The CURRENT value will force the download of all data for each synchronization.

If this column is not reported, it means that data will only be downloaded when there are no existing records in the terminal database. Required for tables like apps_series where the number of documents must be restarted, in case of terminal crash and restart.

Date of synchronization

Used in Download and Merge Mode tables.

Updates the field indicated in the table.

This field must be in datetime format. It is used to register, on the server side, records which have been synchronized to the device. A check is performed to verify that these records are now on the device.

Date of deletion

Used in Merge Mode tables.

Updates the field indicated in the table.

This field must be in datetime format. It is used to register, on the server side, records which have been synchronized from the device to the server and subsequently deleted from the device.

Sort

Column or columns to sort upon synchronization.

Crontab code

With this column, we can set an automatic synchronization time.

The program will recursively check tables which contain a foreign key to this table, forming a synchronization group.

Example: If we add a synchronization cron to the table apps_sfa_task_assign, the program will also synchronize tasks, responses, etc.

Download condition

The 'where' clause of the SQL statement.

Used in Download and Merge Mode to determine which records to synchronize to the device.

Upload condition

The 'where' clause of the SQL statement.

In Upload Mode, it determines which records in the table must be uploaded to the server side.

Delete condition

The 'where' clause of the delete SQL statement. In Download and Merge Mode, it determines which server-side records meet the delete condition, and using the primary key, device records are removed.

In Upload mode, device database records which meet the condition are deleted.

Full resync date

Datetime field where the total resynchronization of a table can be scheduled.

If the last synchronization date for a table is before the date entered in this field, the device will delete the table and re-synchronize the information.

3 Client status

TO DO

This section is incomplete and will be concluded as soon as possible.

Each time the device performs synchronizations with the server, synchronization records are kept for each table.

In this way, we can get additional information about a device and the synchronizations performed.



wic_user_sync_client_status
Label Description
Device UUID Device UUID
User WebStudio user
Table

Table or view to which the query was made.

Columns Number of table columns
Rows

Number of records at device

Synchronization date Date of most recent synchronization

4 Client logs

TO DO

This section is incomplete and will be concluded as soon as possible.

Each time the device performs synchronizations with the server, synchronization records are kept for each table.

In this way, we can obtain information about synchronizations based on time, size, and status.