AltSync

Prerequisites

Basics

The AltSync feature complements sharing settings and controls syncable data on a record-by-record basis.

How it Works

  • The AltSync feature uses AltSync checkboxes to control syncable data.

  • The checkbox can be activated manually, by activity during the course of the day, or by an overnight process.

  • AltSync checkboxes feature a formula:

    • Records sync when the formula evaluates to TRUE.

    • Records don’t sync when the formula evaluates to FALSE.

      LiquidFrameworks can provide 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:

    If you add an AltSync checkbox to the Ticket object that uses the following formula

    FX5__Sync__c

    Tickets only sync when they have the Sync checkbox selected.

Activity Based AltSync

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

  • Activity based AltSync flags change to True when there is activity for the record from any transactional data.

    Transactional data includes records on any of the following objects: Job, Ticket, Ticket Item, Ticket Log, Price Book, Quote, Quote Item, FX Forms, and 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.

This helps manage the amount of data mobile users must download during a sync.

Examples

Sync Jobs by Status

Here’s a formula for an AltSync checkbox on the Job object:

FX5__Status__r.FX5__Sync__c

Result

This formula ensures that jobs only sync when their status has Sync selected.

Sync Quotes by Sales Rep

Here’s a formula for an AltSync checkbox on the Quote object:

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

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

Here’s a formula for an 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

Here’s a formula for an 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

Here’s a formula for an AltSync checkbox on the Ticket object:

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

Here’s a formula for an 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

Here’s a formula for an AltSync checkbox on the User object:

$User.Id = Id

Result

This formula ensures that only your user record syncs.

All user records sync by default on Sync 4.0.