Connect a Salesforce data source
After you set up authentication and store your credentials in an AWS Secrets Manager secret, create the Salesforce data source in your knowledge base. This page describes how to create the data source with the AWS Management Console or the API, followed by a reference for the connector parameters you can configure.
Note
Complete authentication setup first. See Set up OAuth 2.0 Client Credentials authentication for Salesforce. You need the secret ARN.
Create the data source
Connector parameters
The data source configuration uses the following connector parameters. Within
connectorParameters, set both type and
connectorType to SALESFORCE and set version
to 1. For the fields that wrap connectorParameters (such as
deletionProtectionConfiguration and
mediaExtractionConfiguration), see Connect a data source.
The following table describes the connectionConfiguration fields.
| Field | Required | Description |
|---|---|---|
secretArn |
Yes | The ARN of the AWS Secrets Manager secret containing your
clientId, clientSecret, and
instanceUrl. |
hostUrl |
Yes | Your Salesforce My Domain URL (for example,
https://).
Accepted formats are *.my.salesforce.com and
*.lightning.force.com. This value must match the
instanceUrl in the secret. |
authType |
Yes | The authentication type. Salesforce supports
OAUTH2. See Authentication method. |
The following table describes the dataEntityConfiguration fields,
which control the entities that the connector crawls. In the console, Knowledge
articles and their attachments are combined into a single Knowledge
articles (includes attachments) option, but the API exposes them as
separate fields.
| Field | Required | Description |
|---|---|---|
crawlKnowledgeArticles |
Yes | Whether to crawl Salesforce Knowledge articles. |
crawlKnowledgeArticleAttachments |
Yes | Whether to crawl attachments on Knowledge articles. |
crawlArchiveKnowledgeArticleItems |
Yes | Whether to crawl archived Knowledge articles. |
crawlDocuments |
Yes | Whether to crawl Salesforce documents. |
The following table describes the optional filterConfiguration
fields, which scope the crawl.
| Field | Required | Description |
|---|---|---|
knowledgeArticleFilter |
No | Scopes Knowledge article crawling. Contains
dataCategoryConfiguration, a list of objects that each
contain categoryGroupName (the data category group),
dataCategoryNames (a list of category names), and
operator (the category depth). See the category depth
values that follow. |
documentFilter |
No | Scopes document crawling. Contains folderIds (a list
of Salesforce folder IDs); the connector syncs documents from those
folders only. |
maxFileSizeInMegaBytes |
No | Maximum size, in megabytes, of any single file the connector
ingests. Provide as a numeric string (for example,
"500"). |
The operator field in dataCategoryConfiguration sets the
category depth – which articles to sync relative to the specified
category:
-
AT– Only articles in the exact category specified. -
ABOVE– Articles in the specified category and all its parent categories. -
BELOW– Articles in the specified category and all its subcategories. -
ABOVE_OR_BELOW– Articles in the specified category, its parents, and its subcategories.
Next steps
After you create the data source, sync it to ingest content into your knowledge base. For details, see Sync a data source. Because Salesforce doesn't support document-level access control, all authenticated users who can query the knowledge base can see all crawled content.