Thursday, 18 February 2021

Overview of Workbench in Salesforce


Recently, working on one of the Networking domain project for our client based out in Louisville, Colorado, USA, utilized workbench with Salesforce to test out REST APIs, where Salesforce accepts order data from the third-party application.

Hence Workbench tool is very helpful, here on introductory blog, I am going to explain how we can utilize Workbench with Salesforce. Workbench with Salesforce is a versatile web-based tool developed for Salesforce administrators and developers to communicate with by APIs.  

Using the Workbench with Salesforce platform, one can efficiently execute Salesforce Object Query Language (SOQL) and Salesforce Object Search Language (SOSL), access organization's records, perform data loading, data manipulation, and data migration, testing, deploy and troubleshoot any applications, and configure session settings, testing of REST APIs with Raw Response and Asynchronous Methods. 


In order, to connect Workbench with your Salesforce Org, go to the below website, 

For the next course of action, refer to the below image, 


Note: You can select Production as Environment, if you are working in Developer Edition.


Once you click on the Login with Salesforce button you will navigate to the Salesforce login page. Enter your username and password of your Salesforce instance and click Log In. 



After login successfully into Workbench Salesforce, it allows you to Jump to different options like Standard & Custom Objects, Metadata Types and Components, SOQL Query, SOSL Search, Insert, Update, Upsert, Delete, Undelete, Purge, Deploy, Retrieve, and many more. 


On the top menu bar, you will see five different sections, info, queries, data, migration, utilities. 

1. Info section as the name itself suggests, will provide information about all features there are in Salesforce. For example, Standard & Custom Object, Apex Class & Triggers, Permission sets & Profiles, Workflows & Processes, and so on.
  • The users can view all the information on any Standard and Custom object. The detail of object display on the screen contains Attributes of the object detail like searchable, custom or standard object, Child Relationships which provides the information on all the child objects, List of Fields and its details, Record Type Info which provides a list of Record Types of the selected object and its detail, and Supported Scopes for an object like Account teams, my territory’s, etc. 

  • Metadata Types & Components feature is used to display the description and components of a list of metadata types such as Permission Sets, Queue, Apex Class, Apex Page, Apex Trigger Workflow, etc. 

  • Session Information feature will show the current user session details. It displays details about current user sessions like Connection, Accessibility mode, profileId, Session seconds valid, user Email, user FullNameUserLocaleUserType, and many more. Only the System Administrator can end or cancel any other session present in Salesforce Workbench.

2. Queries section permits a user to perform SOQL Query, Async SOQL question, SOSL search, and Streaming Push Topics which assists with questioning the items and get the information from the associated salesforce organization.
  • Users can provide inputs such as Object to query. There is also a feature Sort and Filter which is used to sort the data ascending or descending and to filter the data. 
  • Workbench will develop the Query based on the object, fields, and the rest of the parameters selected. 
  • Workbench will render the Query Results in the form of the ListView, Matrix view, etc. selected in ‘View As’. There will be two other options to view results such as Bulk CSV and Bulk XML.

3. Data section allows you to perform DML operations such as Insert, Update, Upsert, Delete, Undelete, Purge on any desired Object from your Salesforce Instance. Workbench provides two ways to perform all these operations. One is to insert one record at a time. The second is to upload a CSV file for data in bulk.