Veeva is a top-of-the-line cloud storage solution for healthcare, pharmaceutical, and life sciences companies utilizing Salesforce. Its popularity has reached its current level because it is such a robust option for customer data management.
As an application that sits on top of Salesforce, data stored in Veeva can be backed up using Salesforce’s native data backup option—Weekly Export. This default option produces a weekly set of .CSV files for each of an organization’s Salesforce standard and custom objects. These files need to be downloaded manually on a weekly basis and stored in a secure environment.
Let’s go over the seven essential steps in successfully backing up your Veeva data through Salesforce Weekly Export.
1. Size Up the Damage
Records within Veeva or Salesforce are often interconnected and the deletion of one record could result in the cascading deletion of many related records as well. This is why it’s important to assess the scope of the damage.
To do this, the schema or the types of objects built into your database need to be identified and from there the extent of a data loss can be determined. A great tool for helping identify your schema is Salesforce Workbench.
2. Isolate the Missing Data
The second phase involves getting two sets of data, one from before the data loss and another from after the data loss. Typically, both of these data sets can be extracted by using the Weekly Export .CSV files that were downloaded on a weekly basis. Fundamentally, the “before the data loss” data set can be used as a foundation to then compare it to the “after the data loss” data set.
3. Create Restore .CSV’s Files
Once the records requiring a restore have been identified, a separate file for each object needs to be recovered. These objects include accounts (parent), contacts (child), opportunities (child), and Custom Object Lookups (orphan). Start with the parents records lost, then review the child and orphan files for related deletions.
It’s then a matter of copying and pasting the lost records into new individual files and saving them as .CSV files.
4. Build an External ID
When records are deleted in Veeva or Salesforce, the current ID value is lost and records will be assigned a new ID value when the record is recreated. This presents a problem for every related object because the relationships, that were based on the old ID's, need to be preserved as part of a complete recovery process.
One way to maintain these connections is to use the old ID values as a new external ID field to join related records.
When performing a data import in order to restore deleted records, an external ID can also act as the common thread between related objects.
5. Prepare Deleted Records
Prior to importing the list of deleted records into Salesforce, there is some additional preparation that needs to take place before a successful data restoration can occur. This preparation involves editing the column heading of each .CSV file with the new external ID that was created in Step 4.
6. Restore Files in the Correct Order
When recovering from a data loss, the processing order of the restore files is essential to a successful data recovery.
The parent object records must be established first in order to generate new ID values. Then, the children object records should be added to rebuild the correct relationships to each parent record. Salesforce Apex Data Loader is usually the tool used to complete this file ordering procedure.
7. Additional Considerations
There are some other factors that Veeva administrators should also consider as it relates to any Weekly Export data restoration project. Keep the following information in mind when considering the best option to recover lost data:
- Weekly Export can only run once a week, not daily or hourly.
- Metadata is not included.
- You only have a 48-hour window to download the weekly export files.
- It is difficult to find data if you do not know exactly when it was lost.
- Downloading the files is a time-consuming and manual process.
- Storing .CSV files in the wrong place could create an IT security risk.
- You may not meet stringent regulatory compliance standards.
The steps above are simply a quick run-down of the steps required to recover lost or corrupted Veeva records with Salesforce Weekly Export. For a more detailed explanation of each step in this backup and recovery process, read our eBook on the “7 Steps to Restoring Lost Data using the Salesforce Weekly Export”.