Mass Data Operations Using Salesforce Workbench

In my Salesforce org, I frequently handle bulk data tasks such as importing new records, exporting existing data, updating multiple records, and deleting outdated entries. While there are multiple tools available, Salesforce Workbench is one of the simplest and most efficient browser-based tools for these operations.

In this tutorial, I will explain how to use Workbench to import, export, update, and delete data. It’s perfect for admins, developers, or anyone managing Salesforce data.

What is Salesforce Workbench?

In Salesforce, the Workbench is a web-based tool that you can access by logging in with your Salesforce account credentials. Unlike the Salesforce data loader, you don’t need to install the Workbench. It allows users to insert, update, export, and delete data in bulk with a limit of 5 million records in a single data operation.

Beyond the standard data operations, Workbench provides tools for testing REST and SOAP APIs. It also provides debugging tools to help troubleshoot issues with Apex code, workflows, and other Salesforce features.

Let’s see how we can perform bulk data operations such as insert, update, export, delete, and undelete using the Salesforce Workbench.

Log in to Salesforce Workbench

To use the workbench, we don’t need to create an account for the workbench. We need to log in with Salesforce account credentials.

Navigate to the Salesforce Workbench login window.

In the setup window of the workbench, we have to select the environment. With this, you can choose whether you want to perform data operations in Production or Sandbox.

After this, select the API version compatible with the version of your Salesforce org and check the box “I agree to the terms of service.

At last, click on the button Login with Salesforce.

Insert records using Salesforce Workbench

In the next window, you must enter the Salesforce account credentials. After this, you will be able to navigate to the Salesforce workbench setup.

Mass Insert Records Using Salesforce Workbench

To perform mass insertion of records in Salesforce using Workbench, log in to Salesforce Workbench and follow the steps below. In this example, we will insert the account records using the Workbench.

  1. For bulk data insertion, we need to create a CSV file with the details of the Account records. Below is the preview of the CSV file that I have used to insert account records.

Make sure to insert the required fields of object record in the CSV file.

Create CSV for data operation in Salesforce workbench
  1. In the setup of Salesforce Workbench, click on the data tab and select Insert.
Mass data insert using Salesforce Workbench
  1. In the Object type select the Account object. Then select the radio button From File. After this click on button Choose file and upload the CSV file that we have created.

After uploading the CSV file, click on the Next button.

Insert data in Bulk using Salesforce Workbench
  1. In this step, you have to map the object fields withe CSV header columns. After setting the mapping of the field values, click on teh Map fields button.
Use Salesforce Workbench to insert records
  1. In the next window, you will see the preview of the mapped fields. Here, click on the Confirm Insert button to proceed.
Salesforce Workbench bulk data insert

After successful data insertion, it will display the status of all the inserted records.

Data insertion using Workbench in Salesforce

This way, we can perform mass data insertion using the Salesforce Workbench.

Mass Export Records Using Salesforce Workbench

In Salesforce Workbench, there is no direct method to export the date. In the data tab, there is no option to export the data.

To import the data, we need to run the SOQL query. Then the records returned by the SOQL query can be downloaded as a CSV file.

For example, we have to update the accounts that we have inserted right now. To update the records we need the ID of the accounts that we want to update. For that we can export those records with their IDs using the export operation.

In this data export operation, we will export the account records with the fields ID, Name, and Type.

  1. On the setup of Salesforce Workbench, click on the queries tab and select SOQL query.
Export data using Salesforce Workbench
  1. First, select the object, and here we have selected the Account object. After this, select the radio button Bulk CSV.

To generate the SOQL query, select the Fields, and here we can also apply filters to the SOQL query.

In this example, I have applied filters to return records that were created on 22 May. After selecting the fields and applying a filter, click Query button.

Export Bulk data using Salesforce Workbench
  1. In this window, you will see the status of exported data. To get the exported data, we need to download it.

Go to the Batches section and click on the download icon. The exported data will be downloaded as a CSV file as soon as you click on it.

Data export using Salesforce workbench

Below is the preview of the data we exported in a CSV file.

Export data in CSV using Salesforce workbench

This way, we can export data in Salesforce Workbench using the SOQL queries.

Mass Update Records Using Salesforce Workbench

To mass update the records using the Salesforce Workbench, we need to have the CSV with the data that we want to update. In that CSV, we must have the ID of the records.

In the above export operation, we exported records with ID, Name, and Type. Using that CSV, we will update the Account records Type values.

Preview of updated CSV:

Mass update data in Salesforce Workbench

Now, follow the steps below to update the Account records.

  1. In the setup window of Salesforce Workbench, click on the Data tab and select Update.
Bulk Update Salesforce data using Workbench
  1. In this step, select the object as Account. After this, select the From file” radio button and upload the CSV file.

After uploading the file, click the Next button.

