Rocket ship badge DevOps Launchpad

David Runciman · 30th October 2024

What is Salesforce data archiving?

Data archiving is an important part of the data management lifecycle. In this post, we’ll explore why archiving is needed for Salesforce, what it looks like to implement data archiving for Salesforce, and how archiving relates to Salesforce DevOps.

Too much data?

Salesforce data gives everyone across departments a shared view, helping your business take a tailored and cohesive approach to prospects and customers. It also provides the insights that spark innovation across your business. And usually, the more data, the better. Anomalies don’t skew the results so much, and the margin for error gets smaller.

But as the saying goes, you can have too much of a good thing.

At some point, the sheer volume of Salesforce data will cause you problems:

  • It’ll get harder to find specific data amid the noise.
  • Data becomes less relevant — or even misleading.
  • Hitting (or passing) data and file storage limits will slow down your org…
  • …and increase storage costs if you decide to buy additional data storage.

Long before you reach this point, you should implement a process for monitoring storage usage and getting rid of obsolete data in Salesforce.

Archiving data vs. deleting data

So that sounds simple enough. We just need to delete our old data.

But not so fast. What if it turns out colleagues are still using that data? What if that data needs to be retained for compliance reasons?

Deletion is the final stage in data lifecycle management, and deleting production data is a bit too… final. Before permanent deletion comes archiving: the safe removal of data from Salesforce into secure, off-platform storage.

Data archiving frees up space in Salesforce, without the scary implications of deletion. If an auditor or colleague asks for the data, it’s still retrievable. Once data has been archived for a set retention period, it’s safe to delete it permanently.

Salesforce data lifecycle

Wouldn’t data backup solve this problem anyway?

If you have a reliable data backup solution in place, why not simply delete obsolete data and restore it from a backup if needed?

Firstly, deleting data from Salesforce isn’t a simple matter. Removing a record might unintentionally prompt an Apex Trigger or Flow to run. And ad hoc deletions mean there’s no audit trail of the archiving process.

More to the point, the aims for backing up and archiving are very different. Backups are all about protecting the data that’s still present in your live org. In contrast, archiving is about removing data from Salesforce. Mixing up those aims will cause confusion.

For example, when restoring data from a backup, you really don’t want to be wondering whether some of that data has been theoretically archived and shouldn’t be restored. Besides, the configuration of your data backup and archiving jobs won’t be identical. Different Salesforce objects might be in scope. And you might need different data retention periods in place.

Considerations for data archiving

If you’re looking to archive data, you’ll need to consider the following questions.

Which data will you archive?

Salesforce data comes in all shapes and sizes. You’ll need to determine which objects in your org contain data that’s important enough to archive but no longer needed in your CRM.

Case records are a good example. Customers will expect you to keep a record of cases for a while, and it’s useful to be able to track common issues across all recent cases. But once a case has been closed for a few years, it’s of little value in your org.

How long will you need to hold the archived data for?

Compliance will be the biggest factor for determining the data retention policies in your data archiving strategy. Your business may need to retain data for a minimum period. For example, data that’s subject to HIPAA compliance must be retained for six years after it was last used. But other regulations, such as GDPR, encourage you to retain data for as little time as possible.

Within the constraints of compliance, your archiving strategy also needs to reflect when your business is comfortable deleting data forever.

Manual or automated archiving?

Theoretically, archiving can be done manually. If a data set is identified as being obsolete, an admin might be tasked with removing it from Salesforce and storing it somewhere else. Of course this approach isn’t scalable. It’s time-consuming and error-prone. Wherever the archived data is stored must be up to scratch for security and compliance.

Automation is essential for a viable data archiving strategy. Automated jobs copy the data to your archive, then remove the data from your org. It goes without saying there needs to be complete trust in the process and tools involved, given the nature of automated deletions from a production environment! Testing the archiving process is vital. All archived data needs to be encrypted, held in secure servers, have the right permissions, and be quickly retrievable on demand.

What would a restore look like?

Safely archiving data has its own complications. But restoring data to Salesforce is usually even more challenging. Manually restoring small amounts of data can be viable. But you’ll need a restore process that can handle larger data sets with related records. Again, testing the process is essential.

How will you audit the data and process?

Data security is a high priority for any business, because it’s foundational for building trust among your customers. Although archived data is (by definition) obsolete, it’s also (by definition) sensitive. It very likely includes personally identifiable information (PII). As such, you need to be able to audit a complete history of which archiving processes have run, to retrace who has accessed or processed data.

Data archiving solutions

There’s a native archiving tool in Salesforce, but it only solves part of the problem. Records “archived” in Salesforce won’t come up in search results, so you can declutter Salesforce for end users. But the data is still in Salesforce, so it won’t help you free up storage space.

Paying Salesforce for additional data storage is more expensive than purchasing an archiving tool, so financially it makes a lot of sense to invest in a third-party solution. There are several options on the market, usually as an offering alongside Salesforce backups. The considerations above are the key things to look into during an evaluation.

Data archiving and DevOps

The data lifecycle for Salesforce, including archiving, interacts with the DevOps lifecycle for the Salesforce platform. The overall goal is to have a Salesforce org that delivers for the business. Customizations and features need to be relevant and high-quality; so does data. Poorly designed configurations can make Salesforce underperform; so does data bloat. Bringing both lifecycles together, and managing processes for data and metadata under one coherent strategy, is the most efficient and effective way to see success with Salesforce.

You can learn more about data archiving in this webinar recording from Gearset. And you can explore related concepts on DevOps Launchpad — just click below to get started today if you haven’t already.