Org Cleanup and Optimization

Snapshot has over fifty reports that help identify forgotten assets, underutilized fields, and configuration problems.

Wooly Reports

Table of Contents

Introduction

Salesforce orgs can become unmanageably complex over time. The complexity might stem from corporate mergers and acquisitions, poor change and release management practices, failed development projects, or disruptive administrative turnover. Complexity can result in slow performance, reduced agility, sluggish adoption, and IT/business misalignment. Older projects must be cleaned up to make room for new initiatives, or any Salesforce org can become unhealthy over time. Many Salesforce orgs become more complex every day.

Consider an org where Profiles and Custom Objects are being created with the Setup Menu at a linear rate. The number of user object permissions in the org will increase at an exponential rate. But when you consider the impact of other entangled assets like Custom Fields, Record Types, Page Layouts, and Apex Classes, the overall complexity of the org will increase at an even higher rate than in this simple example.

This white paper discusses how the Snapshot Org Management product from Metazoa can help you clean up and optimize your Salesforce account. Snapshot provides over fifty reports to help you identify forgotten assets, underutilized fields, and configuration problems. Once you understand where the problems are, you will be on the right track to simplifying your org and reducing complexity.

Field Usage Report

Some of the Custom Fields in your Salesforce account are more useful than others. Some are rarely used, others not at all. One way to measure usefulness is to look at fields that are empty or contain default values. The more distinct the field values, the more the field is being used, versus fields with more uniform values, which contain lots of duplicate information. The Field Usage Report presents all of this information for any set of selected records.

Once this information has been gathered, judgement is required on a field by field basis to determine usefulness. You may need to drill down and see why a field is more or less distinct. For example, Account Name, Phone, and Website will be almost 100% distinct, but Account Zip Code and State will be more uniform. Often you will discover that more uniform fields are mainly populated by empty or default values. That might point to a field that needs to be deleted, or perhaps that should be a required field. If most of the fields are no longer needed, then the entire object can go.

The Field Usage Report can identify unused fields and update the compliance information right from the report. Select any field in the Preview tab and click the Edit Compliance button to make changes to the field’s compliance metadata. This information includes:

  • Business Status
  • Security Classification
  • Compliance Group
  • Description
  • Help Text

Picklist Usage Report

The only thing more complex than fields are picklists. Picklists are multiplexed by Record Types, and further complicated by controlling versus dependent picklists. Picklists will have a defined list of values, but they will likely have many other values that have been entered by hand over the years. What values should be on the defined list? What other values need to be remapped to one of the defined values? Which picklist items should be eliminated from the list entirely? The Picklist Usage Report displays all of this information. The Record Types Vs. Picklists Report and the Controlling Vs. Dependent Picklists Report provide additional information about the structure and usage of picklists in your org.

Forgotten Assets Report

There are over 150 asset types currently handled by the Metadata API. These metadata assets describe all the customizations in your org. But this information can also be used to discover forgotten, hidden, and inactive assets. In some cases, an asset will not be enabled by any of the Profiles or Permission Sets in the org. In other cases, there will be no metadata references to the asset. Many metadata assets have an “active” or “visible” flag that can be checked. The Data API can also be used to find assets that have no assigned users. Here is a list of common problems that the Forgotten Assets Report can discover:

  • Groups not referenced by Custom Objects or Assignment Rules
  • Roles, Profiles, and Permission Sets with no assigned users
  • Custom Objects and Fields not referenced by other metadata assets
  • Record Types, Custom Tabs, and Custom Applications that are not visible
  • Web Links not referenced by Page Layouts or Home Page Components
  • Inactive Rules: Workflow, Approval, Assignment, Moderation, Escalation…

Last Activity Date Report

Some assets are enabled and properly connected to your Salesforce account, but they have not been used in a very long time. Email Templates have a Times Used and Last Used Date field available from the Data API. Likewise, Reports have a Last Run Date. The Refresh Date for Dashboards can be calculated from the connected Reports. You will likely find Reports and Email Templates that have never been used, but be careful, because sometimes these objects are simply new, so be sure to also check the Created and Last Modified Dates. The Last Activity Date Report provides all of this information.

Profiles and Permission Sets Report

Every user has a Profile that defines what they can see and do. Profile permissions include Application and Tab Visibility, Apex Class and Page Access, Object and Field Permissions, User and Custom Permissions, and Layout Assignments. An administrator can also assign any number of Permission Sets to a user. Permission Sets are similar to Profiles. They are used to grant additional permissions for special situations. Profiles and Permission Sets are the key junction object that manage complexity at the heart of a Salesforce account.

