You are here:
Connect the External Search Service to Your Salesforce Org
Create authenticated callout configuration and identify the active AWS search provider for your Salesforce org.
Required Editions
| User Permissions Needed | |
|---|---|
| To create named credentials and custom settings: | Customize Application |
Before you begin, record the gateway API invoke URL and operation path.
See Also
Create a Named Credential
Secure and simplify authenticated API callouts to your Amazon S3 buckets by defining a named credential. To simplify the setup of authenticated callouts, create an external credential to specify an authentication protocol and then specify a named credential as the callout endpoint.
-
Create an external credential and its principal to specify details of how Salesforce
authenticates callouts to resources in Amazon Web Services over HTTP by using the AWS
Signature v4 protocol.
For higher security, we recommend that you use STS. See Create or Edit an AWS Signature v4 External Credential.
-
Define a named credential to specify the URL of a callout endpoint.
Make sure that the URL is in this format:
https://{api-id}.execute-api.{region}.amazonaws.com/{stage-name}.For example,
https://a1b2c3d4e5.execute-api.us-west-2.amazonaws.com/prod. See Create a Named Credential.
Note When you configure the endpoint in the Salesforce Named Credential, don't include :443 in the host. Including the port causes an AWS Signature Version 4 host mismatch and a 403 SignatureDoesNotMatch response. - Use the principal to link the external credential to a permission set or user profile so that users can make callouts using the named credential.
Create the External Search Custom Setting
- From Setup, in the Quick Find box, enter Custom Settings, and then select Custom Settings.
- Click New.
-
Create a custom setting with these values:
- Label: External Search Config
- Object Name: ExternalSearchConfig
- Select the custom setting type required by your implementation.
- Save the custom setting.
-
Create these fields.
Field Data Type Description NamedCredentialName Text Developer name of the named credential OperationPath Text Gateway API operation path appended to the named credential URL. Example: If the gateway API endpoint is "https://a1b2c3d4e5.execute-api.us-west-2.amazonaws.com/prod/performsearch", then the OperationPath is "performsearch" SearchProvider Text Search provider identifier: bedrock or kendra. Important: Make sure you provide the values as given here. TimeoutSeconds Text Maximum time allowed for the gateway API callout IsActive Checkbox Indicates whether Salesforce uses this configuration. Only one configuration can be active at a time. - Use the field labels, API names, and data types required by the external storage search implementation.
-
Create an ExternalSearchConfig record for your search service, and then select
IsActive.
Note Keep only one configuration active at a time. If more than one is active, search behavior is unpredictable. - Grant users access to the search configuration.
