Using Autosync
- iPad
- iPhone
Autosync syncs data created by CRM users from offline devices to the online server. This makes critical information immediately available to drive decisions made through reporting and analytics.
Autosync improves the CRM experience for field users, Sales Ops, and IT teams, and reduces the risk of data loss to organizations in case the mobile device is stolen or the user leaves the organization without returning the device.
Autosync includes the following:
- Any data created or edited on the mobile device is synced with the online servers as soon as possible
- Users get immediate feedback on data they are creating and editing, so they quickly receive new information and can take action
- Users with multiple mobile devices immediately get mobile changes across all their devices, experiencing email like behavior within Veeva CRM
Only changes made on offline devices sync automatically online. Users must initiate an incremental sync on mobile devices to download any data edited or created online.
For example, Sarah Jones visits Dr. Ackerman at his office. On the iPad, she creates a Call Report, captures Product Details, leaves some Samples, and captures Dr. Ackerman’s signature. After the call, Sarah completes the Call Report and selects Save. The records are queued and immediately synced to the server. At this time, Salesforce logic is applied during the save, and these records are immediately queued to sync back to the iPad so all the latest information from Salesforce on the Call is ready for Sarah. She is also able to see the same changes on her iPhone.
Autosync Requirements
- iOS 11 or later – Requires 64-Bit iPads (excluding iPad 4)
- Windows 10 Build 16299 (Fall Creators Update, version 1709)
How Autosync Works
Saving Data on Mobile Devices (1)
Autosync applies to all records which are edited or created by an end user on the mobile device. This is similar to what used to be called Autosend on Submit, which was special handling that Veeva did for objects like Call, Orders, Medical Inquiries, and others.
However, with Autosync, all records for all objects sync automatically. This includes all Veeva objects, custom objects created by customers, submitted records, and saved records.
Admins who log into production orgs to triage issues should be mindful of the differences in Autosync and traditional syncing.
- When the record is saved (implicitly by the system or explicitly by the user), it is added to the upload queue
- If related edits are in progress, the system may wait for all edits to be completed before adding the records to the upload queue
- If there is internet connectivity, the record is immediately uploaded to the online servers
- For most objects, each record is saved and queued individually
- For the following special objects, all records for the save are queued as part of the same transaction:
- Call/Child Objects related to Call
- Order/Order Lines/Delivery Orders
- Inventory Monitoring/Inventory Monitoring Lines
- Content Acknowledgment/Content Acknowledgment Items
- Medical Inquiry Fulfillment/Medical Inquiry Fulfillment Responses
- Data Change Request/Data Change Request Lines
- If there is no internet connection or the application is put in the background before it is uploaded, the records stay in the upload queue. When internet connectivity is re-established, the application immediately uploads items in the queue to the servers in a first-in, first-out manner.
- In rare cases, the same record may be edited by a user on multiple devices at the same time
- For most objects, the device that saves first wins in these cases. If the values are different, a sync error occurs.
- When edits are made, the previous value and the new value of the fields that changed are uploaded to the server
- Before the online save happens, the application checks whether the previous value in the edit matches with the current value online
- When the objects (listed above) are edited and saved, the data from any of their fields edited by the user, including Salesforce and custom Veeva (_vod) fields, are sent online. These changes override any online changes.
- If the same Call is Submitted on one device and then edited on another device, a duplicate Call is created with all the edited information for the following call-related objects: Call Samples, Call Discussions, Medical Discussions, Call Key Messages, Call Expenses, Tasks, and Call Clickstreams
- If the same Order or Inventory Monitoring is Submitted on one device and then edited on another device, the edits are discarded.
Salesforce Processing of Saved Records (2)
When changes on a mobile device are synced and saved online, Salesforce runs all its normal save logic.
- If a validation rule error occurs, this goes back to the device as a sync error
- If saved successfully, data updated by Salesforce includes the following:
- Record ID
- Auto-number fields
- Formula fields
- Last Modified/Created Dates
- Data changed on the record through triggers
Apex code using the future method and changes made by workflow updates may not come down, as those changes are not immediately made when data is saved.
Updating Data on the Data Feed (3)
Mobile devices retrieve Autosync transactions from the Autosync data feed. Autosync transactions are user specific, meaning an Autosync transaction made by Sarah Jones can only be retrieved by Sarah Jones on any of her mobile devices.
All records successfully uploaded as a part of the save, are queued to the data feed. This happens immediately after the save completes. Changes made through workflows or triggers which use the Future apex method may not sync down as they are not guaranteed to occur immediately.
In addition, if the record saved was a child record, the corresponding master record is also queued to the data feed. Any updates to that record, such as the rollup field calculations, would be available. For example, if a user edited an Event Attendee record, the corresponding Medical Event would also be placed on the data feed.
Data stays on the data feed for seven days, after which, it is removed. To receive all changes, users must perform an incremental sync within the seven days.
The system does not recheck VMOC WHERE clause information when adding Autosync data to the data feed. If a record was edited or created via Autosync, it is placed on the data feed even if it is outside of the WHERE clause.
Checking for New Data to Download (4)
Mobile devices check for new data from other mobile devices every 30 seconds, if there is internet connectivity. Veeva reserves the right to adjust the timing for when the device checks the data feed.
- If new data from other offline devices is present, it is downloaded to the device. Once downloaded to the device, the system only merges newly downloaded data when it is safe to do.
- Data is only merged if and when all related data is available (ex. all order lines for an order are downloaded)
- Data is not merged while a user is actively using the record (ex. user is editing or viewing the record)
- Even though data is not merged, the system checks the new data when an action is performed. If the new data prevents the action, the user is notified that they cannot perform the action.
- When the user leaves the edit/view page, data is merged and the next time the user views/edits the record, it is updated
- If there is a pending upload or sync error for a record, Veeva discards the downloaded record. This means there is a more recent update on the mobile device.
The following data sets still require incremental sync:
- All data changes made from online, including the following:
- Integrations/Territory Alignments
- Metadata changes
- Veeva CLM and Approved Email content
- Veeva CRM MyInsights Sales Data and Nitro Data
- Data changes made by other users