AltSync

Introduction to AltSync

AltSync is a FieldFX feature so syncable data can be controlled on a record by record basis.

AltSync relies on a check-box field that is set up at the object level. If the check-box 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. Regardless if the checkbox is true or false, the record has to be visible to the user in Back Office 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 to 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 be familar with these topics
before continuing

How it Works

The AltSync feature uses AltSync checkboxes to control syncable data.

To summarize how the AltSync checkbox can be set:

  1. 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.

  2. 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.

  3. 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 object

    If 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 ot 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:

  • Job

  • Ticket

  • Ticket Item

  • Ticket Log

  • Price Book

  • Quote

  • Quote Item

  • FX Forms

  • Any master-detail children of FX Forms

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
Example 2. Sync Quotes by Sales Rep
$User.Id = Sales_Rep__c

Result: This formula ensures that quotes only sync when you are selected in the Sales Rep lookup on the quote.

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:

Example 3. Sync Quote Items with Quotes
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:

Example 4. Sync Price Book Items with Price Books
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:

Example 5. Sync Tickets by Field Supervisor
AND($User.Id = Field_Supervisor__c, FX5__Job__r.AltSync__c)

Result: This formula ensures that tickets only sync when you are selected in the Field Supervisor lookup on the ticket and the job syncs.

  • The Field Supervisor lookup in this example is a custom lookup linked to the User object.

  • Since tickets feature job data, you should always ensure that tickets sync along with their associated jobs.

  • This setup is ideal if you have employees who only want to see tickets for which they are the designated field supervisor.

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:

Example 6. Sync Ticket Items with Tickets
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:

Example 7. Sync Only Your User Record
$User.Id = Id

Result: This formula ensures that only your user record syncs.

All user records sync by default on Sync 4.0.