A complete review of Salesforce Workbench with a detailed explanation of the features along with the simple ways to use Workbench:
Salesforce is the # 1 cloud-based CRM in the world. Salesforce always comes up with new tools for developers and users. Indeed, Salesforce has a robust architecture.
In this tutorial, we will delve into the Salesforce Workbench to familiarize ourselves with it. You will also learn about its various features, benefits, some ways to use Salesforce Workbench, how to log in to Workbench, and some FAQs on Salesforce Workbench.
Table of Contents:
Salesforce Workbench – A Complete Guide
It is a web-based tool meant for Salesforce administrators and developers. It helps them interact with your Salesforce organization or Force APIs to update insert, search, delete, and export.
In addition, it is a cloud-hosted toolkit for administering Salesforce organization with Force API. The administrators and developers perform various tasks with Salesforce Workbench, like Salesforce Object Query Language (SOQL) and Salesforce Object Search Language (SOSL), performing data loading and testing, and much more.
Features for Salesforce Workbench
Here are some of the features:
- Metadata Explorer
- Data Management Capabilities
- Metadata Deployment/Retrieval
- Rest API Explorer
- Data Security
#1) Metadata Explorer
Standard and Custom Object Metadata
You can use the Standard and Custom Object Metadata feature to access the metadata details. So, first, you choose the “Standard & Custom Object Metadata” option and then choose the SObject you want to view. Then click the Select button to view all the details.
Types and Components of Metadata
It is possible to access Metadata Types and Components details inside the Workbench.
[image source]
#2) Data Management Capabilities
Workbench provides you with quite a few data management options, such as
Modify Records
Clicking on the identification enables you to view and modify records in Workbench. Besides, navigate to the required function in the Data menu and then enter identification in the field in case you already know the identification and come from an environment outside Workbench.
Edit
Here you click and then edit single records.
Smart Lookup
It is a feature that helps you to find relevant Salesforce IDs. The Lookup accepts standard identification lookup fields or foreign external identifications to locate the related Salesforce identification with related objects and it applies for insert or upsert operations.
Delete and Purge
You delete records when you do not require them and retrieve them using the Recycle bin. However, you use the Purge feature to permanently delete the records.
Some object types are instantly deleted from organizations using the deletion. Besides, you have to ensure that the record has the undeletable property before deletion. It is done through the Describe function.
Zip File
You can directly insert, upsert, update or delete binary files by uploading a zip file, containing CSV and binary files. Examples of binary files are attachments and content.
Build SOQL with Workbench
Workbench is the topmost tool for building SOQL for non-developers for running queries from the Workbench. You can select the SOQL Query option, then select SObject and field.
You can also add a filter option with the “Filter By Result” column. Then it creates a query automatically and you click the Query button to view the result.
Suggested Reading => Free and Licensed Database Management Software Systems
#3) Metadata Deployment/Retrieval
We can retrieve the metadata component from Salesforce with the help of Workbench. Here you create a package.XML file using the component you want to retrieve.
Besides, you deploy using the Workbench. It is done through the Workbench Migration option.
In addition, you start the deployment by uploading. Create on Zip folder using Metadata and package.xml which are uploaded.
#4) Rest API Explorer
You can run Rest API through Explorer. Log in to Workbench and then use the HTTP method. Next, you change the header’s value by clicking the header button.
#5) Data Security
You can protect your data using Workbench features. These features are as follows:
CSRF (Cross-site Request Forgery) Protection:
- It is a type of protection that protects your data from hackers. Besides, it is a feature integrated with Salesforce.
- It depends on the Workbench code. The developer can change the code whenever required.
- In addition, you are advised to enable the Login CSRF protection to improve protection for the Salesforce Workbench instance. The organization determines whether the Workbench instance is used or not.
- CSRF is a technique that is the favorite of hackers who are routed via websites trusted by users. When this feature is put on, it provides an extra layer of protection to the Salesforce Workbench module.
- It offers an effective way to block malicious attacks. So, it is advised to use a default secret that cannot be guessed easily.
SSL:
It is used by default by Salesforce for connecting to Workbench. In addition, the server configuration plays an important part in the connection between Workbench and your device. When you want to implement end-to-end SSL then you must add a line to your config/overrides PHP files.
Benefits of Salesforce Workbench
Here are the benefits of Salesforce Workbench:
Data Management:
- You edit records with Salesforce Workbench by clicking on the unique ID that is provided with the query.
- It also helps you to upload a zip file. You can use this zip file to carry out insert, update, delete, and upsert binary files. In addition, the zip file is created for the binary files to reside.
- You find relevant Salesforce ID with the help of the Smart Lookup tool for updating, inserting, and deleting. It provides you with a standard or foreign ID lookup field. These lookup fields will find the Salesforce ID.
Data Extraction with Ease
- It is easy to remove information, identified by the users such as profiles and roles, and also permission sets.
How to Use Salesforce Workbench
The main purpose of Salesforce Workbench is to support the developers and the administrators in controlling Salesforce. They can perform various tasks, like SOSL Search, etc. Besides, Workbench has features that are critical for creating and maintaining web programs.
Following are some ways you can use Salesforce Workbench:
- Reset a User’s Salesforce Password
- Permits you to get and modify your chosen records.
- Get Session Information
- Settings
- Control which organizations use the Workbench instance
- Run Apex Code
- Simplify Data Extraction
- Run a SOQL Query
- Mass Record Creation
- Mass Record Updates
- Mass Record Deletion
- Undelete Records
#1) Reset a User’s Salesforce Password
It is possible to reset a user password by using Workbench for whatever purpose is chosen by you. The situation arises only when you have an issue with a user and also the Forgot Password functionality or some incomplete security question.
In addition, there are five steps by which you reset your password by using Workbench, helping the user to log in.
The steps are:
- Log in to Workbench.
- Then click “Utilities”.
- Next, click “Password Management”.
[image source]
Enter the user’s ID, and new Password, and also ensure the new password.
Then click “Change Password” and educate the user about their new password. It’s best to instruct them on resetting their password and security questions once they log in.
#2) Permits you to get and modify your chosen records
You obtain or modify any data records by using this feature. There is no retrieve tab in Workbench. So, an URL must be submitted to view the page. You view all the details related to the record.
The update option is placed on the retrieved page. Users can use this option to manually alter or reset the values of the existing data fields of the records.
#3) Get Session Information
Administrators have permission to terminate or cancel other user sessions. You can view the current user session by clicking the Session tab.
In addition, you obtain information, like valid connection mode or user details, like full name, email, etc.
#4) Settings
The Salesforce Workbench admins can directly access the config.php file and can make required changes to settings with the config.php file.
#5) Control which orgs use the Workbench instance
It is achievable through the Blacklist and Whitelist properties of Workbench. You have to browse through the config/overrides .php file and include or delete the orgs by following some directions.
#6) Run Apex Code
SOQL Queries can also be used to create fresh objects. These objects have null values for starting and then assigned values.
#7) Extract Data in a Simple Way
Workbench offers a simpler and easier alternative to Data Loader. Here are the steps to extract data easily:
- First, log in to Workbench and then go to the Inquiries tab.
- Select a SOQL Query and then select object names in the options list. Then select ‘PermissionSet Assignment’.
- Select the Required field for recorded things.
- Set “Mass CSV” in place of “Rundown”.
- Generate permission set by clicking on the “Question” link.
#8) Run a SOQL Query
SOQL enables you to search for your company’s data for certain data and fetch it programmatically. Workbench makes your task of handling SOQL much easier since it provides a “Builder” for building your query.
Besides, you can use SOQL Queries. For extracting Salesforce data, create a query on fields of all the leads that reside in the Recycle bin.
Log in to Workbench ID -> Select Queries tab -> Click “SOQL Queries” -> Select the Object to be queried -> The Builder populates all fields in the “Fields Section”-> Use the Filter Results for filtering -> Control How to display the results with ” View As” sections -> Click “Query”.
Then See or Download the results:
#9) Mass Record Creation
The steps for mass record creation are similar to mass record updation. You first create a CSV file containing all the new records that you intend to create. Besides, you must ensure the correctness of picklist values and the inclusion of all required fields.
Here, after logging in to Workbench ID -> Select Data – Insert -> then select “Single Record” or “From File”. Finally, you map the fields (map the record IDs you like to update, for many records.)
#10) Mass Record Updates
It is easy to carry out mass record updates using Workbench. The first step is to create a CSV and there is a column containing the record ID and also one column for a field/fields you like to update.
Here, log in to Workbench -> select Data-Update -> select “Single Record” or “From File”. Finally, you map the fields (map the record IDs you like to update, for many records)
#11) Mass Record Deletion
The mass record deletion in Salesforce works for only 250 records at a time. But, not so for Workbench.
Firstly, you create a report based on all Salesforce records that you would like to delete. In fact, it is advisable to back up any records wanted by you with a complete report. However, the report is saved outside Salesforce.
Here you Login to Workbench -> then select Data -> Delete -> then Select “Single Record” or “From File”, now Map the ID field, and carry out with the deletion.
#12) Undelete Records
It is best to know the process of undeleting records in the reverse way. You can report on records that you have that are deleted with a SOQL query. You only need the ID column on the CSV containing the records to be undeleted.
Besides, the 15-day Recycle Bin rule is still considered by Workbench. So, nothing can be undeleted past this time, those which are permanently deleted.
Here also Log in to Workbench, select Data -> Undelete then Select “Single Record” or “From File”, now Map the ID field, and carry out the deletion.
Please take a look at this video to find how to use Salesforce Workbench:
Some More Ways of Using Workbench
SOSL Search: It is possible to perform searches using SOSL (Salesforce Object Search Language) similar to SOQL queries.
Retrieve Source Code: It applies to objects, custom applications, and components (Lighting Web 0000Components).
Async SOQL Query: They can search through large datasets, (inclusive of external objects and BigObjects) and these queries run from behind.
How to Login to Workbench
There are many ways to login into Workbench and some of the common methods are:
- Combine username and password
- Login remotely by using OAuth 2.0
- Use Sessions credentials.
What are the steps to Login?
#1) Login into Workbench with your Salesforce credentials.
#2) Select your Working environment.
[image source]
#3) Give consent to the standard terms and conditions.
#4) Select Login with Salesforce
#5) After the completion of the login, you navigate to the various objects included in the list.
Besides, OAuth enables you to log into Salesforce Workbench without any username or password. In addition, you just use a button click of Workbench’s Firefox applications to transfer user sessions from Salesforce to Workbench.
Moreover, Workbench offers two types of environments – Sandbox and Production. Just select any one out of them. Finally, if you want to choose Workbench’s Developer Edition, then ideally you choose the Production environment.
Frequently Asked Questions
The primary purpose of this free, web-based tool is Data Management. Besides, it offers an interface to the developers and administrators with a functional user experience for working with Salesforce data.
It helps you in the insertion, updation, and export of data, quickly and easily. You can use up to 5 million records.
The disadvantages are:
It cannot save and reuse the data load mapping similar to Data Loader.
It cannot execute command line actions also known as scheduled actions, like Data Loader.
The differences are:
Workbench offers solid support for the Metadata, Force.com partner, Rest, Apex APIs, etc. It allows you to query, manipulate, describe, and migrate metadata and data in Salesforce.com organizations. It is done directly with a web browser and a user interface that is simple and intuitive.
Besides, it offers plenty of advanced-level features for troubleshooting and testing the Force.com APIs like debug logs used for API traffic, custom SOAP headers, etc.
On the other hand, Data Loader is easy to use, graphical tool, that helps you to put data into Salesforce objects. In addition, it can be used to carry out deletions in bulk by exporting the IDs of the fields to be deleted. Then you use that source to state the deletions.
It requires the Forcs.com APIs. So, you can use the Setup Menu for downloading the Data Loader for Salesforce editions which allow the API usage, like Enterprise, Developer, and Unlimited Editions.
Finally, in case of updating one or two records in Data Loader, we must export the .CSV file, then modify and load the Excel file. However, for Workbench we update only a single record, and only the 15-digit Unique ID is all that is required.
It is supported through SFDC documentation but is not an officially supported app.
The maximum value is 200 and the recommended value must lie between 50 and 100. When you select the Use Bulk API, the maximum value is 10,000.
It uses the Force.com APIs.
The batch size is determined at the onset of the process. The Workbench tries to use the correct-sized files, without crossing any batch size limit.
Yes, you can create a Database Schema by opening the MySQL Workbench, as an administrator.
You select the GET method and then enter Custom API in the URL -> Add Case ID and -> click the Execute button.
The password is reset by System Admins by using the Utilities Menu option and then choosing Password Management.
Conclusion
We conclude by saying that Salesforce Workbench helps you to perform various activities that are not possible through other APIs. It is quite simple to use and enables you to reach the next level in terms of performance.
Moreover, it is a web-based tool that is highly appreciated by Administrators for its increased record limit compared to the Salesforce Data Import wizard. Also, it is free and offers many more Data Management capabilities.