Why 20 Years of Salesforce Technical Debt Can’t Be Solved by AI (Yet)

Every few weeks, someone in a RevOps forum posts a version of the same question: “Can AI just clean up our Salesforce org?”

I understand why they ask. The pitch is compelling. You have an org that’s accumulated 15 years of acquisitions, 47 flows nobody can explain, custom fields named Legacy_Override_2__c, and Apex triggers that fire on the same object as three Record-Triggered Flows. Someone shows you a demo of an AI agent reading metadata and suggesting cleanup candidates. It looks like magic.

It isn’t. Not yet. Here’s why — and what AI can actually do today.


What technical debt actually looks like inside a real org

I spent four years at a global ERP software company owning the full MarTech stack — including a Salesforce org that had accumulated over two decades of data, integrations, and decisions made by people who left years ago.

Technical debt in a Salesforce org isn’t just messy code. It looks like this:

  • Validation rules that contradict each other on the same object — both live, both firing
  • A Lead Record Type accumulated through eight acquisitions, finally consolidated during a full org migration I owned end-to-end
  • Routing rules built for a territory structure that was redesigned three years ago — still running, still assigning leads to the wrong people
  • A recursive trigger loop where RingLead was re-triggering its own enrichment API call after every update, silently burning ZoomInfo credits — a bug I caught and fixed without vendor support
  • Custom fields from a 2019 “temporary fix” that four workflows now depend on
  • Duplicate contacts from four separate migration projects, each with partial data

None of this is unique to my company. Every org of 10+ years looks like this. The question is whether AI can fix it.


The three problems AI can’t solve

1. The context problem

A 20-year Salesforce org has millions of interdependencies. Even with a 1 million token context window, you cannot fit the entire org’s metadata, all field relationships, all trigger logic, all Flow definitions, all permission structures, and all the business rules simultaneously into a single AI session.

AI can reason about what you show it. It cannot reason about what it can’t see. And in a complex org, what it can’t see is most of it.

2. The undocumented intent problem

The hardest part of technical debt isn’t the code. It’s knowing why something was built the way it was.

That Legacy_Billing_Override__c field that three workflows depend on — was it a temporary workaround? A regulatory requirement for a market you no longer operate in? A fix for a platform bug that was patched in 2018? Nobody wrote it down. The person who built it left in 2016.

AI has no way to recover that intent. A human who has spent years inside the org — who remembers when things broke and why they were fixed the way they were — carries knowledge that no model can reconstruct from metadata alone.

3. The production risk problem

Cleaning technical debt in a live Salesforce org means touching things that affect real revenue operations. When I migrated the company’s entire RingLead configuration from one Salesforce org to another — remapping every Object ID, Field ID, User ID, trigger, and routing rule — the stakes were 852,000 leads and 591,000 accounts flowing through the system in real time.

AI can suggest a change. It cannot feel the consequence of getting it wrong at 11pm during a live campaign. That judgment — “this is safe to touch” versus “this will break seven things I haven’t documented yet” — comes from scar tissue. From having broken things in production, fixed them under pressure, and learned which dependencies don’t show up in any metadata view.


What AI can actually do today — and it’s genuinely useful

I’m not dismissing AI here. I’m actively building AI into my own RevOps workflows — using Groq LLM nodes inside n8n to classify job titles, score ICP fit, and generate intent signals from contact profiles. AI is genuinely powerful. Just not where most people think it is.

For Salesforce technical debt specifically, here’s what AI does well today:

  • Audit and catalogue — Give an AI agent access to the Salesforce Metadata API and it can document every custom field, Flow, trigger, validation rule, and permission set in hours instead of weeks. What used to take a consultant a full engagement now takes a morning.
  • Identify surface-level conflicts — AI can flag “this validation rule and this other validation rule contradict each other on this field” or “this Flow and this Apex trigger both fire on Lead update — potential conflict.” It surfaces candidates for investigation, not verdicts.
  • Explain legacy code — Paste a complex Apex class into Claude and ask what it does. Get a plain-English explanation in seconds. Massive time saver when you inherit someone else’s org.
  • Identify obvious cleanup candidates — Fields with zero usage in 24 months, Flows that have never fired, permission sets assigned to zero users. AI can find these quickly from usage data.

The pattern is consistent: AI accelerates investigation. Humans make the calls.


Where this is going in 3–5 years

Realistically, AI agents that can map an entire org’s dependency graph, identify safe-to-delete candidates, and execute cleanup with human approval at each step are coming. Salesforce is building toward this with Agentforce. The tooling is getting there.

But “fully automated org cleanup” will never exist. Because the final decisions — which technical debt to clean first, what the business can tolerate breaking during the fix, how to sequence changes without killing a live campaign — those are revenue decisions, not technical ones. They require context about the organisation, its history, and its risk tolerance that no model will ever carry.

The person who survives this shift isn’t the one who fights AI. It’s the one who understands the legacy system and knows how to use AI to work through it faster.


I’m Ajay Kumar — Senior Marketing Operations Analyst based in Bengaluru, with 9 years in RevOps and 4 years owning the full MarTech stack at a global ERP software company. I document GTM systems architecture and automation patterns on this site. Find me on LinkedIn.


Comments

Leave a Reply

Discover more from AjayOps

Subscribe now to keep reading and get access to the full archive.

Continue reading