Technical debt in Salesforce is the accumulated cost of past shortcuts and leftovers: unused fields and objects, duplicate profiles, forgotten automation, stale reports, hard-coded IDs, low-quality code, and configuration that no one understands anymore. Debt builds up through mergers, rushed projects, abandoned initiatives, and admin turnover. The org keeps working, but every change takes longer, every release carries more risk, and new projects inherit the mess.
Signs of Technical Debt
- Unused metadata. Fields, picklist values, record types, apps, and automation that nothing uses or references.
- Duplicates. Near-identical profiles, permission sets, page layouts, and Apex methods.
- Fragile configuration. Hard-coded record IDs, broken references to missing fields, and automation that runs in an unknown order.
- Code problems. Apex with security, performance, and design issues, and tests that barely meet coverage requirements.
- People leftovers. Inactive users still connected to records, queues, and automation, and licenses no one uses.
How to Approach Debt Removal
- Inventory and baseline. Take a complete snapshot and count assets by type, so progress can be measured.
- Measure real usage. Judge fields, picklists, reports, and objects by actual data and activity, not by age or by opinion.
- Find unreferenced and duplicate metadata. Use type-specific checks and similarity comparisons to build a candidate list.
- Check dependencies before removal. Every candidate needs a dependency review and an owner's approval.
- Remove in release cycles. Identify, test in a sandbox, communicate, restrict access, monitor, and then decommission. Make cleanup part of every release instead of a one-time project.
How Snapshot Helps
- Forgotten Assets Report: type-specific checks find metadata that appears unused, inactive, hidden, or unassigned, such as duplicate or unused Apex methods, inactive workflow rules, apps not visible in any profile or permission set, page layouts with no profile assignment, and roles with no active users. Smart Deploy adds flagged assets to a delete job list for review.
- Similar Assets Report: finds duplicate and near-duplicate assets of the same type and shows XML differences for each pair.
- Org Health Scan Report: more than 150 configurable tests, including Technical Debt, Forgotten Assets, Inactive Cleanup, and Code Quality categories, graded against your thresholds.
- Hard Coded IDs Report: finds Salesforce IDs typed directly into metadata and flags references that are already broken.
- Metadata Quality Report: uses editable AI checks to find content problems such as broken merge fields and hard-coded logic across metadata types.
- Apex Code Quality Report: PMD static analysis of Apex classes and triggers, with findings prioritized by rule.
Flags and findings identify candidates for review. They do not prove that deletion is safe or that remaining assets are in business use.
Metadata Types Involved
-
CustomField: the most common source of unused metadata. -
ApexClass: unused and duplicate code, and code quality findings. -
Flow: inactive and obsolete automation. -
Layout: unassigned and near-duplicate page layouts. -
Profile: duplicate and near-duplicate profiles.
Common Questions
Where should technical debt cleanup start?
Start where the evidence is strongest and the risk is lowest: fields and picklist values with no data, assets with no detectable references, and stale reports. Leave complex automation and code for later cycles.
Is it safe to delete everything a scan flags?
No. Scans find candidates. Each candidate still needs a dependency check, an owner's approval, and a sandbox test before deletion.
How do I keep technical debt from coming back?
Add cleanup checks to each release, schedule recurring scans, and require descriptions and owners for new metadata.