Create a New Named Credential
In this step, you create a Named Credential record that let's Salesforce access the SlapFive API.
Last updated
In this step, you create a Named Credential record that let's Salesforce access the SlapFive API.
This configuration:
Stores the SlapFive API key securely using an External Credential
Injects the API key into requests via a custom HTTP header
Avoids hard-coding secrets in Apex, metadata, or logs
In Salesforce Setup, navigate to External Credentials
Click New External Credential
Use the following values:
Label: SlapFive External API
Name: SlapFiveExternalAPI
Authentication Protocol: Custom
Save the record.
From the External Credential record, create a new Principal
Use the following values:
Parameter Name (Label): SlapFive API Key
Sequence Number: 1
Identity Type: Named Principal
Under Authentication Parameters, add a new parameter:
Name: APIKey
Value: Paste your SlapFive API key here
On the same External Credential, add a Custom Header:
Header Name: api-authorization
Value:
Sequence Number: 1
This injects the encrypted API key into every request at runtime.
In Salesforce Setup, navigate to Named Credentials
Click New Named Credential
Use the following values:
Label: SlapFive API
Name: SlapFive_API
URL: enter the base URL of your SlapFive instance, which is: https://your_company_name.slapfive.com.
External Credential: SlapFive External API
Generate Authorization Header: Checked
Allow Formulas in HTTP Header: Checked
Allowed Namespaces for Callouts: slap5
Save the record.
Users who need access to the SlapFive App must be granted access to the External Credential Principal. This must be added to every Permission Set that will be assigned to end users, including any cloned copies of the SlapFive managed Permission Set — clones do not inherit External Credential Principal Access automatically.
In Salesforce Setup, navigate to Permission Sets
Open the Permission Set assigned to your end users (e.g. your cloned SlapFive Permission Set)
Click Object Settings → User External Credentials, click Edit, enable Read access and click Save.
Click the Permission Set Overview breadcrumb to go back to the main screen for this Permission Set
Click External Credential Principal Access, click Edit and move SlapFive External API - SlapFive API Key to the Enabled list and click Save
Repeat for any additional Permission Sets whose users need SlapFive access
Users that belong to restricted custom Profiles must have the API Enabled permission active on their Profile. Without it, Salesforce will block the callouts that the SlapFive component makes, even if their Permission Set is correctly configured.
In Salesforce Setup, navigate to Profiles
Open the Profile assigned to your end users (e.g. Marketing User)
Search for API Enabled in the profile settings
Ensure it is checked
Click Save
Repeat for any additional Profiles whose users need SlapFive access
⚠️ Note: If end users see the error "Error retrieving client data: You don't have read permissions on the User external credential object", the most likely causes are that Step 5 was not completed for their Permission Set, or that Step 6 was not completed for their Profile.
Last updated
{!$Credential.SlapFiveExternalAPI.APIKey}