4 Easy Ways to Export Data from Salesforce.com
Here are four easy ways for administrators and developers to export data from your salesforce.com org.
1. Data Loader #
Using Salesforce Data Loader is the most obvious solution to export data. One-off data export is quite easy, and you can also scale the process depending on how repeatable should be the export, user access to tools, and how involved is the export (volume, data hierarchy, data mapping requirements, etc.).
Get started by following instructions to download and install Data Loader. Essentially, you will -
- Download OpenJDK and install it
- Go to Setup > Integration > Data Loader in your Salesforce org. Download Data Loader
Next, hit “Export” option to export data.
- Select objects to export
- Build SOQL to query fields and relationships
- Click button to export data!
2. Use External Tools #
Use external tools built for the purpose of getting data in and out of Salesforce. A quick and easy example is dataloader.io.
- Go to dataloader.io
- Login with your salesforce org
- Click on
New Task
>Export
- Select Objects, fields and relationships
- Export. Download exported data
Dataloader also provides you additional features -
- Edit SOQL and speed up the process
- Make the process highly repeatable and run the task any number of times
The downside is the cost - Dataloader costs money for data volumes beyond 10k records.
Alternate tools -
3. Use Salesforce Developer tools #
Developer tools are especially useful for one-off/adhoc data export for quick data validations, checks and, generation of sample data :).
Workbench #
Open Workbench and login with your salesforce.com credentials. Use SOQL query option and input the SOQL query for exporting data.
We can use SOQL to export simple data structures. Workbench recommends use of REST explorer for hierarchical/related data sets.
Developer Console #
Open Developer Console in your org to run adhoc SOQL queries - independently or as part of Apex.
You can do some Chrome developer tools voodo to copy the data from developer console output.
- Inspect element on the developer console SOQL output and select element for the grid
- Copy element
- Paste in Excel
Visual Studio Code #
Connect to your Salesforce org through VSCode. See developing Salesforce in 2021 post for details.
Create any file (preferably in force-app
> main
> default
> scripts
> soql
). Input any SOQL and execute the query with SFDX: Execute SOQL Query with Selected Text
command to see output in VSCode output panel.
4. Use Integration Tools #
Use standard integration tools and Salesforce’s out-of-the-box capability to expose data through API end-points.
Use Postman #
Postman is a popular REST/web services client that can be leveraged to invoke Salesforce APIs and retrieve data. Salesforce maintains a bunch of useful examples on how to get started and use APIs on Postman.
Use any other tools to invoke API #
Any clients including cURL, Insomnia can help you invoke salesforce.com APIs and get data. The data output will be in a structured format that may require processing to convert to a “human-readable” format like CSV / Excel-format.