Data Synchronization
Configuration automatic synchronization of data with an external system (AFE data, partners, users, etc.).
Overview
Synchronization is how Execute pulls data from an external source (a database) and loads it into Execute’s database. This includes data such as users, accounts, primary attribute values, custom field values, partners and even AFEs. Most document types known to Execute can be updated using synchronization.
Synchronization can write new data into Execute or, given enough information, update existing documents with new information. A synchronization task can be scheduled to run regularly, or triggered by an administrator with sufficient privileges.
Concept
If the synchronization task comes across a document that is unknown to Execute, it will be copied. If the external source contains updates to a document already in Execute, the document is updated with new data from the external source. Documents being synchronized are identified by its key columns. Each data row represents a document to be synchronized.
As of Execute 2017, Primary AFE Attributes no longer have their own synchronizer. The same general purpose synchronizer now handles primary attributes as well. Users of earlier versions of Execute should contact support to convert any existing attribute synchronization task to one that works in version 2018.
Column Types
There are two type of data fields that define synchronization:
- Data Column – simply a field which contains data that should be brought over to Execute.
- Key Column – the field that uniquely identifies a document of the given type. This field must uniquely identify the document even after it has been synchronized into Execute.
As an example, if synchronizing partners, a Data Columns would likely include the partner’s name, address, phone number, city, etc. However, it is identified by its vendor code, which is usually the key column for a partner synchronization.
These columns are defined in the configuration file for each synchronization task.
Configuration
To enable synchronization, copy the relevant file from the “plugins_available\synchronization” folder into the Execute service’s “plugins” folder. Rename the file to remove the “.sample” extension.
As with all configuration files, changes take effect the next time the service starts up.
Options to Configure for Every Synchronization
- The document type
- The table or view which contains the data to be synchronized
- The list of Data Columns (see Column Types)
- The set of Key Columns (see Column Types)
- The synchronization task’s name
Other options exist to delete rows from the source table which have been successfully synchronized into Execute, and an option to apply data only from rows that uniquely match the data that already exists in Execute. Please contact support for help setting this up.
Manual Synchronization
All synchronizations can be manually triggered through Tools > Synchronization. The associated user privilege is simple named “Synchronization”. The task starts immediately and its progress is tracked.
Click image to expand or minimize.
Synchronization Results
Synchronization tasks create a log file. These can be found in the configured “Logs” subdirectory of the Execute network components folder. This applies to both scheduled and manually triggered tasks.
Scheduling
Synchronization can be set to run automatically run at specified times. We encourage clients to schedule large synchronization tasks to run overnight, when there will be few users in Execute. If the service was not running at the time a task was scheduled to run, the service will not go back to run missed tasks. If a task is still running by the time its next scheduled run is due, the second synchronization will be skipped.
Syntax
This syntax is commonly found in configuration files that define a task that needs to run scheduled tasks.
Specifications
- Whitespace can be added between any element
- Schedules are one or more patterns separated by semicolons
- Patterns are name-value pairs separated by colons
- Acceptable pattern names (case-sensitive):
- month (1 - 12)
- date (1 - 31)
- dayOfWeek (0 - 6, representing Sunday - Saturday)
- hour (0 - 23)
- minute (0 - 59)
- all names are required per pattern
- values can be a comma-separated list of numbers, or an asterisk, meaning the entire range
Examples
Meaning | Code |
---|---|
Daily at noon | month=*:date=*:dayOfWeek=*:hour=12:minute=0 |
Daily at noon (without asterisk shorthand) | month=1,2,3,4,5,6,7,8,9,10,11,12: date=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31: dayOfWeek=01,2,3,4,5,6: hour=12: minute:0 |
Every 15 minutes | month=*:date=*:dayOfWeek=*:hour=*:minute=0,15,30,45 |
Every Tuesday at 9:00 AM and 1 PM | month=*:date=*:dayOfWeek=2:hour=9,13:minute=0 |
The first and 15th of each month at 0317 | month=*:date=1,15:dayOfWeek=*:hour=3:minute=17 |
The start of each quarter at 1300 | month=1,4,7,10:date=1:dayOfWeek=*:hour=13:minute=00 |
Some schedules user more than one pattern:
Meaning | Code |
---|---|
Every Tuesday at 9:00 AM and 1:30 PM | month=*:date=*:dayOfWeek=2:hour=9:minute=0; month=*:date=*:dayOfWeek=2:hour=13:minute=30 |
Weekdays at 6:30 PM and weekends at noon | month=*:date=*:dayOfWeek=1,2,3,4,5:hour=18:minute=30; month=*:date=*:dayOfWeek=0,6:hour=12:minute=0 |