Salesforce Workbench mass data update
  1. Now, map the object fields with the CSV header column. Ensure to map the ID, required fields, and the field that you want to update.

After mapping the fields, click on the button Map fields.

Map fields in Salesforce Workbench
  1. This window shows a preview of the field mappings. To proceed, click the Confirm Update button.
Salesforce Workbench Update Records in bulk

On successful data update, it will display the Status as Updated and Result as Success.

Update Records using Salesforce Workbench

This way, we can update the records in bulk using Salesforce Workbench.

Mass Delete Records Using Salesforce Workbench

To perform the delete operation using the Salesforce workbench, we only need the ID of the object records. To get the ID, you can run a data export operation for that specific object.

In this delete operation, I will use the CSV file from the above data export operation. With this, we will delete the account records that we have created.

Below is the preview of the CSV file:

Delete data using Salesforce Workbench

Here, I have included the Name column for reference, else we only need the record IDs.

Now, follow the steps below to delete the records.

  1. In the Workbench setup window, click on the data tab and select Delete.
Mass delete data using Salesforce Workbench
  1. In the options to perform the delete operation, select “From File” and select the CSV file. After uploading the CSV file, click Next.
Salesforce Workbench Mass delete data
  1. In the delete operations, we only need to map the ID. After mapping the ID, click on the Map Fields button.
Delete Salesforce records in bulk using Workbench
  1. To delete the records, we have the option to hard delete the records or to process a delete operation asynchronously via the BULK API.

The records will not go to the recycle bin in a hard delete. Instead, they will be removed from the org. I suggest selecting the asynchronous delete so that you can retrieve the data from the recycle bin when required.

After selecting the asynchronous delete, select the object and click the Confirm Delete button.

Hard Delete records using Salesforce Workbench

On successful deletion of records, it will display all records as Processed and zero fails.

Delete records using Salesforce Workbench

We can also view the deleted records in the Salesforce Recycle bin. To do so, go to Salesforce setup -> App Launcher -> Recycle bin.

Here, we can see the deleted account records.

Bulk Delete Recods using Salesforce Workbench

This way, we can mass delete records in Salesforce using the Workbench.

Undelete Records Using Salesforce Workbench

To undelete the records using Salesforce Workbench, we need the ID of the deleted records. In the undelete operation, we can undelete only those records in the Salesforce recycle bin.

The Recycle Bin has a retention period of 15 days, meaning any records stored in it are permanently deleted after 15 days. This period extends to 30 days when you enable the “Extended Recycle Bin Retention” feature on Salesforce Classic.

First, we need to export the deleted records with their IDs, and for that, follow the steps below.

  1. On the setup page of the Workbench, click on the queries tab and select SOQL query
Undelete data using Salesforce Workbench
  1. Select the object (Account) and View as List. After this, in the Deleted and archives records, select Include.
Bulk Undelete data using Workbench

In this export, we have selected a List as a view because Bulk CSV is not supported for deleted and archived records. It will show the error below:

Bulk CSV export for deleted records in Salesforce workbench
  1. In this SOQL query, I have selected the ID field of the account and the Name for reference. To filter only deleted records, I have applied the filter condition ‘IsDeleted’ = True.

To filter the records deleted on a specific date, I have added a filter condition LastModifiedDate. The final SOQL query will look like:

SELECT Id,Name FROM Account WHERE IsDeleted = TRUE AND DAY_ONLY(LastModifiedDate) = 2025-05-23

The LastModifiedDate is a DateTime field, so to extract the date out of it we have defined it as DAY_ONLY(LastModifiedDate).

SOQL query to export deleted records in Salesforce Workbench

After entering the query with the applied filter, click on the Query button.

  1. Now, we will get the queried results in the list.
Salesforce Workbench Undelete Records
  1. We need these records in the CSV file, and for that, we need to copy the list and paste it into a CSV file.

CSV file preview:

Restore deleted records with Salesforce Workbench

With this, we got the IDs of the records that we need to restore or Undelete. For this we will perform the Undelete operation.

  1. In the data tab, select the option Undelete.
Salesforce workbench Undelete operation
  1. Select the option “From file” and upload the CSV file that we have created from the list data. After this, click Next to proceed.
Undelete records using Salesforce workbench
  1. Map the Id fields of the object and the CSV file, then click on the Map Fields button.
Restore deleted records in Salesforce Workbench

In the next window, you will see the preview of field mapping. Here, click on the Confirm Undelete button.

After a successful restoration of the records with an undelete operation, you will see the results with a success status.

Salesforce Workbench bulk undelete records

This way, we can undelete the data in Salesforce using Workbench.

I hope you now understand how to use Salesforce Workbench for bulk data operations like insert, update, export, delete, and undelete. Using a workbench can save you a lot of time while working on large data operations in your organization.

You may also like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.