AltSync
Introduction to AltSync
AltSync is a FieldFX feature so syncable data can be controlled on a record by record basis. It is part of the FieldFX Sync Engine and can also be used with FX EAM (Enterprise Asset Management) and Work Orders in FieldFX.
AltSync relies on a checkbox field that is set up at the object level. If the checkbox is checked (true) on a record for a specific user, the record will sync to Mobile for that user. If the check-box on the record is unchecked (false), the record won’t be visible for the user in Mobile. The record has to be visible to the user in Back Office if the checkbox is true or false. It is based on his object-level and record-level Salesforce security settings. These settings include permissions, profiles and sharing settings.
If a user doesn’t have access to the record in Back Office, the record will not be visible to him in Mobile regardless if the AltSync check-box is checked or not. Record access could be because he does not have access to the object or to the particular record.
You can also create a checkbox at the Salesforce Object level. If the checkbox is selected (true), the record syncs to Mobile. The user must have read rights to the object. If the checkbox is left unselected (false), the record isn’t synced in Mobile. The user’s read rights to the object doesn’t affect the record’s sync status.
For more information, see Sync engine.
Prerequisites
To set up the and use AltSync feature, you need to:
Have these user licenses | Have these permissions | Complete these tasks and review these topics before continuing |
---|---|---|
|
In addition, you need:
|
|
How AltSync Works
The AltSync feature uses AltSync checkboxes to control syncable data.
To summarize how the AltSync checkbox can be set:
-
The checkbox can be manually set by the user. This is very rare and is done when there is a small amount of data for an object or done when testing.
-
The checkbox can be automatically updated resulting from a user action in the Back Office. Commonly the most used method, and AltSync is either a formula, dependent on another field, updated from a field update, or based on a different field value.
-
The checkbox is updated automatically by an overnight background process such as a custom trigger or based on an activity based Altsync.
You can get an unmanaged AltSync package that creates the AltSync fields and formulas for certain objects. See the Setup documentation for details on installing this package, the list of objects, and the formulas used for the fields by the package. |
-
Consider the following example:
Example 1. Setting the AltSync field on a User objectIf you add an AltSync checkbox to the User object that uses the following formula:
$User.Id=Id
This formula ensures that only the user’s user record is syncing. For Salesforce orgs with many user records (thousands), this works, because all the user records in Mobile shouldn’t be synced since there is no value. There is very little use for user records in Mobile, besides the user record of the user logging in.
Activity Based Sync using AltSync
Activity Based Syncing is a mechanism that allow the controlling how syncable look-up records that are based on how those records are used.
For example, the job object doesn’t need an AltSync flag since it’s controlled by the status. If the status is set to sync, the records will sync and vice versa. The job object has these look-ups: account (both for office and customer), price book, etc. Accounts and Price books can all be synced, which works for small org. But if there are hundreds to price-books and millions of price-book items this doesn’t work.
With Activity-based Sync, all look-up objects existing on transactional objects are evaluated and syncs only the ones that have been used in the past pre-determined number of days. The customer sets the number of days.
When AltSync fields are present on transactional objects used for day to day transactions, a trigger sets the AltSync flag to True
on related lookup records. when there is activity for the record from any transactional data, the AltSync flags change to True
.
Transactional data includes records on any of the following objects:
|
Sync Lookup Settings records in Custom Metadata Type specify how many days to detect activity for a lookup record. This setting also determines how many days the lookup record’s AltSync flag should remain True
after the last detected activity for the record. You can customize how long the activity should be detected and the AltSync flag stays True
for the lookup records. You can add additional objects to automatically manage AltSync flags when referenced by a lookup in Sync Lookup Settings.
Overnight Process
Each night, a job runs to examine records with the AltSync flags.
-
If any transactional data has changed in the last 30 days, related lookup AltSync flags are set to
True
. -
If activity for a lookup record has been detected within the object’s specified timespan, the AltSync flag for the lookup record remains
True
. -
AltSync flags on other records are set to
False
.
AltSync helps manage the amount of data mobile users must download during a sync. |
Examples
Use the following formula examples to sync quotes, price book items, tickets, ticket items, or only your user record.
Sync Quotes by Sales Rep
Use this formula for a AltSync checkbox on the Quote object:
The Sales Rep lookup in this example is a custom lookup linked to the User object. |
This setup is ideal if you have sales reps who only want to see their quotes |
Sync Quote Items with Quotes
If there is an AltSync field on the Quote objectUse this formula for a AltSync checkbox on the Quote Item object:
FX5__Quote__r.AltSync__c
Result: This formula ensures that quote items only sync when the quote syncs.
Sync Price Book Items with Price Books
Use this formula for a AltSync checkbox on the Price Book Item object:
AND(FX5__Price_Book__r.AltSync__c, NOT(FX5__IsArchived__c))
Result: This formula ensures that price book items only sync when they don’t have Archived selected and the price book syncs.
Sync Tickets by Field Supervisor
Use this formula for a AltSync checkbox on the Ticket object:
|
Sync Ticket Items with Tickets
The Ticket Item is a child of ticket, so it syncs automatically if the parent syncs. Use this formula for a AltSync checkbox on the Ticket Item object:
FX5__Ticket__r.AltSync__c
Result: This formula ensures that ticket items only sync when the ticket syncs.
Sync Only Your User Record
Use this formula for a AltSync checkbox on the User object, your own or another:
$User.Id = Id
Result: This formula ensures that only your user record syncs.
All user records sync by default on Sync 4.0. |