Org Clean Up
Cleaning up your orgs is a process. The key to clean up success is to move forward through sets of closely-related customizations using clear and repeatable steps. Platform Governance for Salesforce helps you through each step in the process.
Every clean up project has these key steps:
- Identify and prioritize what needs to be cleaned up.
- Assess the risk of downstream problems and add related Customizations to be cleaned up.
- Track the progress of your clean up process.
- Group Customizations for approval and clean up.
- Archive the Customization definitions and data.
- Clean up the approved Customizations.
- Validate you followed your change approval process.
Stepping through this process helps organize the work and manage the risk. Small orgs can do the whole process with an Automated Documentation license. Large orgs likely require the tighter approval processes and environment comparison capabilities of the Intelligent Change Enablement license.
These items can help you identify Customizations for Clean Up:
- Date Last Used
- Automated Report Clean Up
- Employees Related to a Customization
Date Last Used
Date Last Used (DLU) is a key criterion for clean up, as you generally aren't cleaning up active Customizations. DLU means different things to different people in the Salesforce community. The generic definition is:
The last date the Customization, or the data it contains, was created, changed, accessed, processed or used.
DLU is calculated differently for each Customization type.
For all clean up activities, consider the following items:
- Blank DLU means there is no verified date. A blank date doesn't mean it's safe to remove.
- DLU isn't the only criterion. Check the dependencies. An unused field with related code isn't safe to remove. It can, however, indicate unnecessary code.
- An unused field may have important data from the history of your company. Investigate why it isn’t being used. It may represent a feature or process that was started but never completed.
- Cleaned up Customizations are archived if you need to restore.
Like all Salesforce Date fields, DLU can be filtered using relative date formats (typically what you will want). You can also filter on specific dates.
Automated Report Clean Up
The most common unused Customizations are Reports. In most orgs, new Reports are created every day. Some are critical to ongoing business processes, others are quick solutions to day-to-day problems. These one-time quick reports accumulate in your orgs, causing confusion and inefficiency. See Automated Report Clean Up for details on removing them.
Employees Related to a Customization
Knowing who is using a customization is useful. This is tackled in steps, by Users and Owners.
Users
Field and Object Users: Track employees editing a field (using a custom or standard object). Enabling tracking for all customizations would be inefficient, so it is enabled selectively. If you use Salesforce Shield Event Monitoring, Platform Governance for Salesforce captures this data automatically.
To capture the data without Salesforce Shield Event Monitoring:
- Enable Field Audit Trail for the field.
- Permit Salesforce to populate the audit log for the last 18 months.
- Rescan the tracked fields.
- Platform Governance for Salesforce automatically gathers the names of employees changing the data in each field. This process can take multiple days for a large dataset.
- Turn off audit history if desired.
Code, App, and Component Users: With Salesforce Shield Event Monitoring, capture users from the execution history of APEX-related objects.
Other objects: There are two strategies for other objects:
- Sharing Rules: Often, you can determine who is using a List View or Dashboard by understanding the shared Users, Roles, and Groups.
- Salesforce Shield Event Monitoring: Employee usage data for Reports, Dashboards, and many other objects, is only available with Salesforce Shield Event Monitoring. It enhances usage metadata to show users who are viewing non-scripted objects and executing or triggering code and workflows. After you activate Salesforce Shield Event Monitoring, data is collected from that point on. It isn't retroactive.
Users referred to in objects: Fields aren't created for everything, but all the metadata is available. Identify users (and other things) referred to in dashboard filters, formula fields, SOQL, or code by searching the raw XML, JSON, or code. The Specific Clean Up Approaches section contains examples.
Owners
The current owner of each Customization is tracked. By default, it is the person who created it. In cases such as Reports, this is useful to understand who needs to approve a change to a report.
You can use the Change Owner button on any Customization List View. For an individual Customization, edit the Owner field on the Customization Record. Best practice if you have a staff change, is to update the Process record, which then updates the owner for all the affected Customizations.
Next Technical Debt Topic: Org Clean Up Example