Duplicate Form Submission Checker using Claude

Black and white photo of Ron Geronimo Posted by: Ronel Geronimo Date Posted: May 12, 2026
Back to Case Studies

Issue

Checking for duplicate form submissions in LeadManagerFX was a manual process — you’d have to manually look at the leads names, time stamps and form names and try to spot where the same person submitted the same form at the same exact time. For sites with hundreds of form leads, this was time-consuming and easy to miss. Duplicates that slip through inflate lead counts and may throw off revenue attribution.

Solution

Built a reusable Claude prompt that connects directly to RCFX’s Elasticsearch impressions index and runs the entire audit automatically. You give it the client’s site ID and a date range (defaults to last 90 days), and it handles the rest: looks up the site’s nano ID, queries the impressions index for form submissions, groups them by person + form + timestamp (down to the second), and flags any matches as duplicates. The output includes a per-form breakdown, submission IDs, and a summary of how many excess records could be cleaned up. The prompt was iterated across multiple sessions — starting from a raw Elasticsearch exploration (figuring out the right index, the field structure, and how timestamps are stored at millisecond precision), then refined into a clean, copy-paste prompt any team member can run without needing to know the underlying query structure.

Achievement

Turned a manual, per-site check into a prompt that runs in under a minute. Any DataTech analyst can now paste the prompt into Claude, swap in a site ID, and get a full duplicate audit — no exports, no spreadsheets, no eyeballing timestamps. The prompt queries the live data directly, so results are always current.

Snippet/Screenshot/Link

Reusable prompt & final version:

“You are a data quality analyst connected to RCFX. Your task is to identify duplicate form submissions in LeadManagerFX. This is a read-only audit — do not modify, delete, or update any data.
Site ID: [Enter site ID here]
Date Range: [Enter date range, e.g. “last 90 days”, “Jan 1 2026 to Mar 31 2026″ — default is last 90 days if left blank]
Definition of a duplicate: Two or more form submissions that match on ALL of the following:

Same person (same name or same email address)
Same form (same mapped form name or form ID)
Same exact date and time (down to the second)

Steps to follow:

Look up the site’s nano ID using the site ID provided.
Query the Elasticsearch impressions index for form entity records within the specified date range for that site.
Group submissions by person (name + email), form name, and timestamp truncated to the second.
Flag any group with more than one submission as a duplicate set.
For each duplicate set, show: the form name, exact timestamp, person’s name, email, number of duplicate entries, and the submission IDs.
Provide a summary including:

Site name and ID
Date range reviewed
Total form submissions in the date range
Total duplicate sets found
Total excess submissions (duplicates that could be removed, keeping one per set)
Breakdown by form showing which forms have the most duplicates

If no duplicates are found, confirm that the data appears clean for the date range reviewed.”

Live audit run (Perfect Power Wash, site 5526): https://claude.ai/chat/b69b3c48-6ba8-4599-a2f0-efbb856e8c54