How to use Data Fetcher in Salesforce

How to use Data Fetcher in Salesforce

In this blog, we’ll explore the Data Fetcher tool in Salesforce and learn how to harness its capabilities within Screen Flow to retrieve records from any object using SOQL queries.

Understanding the Data Fetcher Component

The Data Fetcher is a powerful, free Lightning Web Component designed to simplify the process of querying Salesforce records within a Screen Flow. Ideal for both developers and administrators, this tool allows you to run SOQL queries directly within the flow, enabling you to retrieve a single record for use on the same screen or output a set of records.

Additionally, the Data Fetcher supports aggregate SOQL queries, allowing you to return calculated values, such as totals or averages, based on your data.

Data Fetcher is available as an AppExchange product, listed on the Salesforce AppExchange marketplace.

Steps to Install Data Fetcher

1. Install from the AppExchange:

 

  • Now, follow the installation instructions provided on the AppExchange page.
  • Select Connected Salesforce Account.
  • Click on Install in Production.
  • Confirm the install details by clicking on ‘Confirm and Install’.

  • Choose the desired option from “Install for Admins Only”, “Install for All Users”, and “Install for Specific Profiles” to decide who can use Data Fetcher.

  • After clicking on Done it will redirect to the Installed Packages in the Org, where we can check our Installed Component – Data Fetcher.

Business Scenario

Create a Screen Flow that dynamically fetches Accounts from Salesforce where the Industry is “Banking”.

1. Click on the gear icon and navigate to Set Up –> Flows

2. Click on ‘New’ and select Screen Flow.

3. Create a formula Variable

  • Click on New Resource on the Manager Pallet
  • Select Formula on the Resouce drop-down.

 

  • Provide API name.
  • Select Data Type as Text.
  • In the Formula field, enter the following SOQL query:“Select Id, Name, AccountNumber, Industry from Account where Industry = ‘Banking’ “
  • Click on Done.

Data Fetcher in Salesforce

4. Create Screen

  • Click on the Screen element from the Element Pallet.
  • Provide the label and API name for the screen properties.
  • Drag and drop ‘Data Fetcher’ on the Screen Canvas.
  • Provide an API Name for the Data Fetcher component.
  • Select the formula variable you created earlier, which contains the SOQL query.

  • Configure the desired Columns to display in the Data Table.

 

  • Click on Done.

5. Test your flow by fetching the data in Debug mode.

  • Click on debug.Data Fetcher in Salesforce

 

 

  • Run the Debug flow.

  • Choose Banking in the Industry choice and Click on Next.

Data Fetcher in Salesforce

  • Now you will see all the records of Accounts that belong to the Banking Industry.

Data Fetcher in Salesforce

Are you preparing for the Salesforce AI Certifications? Check out the Salesforce certification practice set here

FAQs

1. How do I export data from Salesforce?

Salesforce has a built-in feature for exporting data in CSV format. To use it, navigate to Setup > Data Management > Data Export > Export Data then, choose the objects and fields you wish to export.

2. What is a data loader in Salesforce?

Data Loader is a powerful tool from Salesforce that helps move large amounts of data between Salesforce and other systems. It’s often used for tasks like importing data (such as accounts, contacts, leads, and custom objects) into Salesforce, exporting data for reports or backups, updating existing records, and deleting data from Salesforce.

3. What is Salesforce SQL called?

SOQL is a useful tool for pulling the data you need, It is like SQL to search data in Salesforce. It helps you get, update, or delete information from Salesforce objects and fields.

Conclusion

Data Fetcher is a valuable tool that empowers you to leverage SOQL within Salesforce Screen Flows. It simplifies querying data and displaying it dynamically based on user input or flow logic. This blog provided a step-by-step guide on installing and using Data Fetcher, along with a practical example of how to retrieve specific Account records. Data Fetcher offers flexibility for single records, record lists, and even calculations using aggregate SOQL queries.

Get a complete Roadmap To Learn Salesforce Admin And Development

Share Now

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *