DEV Community

Richard C
Richard C

Posted on Edited on AI-assisted

How to check that a Salesforce Data Export is complete before you migrate

AI-Assisted

By Richard C, AIL Studio

Count formulas were tested in LibreOffice Calc 25.2, not in Google Sheets, Excel or a Salesforce org.

A weekly or monthly Data Export, or a Data Loader extract, is often the file set you will migrate from. A finished job is not the same as a complete file set. You can be missing a zip, an object, the physical attachments, or a few hundred rows, and only notice after the target load.

This walkthrough checks whether every archive downloaded, the expected objects and files arrived, and CSV row counts match a SOQL COUNT() run with comparable filters. It does not check wrong-parent Contacts, and it does not group Data Loader import errors.

1. Download every archive before it disappears

Salesforce’s Data Export FAQ (publish date Aug 17, 2026) says export files are available for 48 hours after completion. They are also removed as soon as a new Data Export is queued, even inside that window, and once gone they cannot be recovered by you or by Support.

Large orgs produce more than one zip. Each archive “can be up to 512 MB (approximately)”; bigger exports generate multiple files, and a zip well above that size can hold one large uploaded file (up to 2 GB). Count the listed zips against what you saved. There is a 60-second wait between downloads; fetching too quickly can return HTTP 429.

The user who scheduled the export receives the ready-to-download email, and that address cannot be changed. There is no completion SLA; a request “may be expected… to take longer than a week.” Data added while the export is already running is not included.

Do not treat a sandbox schedule as a backup. The FAQ says it is “expected behavior for it to never actually process.” Help 000381137 (publish date Jul 7, 2026) states the same limit: “The Data Export is not available in your Sandbox org.”

2. Confirm objects and files, not only a zip sitting on disk

The FAQ’s answer to “Why do I see fewer files than expected in my download?” is that you may not have selected all objects, or you may have left off Include images, documents, and attachments and Include Salesforce Files and Salesforce CRM Content document versions.

List every object you plan to migrate, then tick the matching CSV in each zip. A missing Account.csv or Contact.csv is a completeness failure even if the email arrived. Two documented gaps also surprise people later: formula and roll-up summary fields “are always excluded from exports,” and Recycle Bin data is not included. Archived records are included in the Data Export service.

If you need the physical files, use Data Export rather than Data Loader. Help 000381137 says Data Loader “doesn’t obtain the physical files you’re attempting to back up”; it writes CSV metadata. Data Export can download attachments, images and documents as well as the CSVs. The Data Loader export guide repeats that Data Loader “does not support exporting attachments” and points you to the weekly export feature.

After a weekly export, Chatter, content and feed attachments may still not look like the originals. Help 000386370 (publish date May 21, 2026) says those records are exported in MIME format and “named after the record ID (starting with 068) and not the original name of the file.” They need converting before you open them; a folder of 068… MIME files is expected. If you export ContentDocument through Data Loader instead, without the Query All Files permission you only get files you own or that are shared directly with you.

3. Compare each CSV to a SOQL count

A zip can be present and still short on rows. Compare each object’s file to a SOQL COUNT() query. COUNT() “returns the number of rows that match the filtering conditions” and must be the only item in the SELECT list:

SELECT COUNT() FROM Account
SELECT COUNT() FROM Contact
Enter fullscreen mode Exit fullscreen mode

Run the queries as a user who can see the same records as the export. Data Loader’s guide says that with no extra conditions, “all the data to which you have read access is returned.” An extract run by a user who cannot see every Account will be smaller than an admin COUNT().

Match the export mode to the query. Data Loader Export is the default; Export All also exports “archived activity records and soft-deleted records.” A weekly Data Export includes archived records but not Recycle Bin rows. If those choices differ, the counts will differ for a documented reason.

Count data rows outside Excel when the file may be large. Help 000386983 (publish date May 4, 2026) notes that a Data Export CSV can exceed Excel’s limit of approximately 1,048,576 rows. Trusting Excel’s last row number can hide the remainder.

For Data Loader extracts, keep encoding consistent. Help 000387201 (publish date Apr 2, 2026) recommends leaving Write all CSVs with UTF-8 encoding enabled so exports keep special characters, and warns that Excel on Windows often saves CSV files as ANSI.

4. Example data: a three-object completeness sheet

Example data (not a customer org, and not the result of a real export). The counts below are invented. On a Check sheet, put Object, SOQL COUNT(), CSV data rows, Difference and Status in row 1. Enter the query result in column B and the file’s data-row count (no header) in column C. In D2 and E2, then fill down:

=IF(OR(B2="",C2=""),"",C2-B2)
=IF(A2="","",IF(OR(B2="",C2=""),"Enter both counts",IF(C2-B2=0,"Match","Review")))
Enter fullscreen mode Exit fullscreen mode
Object SOQL COUNT() CSV data rows Difference Status
Account 150 150 0 Match
Contact 400 397 -3 Review
Opportunity 80 80 0 Match

In LibreOffice Calc 25.2 those formulas produced the Status values above, and a blank object name left Status blank. =COUNTA(SampleCsv!A:A)-1 returned 2 for a two-row example file with a header row. The Contact row is the point: the zip arrived, Contact.csv exists, and the count is still short. Check a filter, a sharing limit or an unfinished download before you migrate from that file.

5. What a matching count does not prove

A matching COUNT() means the file has that many rows. It does not mean formula or roll-up columns are present, that attachments arrived as openable files, or that each Contact points at the right Account. After you have complete Contact and Account files, you can still review orphans, duplicate External IDs and parent keys separately. Before you share any export outside your team, for a review or anything else, send only the objects and columns the reviewer needs. Remove or blank personal fields you don't need, such as personal emails, phone numbers, home addresses and birthdates, and never include passwords or org logins.

AIL Studio is not affiliated with or endorsed by Salesforce, Inc. Salesforce is a trademark of Salesforce, Inc.

If you want a second pair of eyes on Contact and Account exports (CSV or Excel, up to 25,000 rows per file), there's a $19 Salesforce Export Check; the product page explains what's included and how to send the files.

Top comments (0)