#salesforce
#trailhead
#salestraining
#salesforcetrailhead
Quick Start: Create HTTP Callouts with Flow Builder: • Quick Start: Create HTTP Callouts wit...
Create the External Credential
From Setup, enter Named in Quick Find and select Named Credentials.
Select External Credentials.
Click New.
For Label, enter Animals API External.
For Name, enter Animals_API_External.
Set Authentication Protocol to Custom.
Note
Usually, you need to use a standard authentication protocol. But because we created the animals list as an example data source, and it has no sensitive data, it doesn't require authentication.
Save the credential.
Under Principals, click New.
For Parameter Name, enter Animals API External.
Create Principal window with Parameter Name set to Animals API External, Sequence Number 1 and Identity Type Named Principal.
Click Save.
Create the Named Credential
Select Named Credentials.
Click New.
For Label, enter Animals API Named.
For Name, enter Animals_API_Named.
For URL, enter https://th-apex-http-callout.herokuap....
For External Credential, select Animals API External.
New Named Credential window with Label, Name, Url, and External Credential fields set as described in the preceding steps 3–6.
Click Save.
Now your flow can connect to the external data source, but we need to give users permission to send the request for the animals data.
Create a Permission Set
Users need permission to use the named credential, so you create a permission set.
In Setup, in the Quick Find box, enter Permission and then select Permission Sets.
Click New.
For Label, enter Animals API.
API Name auto-fills with Animals_API.
For Description, enter Animals API callout permissions.
Click Save.
In the Apps section, select External Credential Principal Access.
Animal API permission set with External Credential Principal Access settings displayed showing 'Animals_API_External - Animals API External' in the Enabled External Credential Principals box.
Click Edit.
Move the Animals API External option from Available External Credential Principals to Enabled External Credential Principals.
Click Save.
Assign the Permission Set
Now you assign the new permission set to users.
Click Manage Assignments.
Click Add Assignment.
Select your user.
Click Next.
Click Assign.
Well done! The credentials and permissions are all set and you are ready to build the flow. Let's tackle that next.