Spring Cleaning: Medium – At least 3 times a year

Johann Furmann, Nana Gregg

This post is a follow-up to Nana’s great post on “Salesforce Cleaning Menu – Mild: A Flavor for Everyone”.

Introduction

Since the last post on cleaning, we started weekly clean-ups for our Mild-Flavor menu items. This should have created a culture of cleaning. Now we can step up our game and tackle some Medium-Flavor items.

  • Archive unused data
  • Delete unused AppExchange packages
  • Remove unused automation

At first glance, these items look very daunting. But again, we will focus on quick wins first, we know every bit helps! For best effect, do all medium cleaning steps 3 times a year.

Table of Contents

Archive unused data

My parent’s garage is full of unused spare parts, sporting equipment, and general junk. All of it was valuable at some point but doesn’t serve a purpose anymore. This junk makes it harder to find the really important things and uses up valuable space.

The same way unused data clutters the search results for our users slows down the database and uses up expensive data storage.

Summary:

  1. Identify data to be removed
  2. Take back-up
  3. Hide Data
  4. Delete Data

Details:
We like to start by checking data usage by an object. That’s easily found on the “Company Info” page. Only objects with a large data volume are worth considering.

Good candidates are Leads, Tasks, Cases, and Quotes. In general, transactional data becomes useless fast.

Once we identified some candidates, we work with my business people to identify: How long does the data need to be in Salesforce to create value. Invoices can be often archived after 1-2 years. Quotes even after a few months and Cases even after weeks.

The details vary from company to company. Important to remember is, records removed from Salesforce are not deleted, but archived. In case a customer insists on seeing all invoices from the last 8 years, you still can get them from your backup.

The same is true for reporting. Most historic reporting is not done in Salesforce anyway but in Excel. These kinds of periodic historic reports can also be run on archived data.

In case you missed an important use-case for old data, you always can re-import some of the data.

A neat little trick you can apply to make sure nothing major breaks is hiding the data before you delete it. Either excluding it from sharing rules or moving it to a user outside of the role-hierarchy.

The only tricky thing is for some companies to have a secure way of storing archived data. Talk to your IT Team about a good place to store the exported records.

Another solution (if your company has TableauCRM or another Analytics Tool) is to take that archived data, make it available to your analytics tool, and do historical reporting in there. Those tools are meant for that type of quantity and reporting anyway. This is also a good solution for people who are migrating from some other tool to Salesforce but want visibility into old data.

Remove unused AppExchange packages

We all love to install and test AppExchange packages. Even if the app looks promising at first, apps often become unused over time. Most apps come with a large number of objects and tabs which make your Org harder to navigate. Cleaning up apps makes a huge difference, especially for older Orgs.

Summary:

  1. Identify unused apps
  2. Remove access
  3. Take back-up
  4. Remove app

Details:

If you are not sure, you can remove user access to them at first, see what breaks. This can be done via the removal of access to the app’s Visualforce Pages and Objects.
In case you are still not sure, take a backup of all configuration and records for a certain app before removal. Once you made sure the app is not used anymore and you have a back-up for all configurations, the satisfying part of uninstalling an app is due.

Cleaning up apps is for me the most satisfying of all the clean-up tasks. With a click of a button 10 objects and 5 tabs are gone!

Remove unused automation

The third one is the trickiest. Only start if you mastered everything to this point. Unused automation doesn’t hurt at first glance but can have major consequences. Everything that’s there makes it more complex to build, can cause a bug, and to find the bug. To begin with I’d focus on the following automation:

  • Validation Rules
  • Workflow Rules
  • Processbuilder
  • APEX
  • Flows

Backup before we start

As always, taking a backup goes a long way in case something goes wrong. Metadata can be backed up in a couple of ways, my favorite are the following:

  • (Visual Studio Code + Local Or Version Control System)
  • Sandbox
  • Cool Meera way (Link)

Quick wins

Quick wins involves deleting deactivated or commented logic. Removing that logic does not prevent any bugs but makes navigating the org already a lot easier. The same can be said for APEX methods or Visualforce pages which are not used or referenced anymore. To find this “orphan code” is a little tedious but the more important. We saw whole classes being vaporized!

Active but unused

After we did the quick-wins, active but unused is a little harder but still mostly tedious. You can check every piece of automation in your org against the following checklist:

  • Do entry criteria still happen?
  • Is outcome still used?
  • Does it still work?

Each automation where one of the questions is answered with “No” can be removed. In doubt, to find out who was requesting the feature originally or is supposed to use it.

Remove Automation

Removing automation is the last and hardest part of today’s post. Some practice here makes you master and in no time you are killing automation left and right.

We can give you the high-level steps for removing automation, but the details are to org and company-specific to explain here in a short blog post. Please discuss the details with your team and come up with a plan that works for your specific situation.

Steps:

  1. Backup
  2. Regression Test: Deactivate in Sandbox, do a regression test
  3. Deactivate in Production for a small subset of Users (Permission Set, Custom Setting)
  4. Deactivate for all Users
  5. Remove from Production
  6. Celebrate success! (Confetti!!!)

And with that, we conclude our third entry in the series on spring cleaning. Stay tuned for the next entry: Spicy.