The Profiles and Permission Sets Report provides over 30 different tables that display the use of Profiles and Permission Sets in your org. You can see which Profiles and Permission Sets are assigned to the most users. Perhaps some Profiles and Permission Sets can be consolidated. Another interesting report shows the extent to which various child types are used by each Profile or Permission Set. For example, which Profiles enable the most Apex Classes, or User Permissions? Which Profiles show the most Custom Tabs and Applications? This information will help identify duplicate and underutilized Profiles and Permission Sets that can be removed, refactored, and consolidated.

Merging Similar Profiles

The User Permission Assignments dialog provides an easy way to quickly remap the connections between Users, Profiles, Permission Sets, and Permission Set Groups. This interface also provides powerful tools to identify and merge similar Profiles. During this process, Permission Sets are created that make up the difference between the original Profile and the new merged Profile. All users can optionally be reassigned to the new merged Profile and the corresponding Permission Set. This is an incredibly effective tool for discovering and cleaning up similar Profiles.

Apex Code Quality

Another useful tool for cleaning up your org is the static analysis of Apex Code Quality. This report uses the PMD Static Analysis tools to analyze over 50 different quality parameters. This report can be scheduled to send out email alerts when quality problems appear in any org. The categories include:

  • Best Practices
  • Code Style
  • Code Design
  • Documentation
  • Error Prone
  • Performance
  • Security

User Connection Cleanup

The User Connection Cleanup report documents 50 different ways that a user can be connected to a Salesforce org. These connections can be by username, user ID, or by user email address. This information starts to become very interesting when we start looking at inactive users. Inactive users can manage active users, receive system emails, and oversee important metadata assets. This report allows you to clean up inactive users by deleting junction objects in some situations and reassigning an active user in other situations. Here are the different categories that can be cleaned up:

  • Object Ownership
  • User Permissions
  • User Licenses
  • Data Connections
  • Metadata Links
  • Email Addresses
  • Team Members
  • Folder Sharing

Smart Deploy

All these reports let you discover assets that need to be cleaned up or optimized. Snapshot also provides an easy method to delete these assets right from the report interface. On the Display Report tab, you will notice the Smart Deploy button. This button launches our deployment interface with the assets that need to be cleaned up already selected for you. You can make these metadata changes in your org from here, or you can save the Job List for future metadata deployments during the release cycle.

Release Management

Smart Deploy is great for quick changes, but some cleanup and optimization work must be carefully planned in order to avoid disruption to the production org. Here are some of the best practices for cleaning up your org during the release cycle:

  • Identify problematic assets that need to be cleaned up or optimized
  • Test what happens when these customizations are deleted in a Sandbox
  • Communicate to other users what customizations are being removed
  • Restrict access to the assets with user Profiles or by disabling the assets
  • Monitor the impact of the changes before actually deleting the assets
  • Decommission the assets with change and release management software

The adoption of an effective change and release management practice will ensure that your Salesforce org remains healthy. In fact, org cleanup and optimization should become a regular priority in the release cycle. Snapshot provides extremely powerful tools that can help, including powerful interfaces for Taking Snapshots and Deploying Metadata. These tools will ensure that your Salesforce org continues to grow with new capabilities and robust user adoption but without crippling complexity.

The adoption of an effective change and release management practice will ensure that your Salesforce org remains healthy. In fact, org cleanup and optimization should become a regular priority in the release cycle. Snapshot provides tools that can help, including powerful interfaces for Taking Snapshots and Deploying Metadata. These tools will ensure that your Salesforce org continues to grow with new capabilities and robust user adoption but without crippling complexity.

Conclusion

Snapshot provides over fifty reports to help you understand and visualize the complexity of your Salesforce org. Most Salesforce accounts get more complex every day. Cleanup and optimization should become a regular part of your change and release management practice. Let us know if we can help you clean up and optimize your Salesforce account. Click the download button to get the pdf version of this whitepaper.

🎉 Congratulations! 🎉

You’ve successfully completed the Metazoa Metadata Studio Certification Class. With the skills you’ve acquired, you’re now adept at harnessing the power of Metazoa’s Metadata Studio, seamlessly integrating artificial intelligence into Salesforce org management. You have earned you a certificate! Well done, and we wish you continued success in your future endeavors!