
In this article, we will be discussing one of the core components of Salesforce, workbench. We will discuss the definition of workbench, its features, and why a company offering Salesforce consulting services utilize this feature.
What is Workbench?
Workbench is a web based tool that helps with data loading in Salesforce. It is one of the most powerful tools that assist Salesforce administrators and developers in interacting with Salesforce.
Workbench is not just a data loading tool, it is also a handy tool to deploy and retrieve and supports rest explorer and apex execute actions as well. Built on JavaScript and PHP, Workbench is an advanced tool supporting more than five million records for data manipulation.
Features of Workbench
- It has a simplified user interface. Hence, it is easy to use and understand.
- It can perform many functions apart from data loading like deployment, SOQL query, SOSL function, migration, apex execute actions etc.
- It can help in accessing data and structural info of all Salesforce objects.
- It is neither a Salesforce product nor supported by Salesforce. For any issues, open-source communities must be referred to.
Understanding Workbench
You can search for workbench Salesforce on google or go to https://workbench.developerforce.com/login.php.
The selection of environment and allowing access is similar in all the data loading tools.
Environment
You will have two options to choose from- production and sandbox.
- Production refers to the actual Salesforce org. When we log into Salesforce through login.salesforce.com.
- Sandbox is a copy of the salesforce production environment. It allows you to test configurations and automations set up without affecting the data in the actual salesforce org. You log into Salesforce through test.salesforce.com.
We will discuss more on production and sandbox environments in the deployment chapter. With the free developer edition, you cannot access the sandbox environment.
Hence, select production, then check the box to agree to terms of service, and click on login with Salesforce.
You will have to establish the connection between workbench and your salesforce org for data loading in Salesforce. Click on allow to establish the connection.
Data loading operations performed by Workbench
- Insert– Insert means import data from an external source to Salesforce
- Update– Update the existing data present in Salesforce
- Upsert- Update and insert data simultaneously in Salesforce
- Delete- Move the existing salesforce data to recycle bin
- Undelete– Restore the records from the recycle bin to Salesforce org.
- Purge- Purge means hard delete. It permanently deletes the data from Salesforce org.
There is no separate option to export data using workbench. But, the export operation is the most frequently used operation of data loading in Salesforce. Let us see how we can use workbench to export data from Salesforce.
Before learning to export records using Salesforce, let us understand a small concept.
SOQL query
SOQL stands for Salesforce Object Query Language. It helps in searching the Salesforce’s database for specific information or records. Writing SOQL queries is something we will discuss in the development part.
Workbench allows you to write SOQL queries to fetch records from Salesforce. One advantage of using workbench is you can write queries without actually writing queries. Similar to Salesforce formula functions, you can select options, and Workbench will write queries for you automatically.
Let us write a query to fetch the records in the lead object.
- Go to Workbench website and login into your Salesforce org.
- Click on queries and select SOQL query from the drop-down.
Object- select lead object.
In the fields section, press CTRL and select the fields- name, ID, city, email and status.
Observe the query box. Workbench writes the query automatically.
- Click on query button.
- Workbench will fetch you the list of lead records with the mentioned field.
- You can also fetch specific records using queries.
- Use the ‘filter result by’ option of SOQL query.
Filter result by-
Field- Select Name: Operator- Select =: -Test
- Click on query
- You will be able to view only the record named Test.
This is how SOQL query in workbench helps you fetch records.
I hope you are clear with the SOQL query. Let us now learn how to export records using SOQL query in Workbench.
Requirement- The business wants to export all the records of the lead object.
How to export Salesforce records using workbench?
- Go to workbench website and login into your salesforce org.
- Click on queries and select SOQL query from the drop-down.
- Object- select lead object.
- Click on Bulk CSV. It will help you export records in a .csv file.
- In the fields section, press CTRL and select multiple fields like city, country, email, Id, first name, last name.
- Observe the query box. Workbench writes the query automatically.
- Click on the query button.
- Press the download icon.
- You can open the .csv file with excel.
This is how by using SOQL query, you can export records in Workbench.
As you can see, why workbench is considered one of the core components of Salesforce, and has important role to play in the background. We have discussed the features of this platform, and how it can be used to create different functions. The experts of a Salesforce consultation services can help with organizing and establishing the workbench. If you need any help with setting the platform, you should consult with a Salesforce expert.