← All Case Studies

A three-year-old workaround.
Still running. Still merging the wrong people.

The function had a first-name comparison. It worked correctly. Someone had disabled it in 2023 with a single line of code — and nobody had noticed since.

Finding from code analysis alone — before any timeline data was loaded
15–20
Minutes of active analysis time
4
Distinct bugs and design issues found
3 yrs
The disabled check had been live
0
Live CRM access required
How this analysis was done

This entire investigation used offline extracted metadata — no live CRM access at any point. TechLedger's extraction toolkit pulled function source code, workflow definitions, scheduled function configurations, and module field schemas into local files. A single field-change timeline export was provided separately. The extraction made it possible to search across all functions simultaneously, trace field references through workflows and schedules, and reconstruct the full automation chain — in a single session.

A lead record became someone else

A client noticed that a lead record for one person had been overwritten with data belonging to a completely different person at the same organization. Name, email, job title, address — all replaced. The original record was gone. No error had been logged. Nothing in the standard Zoho activity reports indicated anything had happened.

The question: how, and how many times had it happened before?

What the field-change data showed

A timeline export for the affected record told the story precisely. Two leads at the same municipal organization — different people, different roles, different emails — shared the organization's main switchboard number. When the second lead was created, the deduplication function picked it up within seconds.

Time Event
March 10, 02:37 Lead A created. On-create workflows fire normally. Territory assigned by Mapsly.
March 16, 04:32 Lead B created — different person, same last name, same office phone number.
March 16, 04:32:48 Deduplication function fires. Seven fields on Lead A overwritten with Lead B's data in a single batch operation. Lead B deleted.

Lead A's history, owner assignment, and cadence enrollment now belonged to a record with Lead B's identity. Lead A's person had been erased.

Four problems, not one

Code analysis — completed before the timeline data was even loaded — identified three bugs in the active function and a fourth design issue in the workflow that called it.

Critical
First-name comparison hardcoded to always pass The function contained working logic to compare first names before merging. It was overridden by a single line added in June 2023 — FirstNameMatch = true — with a comment reading "DISABLED CHECKING IF FIRST NAMES MATCH." The line appeared in two places. The reason for the disable is unknown. It had been running for nearly three years.
High
Shared phone numbers treated as identity confirmation The matching logic required only that last names match and that one of phone, email, or company also match. A shared office switchboard number was sufficient. Any two people at the same organization with the same last name and the same main phone number would be merged — a pattern extremely common in municipal and government accounts.
High
Record owner silently overwritten The function attempted to preserve the original lead's owner after merging. The attempt failed silently: "Owner" was not excluded from the field-copy loop, and the override that followed used an object format incompatible with what updateRecord expects for an ownerlookup field. The result was that the merged record inherited the new lead's owner — the person who had uploaded the batch — with no reassignment.
Medium
Assignment rules firing against a deleted record The deduplication workflow had three sequential actions: run the function, apply assignment rules, set a checkbox. The function deleted the incoming lead in step one. Steps two and three then executed against a record that no longer existed. The surviving record — now carrying the wrong person's identity — received no reassignment at all.

This wasn't an edge case

Cross-referencing the scheduled function configuration confirmed that the buggy deduplication function was being called on up to 350 leads every two hours. Every new outbound lead passed through it at least once — and potentially multiple times via separate trigger paths.

The first-name check had been disabled for nearly three years. Any two leads during that period sharing a last name and a phone number or company name — regardless of whether they were the same person — would have been silently merged.

A complete diagnostic report in one session

The session produced a structured findings report covering all four issues, each with prioritized fix recommendations and code-level specifics — exact line numbers, the field exclusion list change needed, the correct Owner ID extraction pattern, and two architectural options for fixing the assignment rule sequencing.

The report also included a cross-reference map of every function and workflow that touched the three fields used to trigger deduplication — built by searching the full extracted corpus, not by reading through code manually.

Immediate action items identified: restore the original lead's data from the timeline's "Old Value" column, create a new lead for the second person, and run an audit query to identify any other records where the function had merged different first names.

Why offline metadata made this possible

Standard Zoho reporting shows what happened in terms of outcomes — field values, record states. It doesn't show why automation fired, which code path executed, or what logic was evaluated. A workflow execution log would show that the deduplication ran. It wouldn't show that the first-name check had been disabled three years earlier.

The TechLedger extraction made the function source code, workflow definitions, and scheduled function configurations available as searchable, analyzable files. That made it possible to go from a symptom — "this person's record became someone else" — to a complete root cause analysis in a single session, without requesting CRM access, without waiting for a developer to investigate, and without guessing.

The finding was in the code. The code was already extracted. The diagnosis took 15 minutes.

← All Case Studies Get a Diagnosis for Your System →

Your system has findings like these.

Most of them are invisible until you extract the metadata and look.

Request a Consultation → See Sample Output