The Scenario
The CRM admin got a message from the VP of Sales on a Tuesday morning: "We have 300 duplicate lead records. I need them gone before the attribution report runs Thursday." The duplicates were identified by the dedup tool last week and their IDs are sitting in a Excel workbook. Column A has the IDs. The VP wants them deleted, not merged — these are complete duplicates with no unique data worth preserving.
You have admin access. You have the list. What you do not have is a clean way to delete 300 records in bulk without clicking through each one individually or spending an afternoon with the Data Loader.
The bad version:
- Open Salesforce, search for the first lead ID, open the record, scroll to the bottom, click Delete, confirm.
- Navigate back, search for the next ID, repeat 299 times.
- At some point the browser session times out, you lose your place, and you are not sure which records you already deleted.
- Try to use the Salesforce Data Loader in delete mode, realize it requires a local Java installation, the correct API version, and a CSV formatted exactly right — then discover your Mac's security settings block the download.
The duplicate list is clean. The delete operation is conceptually simple. The path between them should not require a desktop app install and three hours.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Excel workbook. It reads your ID list and submits the records to Salesforce's sObject Collections delete endpoint in batches, writing a confirmation or error for each row.
Delete all Salesforce Lead records whose IDs are listed in column A of my workbook using sObject collection delete — process up to 200 at a time and write the result to column B.
What You Get
- Every lead ID in column A submitted to Salesforce for deletion in batches of up to 200 (the API maximum per call).
- Column B populated with deleted for each successful deletion, or the specific error for any that failed — record not found, insufficient permissions, record locked by workflow.
- All 300 rows processed. A failed record in one batch does not cancel the rest of the batch.
- You have a permanent audit trail: column A shows what was targeted, column B shows what happened.
What If the Data Is Not Quite Ready
Some IDs in the list may not exist anymore
The dedup tool ran a week ago. Some of these leads may have already been manually deleted. You want to skip the missing ones cleanly.
Delete all Salesforce Lead records in column A using sObject collection delete — if a record is not found, write not found to column B instead of treating it as an error. Write deleted or the specific error for all other rows.
You want to soft-delete rather than hard-delete (keep in Recycle Bin)
By default, Salesforce moves deleted records to the Recycle Bin. That is fine — you want to be able to recover if needed. The prompt above already handles this correctly, but you want to confirm.
Delete all Salesforce Lead records in column A using the standard delete endpoint (not hard delete) — records should move to the Recycle Bin — write deleted or the error to column B.
You need to delete records across multiple object types
Column A has a mix of Lead and Contact IDs. Column B already flags which object type each ID belongs to.
For each row in my workbook, delete the Salesforce record in column A — use the object type in column B (Lead or Contact) to determine which endpoint to call — process in batches of 200 and write the result to column C.
Validate IDs exist, check for any with open opportunities before deleting, delete the clean ones, and flag the ones that need review
Before deleting any lead, confirm it still exists in Salesforce. If the lead is linked to any open opportunities (unlikely but possible due to conversion quirks), flag it for human review instead of deleting. Delete the rest.
For each lead ID in column A: first confirm the record still exists in Salesforce — write not found to column B and skip if not. Check whether the lead has any associated open opportunities — write has open opps, review needed to column B and skip if so. For all remaining records, delete and write deleted to column B.
One pass validates existence, catches edge cases, and completes the delete.
Try It
Get the 7-day free trial of SheetXAI and open your duplicate record cleanup sheet, then ask it to delete every row in one batch operation. You might also explore how to export your full Salesforce contact list for CRM migration, or see the full Salesforce integration overview.
