In this blog we are going to explore practical example of making the HTTP GET callout using Salesforce Flow.
Salesforce introduced a new feature that empowers us to perform HTTP GET callouts using Flows from summer’23 release.
Salesforce utilizes HTTP callouts to interact with external systems and APIs through the HTTP protocol, enabling user to send requests and receive responses from external endpoints.
To enable HTTP callouts using Salesforce Flow, it is essential to configure the permission sets in our Salesforce org.
This permission set empowers the user to perform callouts seamlessly using Salesforce Flow.
To create a new permission set and add your user to it, follow these steps:
- Click on the ⚙ gear icon and and navigate to permission sets.
- Create a new permission set.
- Click the “Manage Assignments” button and assign your user to the newly created permission set.
Now we need to create a named credential and external credential.
A Named credential serves as a secure storage for authentication information related to an external service or endpoint.
It allows for easy access and retrieval of essential authentication details, including username, password, or OAuth token.
In this blog post we are going to make a callout to the Joke API which will give us some random jokes in the output.
As you are aware, the external credential is a compulsory field during the creation of a Named Credential.
First, we will create the external credential and then proceed with the creation of the Named credential.
To display these multiple jokes, we’ll utilize a Loop element since they constitute a collection of jokes.
Introduce a screen element that showcases the multiple user-generated joke from the API callout
Debug the Flow. If you choose ‘Multiple’ from the picklist, the API callout will generate multiple jokes.
Business use cases for initiating HTTP callouts using Salesforce Flow
- The retail company wants to showcase its real-time product inventory to customers to make their shopping experience seamless.
- The marketing team needs to analyze social media trends and how people feel about their brand.
- An event management firm wants to get weather updates for upcoming events and update event records accordingly.