This page explains what it means to enable sync in your record type. This page also provides guidance on when to enable sync on a record type, and how to monitor and keep your synced data up-to-date.
To enable data sync on a record type, see:
If you encounter an error while enabling sync, see Troubleshooting Syncs.
Data sync allows Appian Records to operate with the benefit of onsite data by caching your source data in Appian. With a cache of your data, this means Appian will only have to execute queries from the cached data instead of the external source whenever you view or interact with the record data.
Think of data sync like a cache on your web browser. When you cache local data on your browser, your site content loads faster and improves the speed of your browsing. The same logic applies to your synced data—record data will load faster, which can even increase the speed in which you design your applications.
To keep your synced data up-to-date with the source, an immediate sync occurs whenever Appian writes to the source of your data. You can also schedule daily syncs so your data is synced at least once a day. By leveraging immediate and daily syncs, you get the performance benefits of data sync while continuously working with fresh data.
There are some data structures that are better fit for data sync than others.
For example, say you are working with data that resides in a database that Appian can only connect to over VPN. This data is frequently queried, but because of the VPN, performance can lag and slow your application. By syncing that data, Appian no longer needs to query to the external source each time the data is viewed; instead, we can simply query to the cached data–removing the latency caused by VPN.
To keep the synced data up-to-date, you could schedule a daily sync for each night to sync changes made to the database by other systems. Any data changes made from Appian will be immediately synced with no additional configuration needed. Now, your application is not only more performant, it contains consistently fresh data.
Consider enabling sync for your record type if:
A record type object can sync up to 250,000 rows of data from your selected source. Data sources that exceed or are expected to exceed the row limit may not be a good fit for data sync if you need access to all rows. However, if you only need a portion of a data source that meets or exceeds the row limit, you can configure source filters to limit the number of rows synced in Appian.
Source filters allow you to determine which rows of data from the source are synced in Appian based on the conditions you specify. When a source filter is applied, only the data that meets the specified criteria will be available in the Appian system and visible to end users. You can add source filters when defining the source of the record type, or anytime after by navigating to the Data Model page.
If your source is within 10% of the limit (225,000 to 250,000 rows), the sync will successfully complete but a warning will appear under the Status column on the Record Sync Status page to let you know the source is approaching or has reached the row limit. After the data source exceeds 250,000 rows, the record type will become unavailable. If the record type reaches the row limit after an immediate sync, the write operation will be successful, but the sync will fail and the record type will become unavailable.
If you expect the source data to exceed the row limit, consider applying multiple source filters or disabling data sync. To disable data sync for your existing record type, simply change the data source from the record type's Data Model page.
If you disable data sync on an existing record type, you will need to review the objects in your application and update any record type field references associated with the record type. For steps, see Troubleshooting Sync.
There are two ways to keep your synced data up-to-date with the source:
You can also trigger manual syncs at any time. However, manual syncs should only be used in development environments.
To view detailed information about all syncs that occurred for a specific record type, see the Sync History.
An immediate sync will occur anytime Appian writes to the database table or Salesforce object that backs your record type. This means that whenever data is inserted, updated, or deleted from the source using a smart service or Salesforce integration, the data in the associated record type is also automatically synced to reflect the changes.
An immediate sync will only refresh the data that was changed by Appian. If more than 1,000 rows of data are changed by Appian, the smart service or integration will successfully write to the data source, but the immediate sync will fail. To prevent an immediate sync from failing, it's recommended to apply a limit to the associated smart service or integration so it does not update more than 1,000 rows at a time.
If Appian is the only system writing to your database table or to Salesforce, immediate sync allows you to be confident that you are always working with fresh data.
Other than a Salesforce object, Appian does not support immediate syncs for record types that use other web services as the data source.
In a process model, you can configure Data Service smart services to write updates to a database table that’s connected to a data store entity. Once the database table is updated, Appian will trigger a sync to update the data in any synced records that use the database table as the source.
Without any additional configuration, you can use the following smart services to update the source of your synced data and trigger an immediate sync:
To use Data Service smart services, you will need to create a custom data type (CDT). Regardless of how your table data is structured in the CDT, immediate sync will occur when any table data that backs the record type is updated. The CDT is only necessary to write to the source.
To configure immediate syncs for your synced record:
Appian will not sync updates to synced records when the source updates are made using other smart services, plugins, or external systems. For example, the following services and tools will not trigger an immediate sync:
Data sync is particularly helpful when using an external system, like Salesforce, as the source of your record type. To keep your synced data up-to-date with the source data in Salesforce, Appian triggers an immediate sync whenever you use a Salesforce integration to write to the Salesforce connected system.
If the Salesforce integration fails to write to the source, the immediate sync will not occur. Likewise, if Appian does not receive a notification that the write to the source was successful, the sync will not occur.
After you enable data sync, it's recommended that you create a scheduled sync so that your data outside of Appian will automatically sync with your record type once a day. For quicker syncs, record types using Salesforce or other web services should have syncs scheduled outside of peak traffic or working hours.
To schedule a sync:
You can edit your sync schedule here or on the Data Model page by opening the page's properties menu and selecting Change Sync Schedule.
Manual syncs allow you to sync your external data with the record type whenever you need it. However, manual syncs should only be used in development environments to test your application data.
To trigger a manual sync, use one of the following methods:
Whenever your record type is deployed to a new environment, a sync will automatically occur. If you deploy additional packages that don't include the record type, but impact the synced data, you'll need to trigger a manual sync.
To trigger a sync when the additional packages are deployed, add
recordType.<UUID of a Record Type>.forceSync=true to an import customization file. You can reference this property multiple times to trigger a sync on different record types.
To sync your source data in Appian, the source schema and the record type schema must match. The source schema includes the names, types, and uniqueness constraints of all the fields in your source. When you enable data sync for your record type and configure your record fields, Appian automatically creates a mapping between the source schema and the record type schema.
If a change is made to the source schema without making a corresponding change to the record type, the record type will fail to sync. For example, if you try to refresh your synced data using an immediate sync, the smart service will write to the data source, but the sync will not occur.
When a record type fails to sync, it becomes unavailable until you resolve the schema mismatch. In addition, any calls to
a!queryRecordType() for the synced record will fail.
For information on resolving a schema mismatch, see Troubleshooting Sync.
To ensure that your data is syncing successfully, you can check the history and status of all syncs associated with your record type.
In the Monitoring View of Appian Designer, the Record Sync Status tab displays the statuses of all record types with sync enabled that you have access to view. The grid displays all record types, source types, sync statuses, and the time of the last sync. The tab also has a refresh button and a conditionally visible START SYNC button.
From this page you are not only able to check the sync status, but you can also access any errors or warnings that may arise during the course of your syncs. Learn more about the Record Sync Status tab.
You can view detailed information about all syncs that occurred for a specific record type. From either the Monitoring View of Appian Designer, or from the Data Sync tab of your selected record type, you can view a record type’s Sync History.
The record type’s sync history will display information on the past and currently running syncs, including the times of the syncs and any errors that may have occurred.
Error messages will provide information on the cause of the error or possible solutions. For more information on problems with your sync and fixing sync errors, see Monitoring View and Troubleshooting Syncs.
When checking the time of your scheduled sync, you may notice that it didn't occur at the exact time at which you scheduled it. There are a variety of possible causes:
Multiple processes: If you have multiple record types scheduled to sync at the same time, not all of them can occur at exactly the scheduled time. For example, if multiple record types are set to sync at 3:00 AM, one of the scheduled syncs may not complete until 3:02 or 3:10 AM. If you have other processes that have significant resource use scheduled to occur at this time, this may also cause your syncs to complete later than expected.
Failed & re-trying: It is possible that something caused your sync to fail. In most cases, the system will try again twice before ultimately failing or successfully completing the sync. This means that a completed sync that had to retry multiple times could be a few minutes behind schedule.
Check your timezone: Make sure that you selected the right timezone when you set up your scheduled sync. If not, you can change this by editing the sync schedule settings in Data Sync.
Daylight savings time: If your timezone or region observes daylight savings and your sync is scheduled for one of the hours in which daylight savings time changes, your sync may not run when the time changes. To avoid this, choose a time after 2 AM.
On This Page