# Salesforce

<details>

<summary>Prerequisite - <strong>Integrating with Salesforce</strong></summary>

To index your Knowledge Source, you must integrate your Salesforce account with ClearFeed. Begin this on the ClearFeed web app:

1. Navigate to `Settings` from the nav-bar, and proceed to the [Integrations](https://web.clearfeed.app/settings/integrations) tab.
2. Within the list of available integrations, locate and select **Salesforce.**
3. Click on `Connect` button.
4. You will be asked to enter the Salesforce sub-domain. Click Connect and you will be redirected to Salesforce login.
5. Once you sign in, you will need to authorize ClearFeed to integrate with Salesforce by clicking on `Authorize Access`
6. You will then be redirected to the ClearFeed web app where you will get a success message.

</details>

### **Indexing Salesforce Knowledge Source**

{% hint style="info" %}
**As of now, we only support Salesforce Lightning Knowledge as a Knowledge Source.**
{% endhint %}

With the integration complete, you can now index your Knowledge Source:

* From the left navigation bar on the ClearFeed WebApp, go to **AI >** [**Knowledge Sources**](https://web.clearfeed.app/knowledge-sources)**.**
* Hover over the "Add Knowledge Source" dropdown at the top right corner to select `Salesforce`.
* A side drawer will appear, prompting you to provide specific details:
  * **Name**: Enter a title for the Knowledge Source (this will be shown in ClearFeed).
  * **Tags**: Add tags to categorize and organize Knowledge Sources as per your needs.
  * **Knowledge Object Name**: Enter the API name of your Knowledge article object (e.g., `Knowledge__kav`).
    * Find it in **Salesforce Setup → Object Manager → search “Knowledge” → copy the API name**.
  * **Article Body Field**: Enter the API name of the field storing the article’s main content.
    * In Salesforce: **Object Manager → Knowledge object → Fields & Relationships → locate the Rich Text field → copy the API name**.
  * **External URL Field (optional)**: If articles have a public URL, enter the API name of that URL field.
    * Find it in **Object Manager → Knowledge object → Fields & Relationships → look for a URL-type field**.
  * **Category Groups**: Specify the API names of category groups (`__c`) used to classify articles.
    * In Salesforce: **Setup → Data Categories → view the group structure → copy the API names**.
* After saving, the Knowledge Source will either start indexing immediately (reflected by an **In Progress** status) or will be picked soon (reflected with an **Initiated** status). Get more details on Managing Knowledge Sources [here](https://docs.clearfeed.ai/clearfeed-help-center/clearfeed-ai/knowledge-sources/managing-knowledge-sources).
* **Reindexing Salesforce Docs -** To reindex Salesforce documents, manually reindex the knowledge source by clicking the "Reindex" button next to it.

### Using AI Agents

Once you've configured the knowledge sources, learn how to build and use AI Agents

{% content-ref url="<https://github.com/clearfeed/new-docs/blob/main/ai-agents/build-ai-agents.md>" %}
<https://github.com/clearfeed/new-docs/blob/main/ai-agents/build-ai-agents.md>
{% endcontent-ref %}

{% content-ref url="../../ai-agents/use-ai-agents" %}
[use-ai-agents](https://docs.clearfeed.ai/clearfeed-help-center/clearfeed-ai/ai-agents/use-ai-agents)
{% endcontent-ref %}

### **Manage Knowledge Sources**

Once the status of the knowledge source has been indexed, learn more on how to manage the knowledge source below.

{% content-ref url="../managing-knowledge-sources" %}
[managing-knowledge-sources](https://docs.clearfeed.ai/clearfeed-help-center/clearfeed-ai/knowledge-sources/managing-knowledge-sources)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clearfeed.ai/clearfeed-help-center/clearfeed-ai/knowledge-sources/indexing-knowledge-sources/salesforce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
