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 makes 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.
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.
Our journey will be guided by an actionable step-by-step approach, simplifying the entire process and won’t take more than 30-40 minutes to complete:
- Configure External Credentials: We’ll explore setting up Named & External Credentials and Permission Sets in Salesforce, allowing secure access to external systems.
- Making the HTTP Callout: Uncover the magic of Salesforce Flows as we utilize the GET method for making HTTP callouts.
- 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.
- 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.
NOTE: Certain sections of the guide will appear as locked in the free preview. You can download the unlocked version of the guide in PDF format by subscribing to our “All Access” Pass through the link below.
Introducing Mastering Salesforce Flows Training Course
Liked this post? We are now offering a complete self-paced, video-based training course on Mastering Salesforce Flows. The course comes with downloadable step-by-step PDF guides, unlimited access, free upgrades, community discussion area, free preview and more. For more details, please click here.
Need Help with Flows?
Need advice on Flows? I also offer advisory & consulting services on Salesforce Flows. So, whether you want to create new Flows or migrate existing automations (Workflow Rules, Process Builder, Triggers) to Flows, I can help you analyze, design, plan & review. To initiate a discussion, please submit the contact form here stating your requirement or schedule a discussion at this URL.
References & Useful URLs
- Salesforce Help Article – HTTP Callout
I can see Abstract has a limit of 5.000 requests, however it does not specify if it’s per month or annually? How can we find out? How can identify the usage on the contact object?
Hi Alex, you will need to reach out to Abstract API’s support for these answers. You can reach out to them through URL https://app.abstractapi.com/api/timezone/support
Hello, Would like to change the Date format from YYYY/MM/DD to DD/MM/YYYY. How can this be accomplished?
Hi Alex, for the resource currentDate, you can use the following formula to get date in DD/MM/YYYY format
MID({!Get_Current_Time.2XX.z0datetime}, 9, 2) + "/" + MID({!Get_Current_Time.2XX.z0datetime}, 6, 2) + "/" + LEFT({!Get_Current_Time.2XX.z0datetime}, 4)
This is a great tutorial. I’m struggling because i used Basic Auth and not an API Key. It would be great to see examples of both.
Hi Jacquealine, we are in the process of creating step by step guides and a training course on all the different authentication protocols supported in External Credentials. We have already created guides on the following authentication protocols
1. Step by Step Guide to OAuth External Credential with Browser Flow (Per User Principal) & Google
2. Step by Step Guide to OAuth External Credential with JWT Bearer Flow & Google Service Account
We do have plans to add a step-by-step guide on “Basic Authentication” protocol. Please stay tuned for further updates on this.
Need for pdf materials
Hi Midhan,
Please note that downloading of guides in PDF format requires subscription of the “All Access” Pass. Complete details about this pass is available at URL https://www.asagarwal.com/all-access-pass/. Please take a look and let me know if you need any further information/clarification.