How to Make HTTP Callout (GET) from Salesforce Flow to Display Contact’s Current Time

Traditionally, integrating external services or APIs with Salesforce required custom code development. However, new features and functionalities introduced in the last couple of releases have revolutionized this process and now make it possible to call APIs declaratively. This, in turn, empowers admins and consultants to integrate Salesforce with external applications without having to rely on a developer.

In this blog post, we will show you how to use the “HTTP Callout” feature of Salesforce Flow to make an API call to an external system, get the information and display it on the record page.

Business Use Case

To learn how to do this, we will take a simple but useful business use case. We will make an API call to one of the service providers to get Contact's current time based on their mailing city and country.

In today’s interconnected world, businesses serve clients and customers worldwide. Sales reps and service agents often engage with customers across different time zones. By displaying the contact’s current time on their record, reps can make considerate communication decisions, avoiding untimely interruptions.

Step-by-Step Guide

Our journey will be guided by an actionable step-by-step approach, simplifying the entire process that won’t take more than 30–40 minutes to complete:

  1. Configure External Credentials: We'll explore setting up Named & External Credentials and Permission Sets in Salesforce, allowing secure access to external systems.

  2. Making the HTTP Callout: Uncover the magic of Salesforce Flows as we utilize the GET method for making HTTP callouts.

  3. API Call for Current Time: Witness the moment when we make an API call to retrieve the current time based on the contact’s mailing city and country.

  4. Displaying Timezone Information: Finally, we'll demonstrate how to elegantly display the current time, date, and timezone information on the contact’s record.

But this is just scratching the surface. Once you've understood how this works, the potential applications are only limited by your creativity and vision. Leverage these powerful technologies (Salesforce Flows, HTTP Callout, APIs) working together in perfect harmony, delivering unparalleled results for your business. So, let's dive in.

References & Useful URLs