> For the complete documentation index, see [llms.txt](https://docs-v3.toucantoco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-v3.toucantoco.com/data-management-in-datahub/datasources-in-toucan/managing-connectors/setting-up-a-connector/online-services-connectors/setting-up-a-salesforce-connector.md).

# Setting up a Salesforce connector

### Salesforce Connector¶

{% hint style="info" %}
Warning

This connector is deprecated. It is recommended to use the **HTTP API** instead.
{% endhint %}

<details>

<summary>Prerequisites - Connected App creation¶</summary>

Login to your Salesforce application.

On the top right of the screen click on setup

Then, on the left bar click on `Apps` > `App Manager`

and create a new connected app by clicking on `New Connected App`.

You will then be redirected to the app’s creation screen. You can get a configuration example in the image below :

Finally, you will be redirected to the Connected App configuration screen where you’ll find the client id & client secret for your app.

Use them to configure the oAuth credentials in Toucan’s [credentials manager](https://docs.toucantoco.com/concepteur/power-apps-with-data/02-connectors.html#set-up-oauth2-credentials-for-your-platform).

</details>

This connector is dedicated to extract CRM data from the `salesforce` REST API. First step is to create a connected app in Salesforce.

{% hint style="info" %}
Start the configuration once the **credentials** are configured, add your connector:
{% endhint %}

A pop-up window will open to authorize the connected app to access your data:

<details>

<summary>Pop-up to authenticate</summary>

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-072282955756dffb59fefc9f6d62ea0aa16033ec%2Fsalesforce6.png?alt=media" alt="authorize the connected app"><figcaption><p>authorize the connected app</p></figcaption></figure>

</details>

* then click on the `SAVE` button

{% hint style="success" %}
After successfully configuring the connector, you will be able to find it in the Connector section of the DataHub "Datasource" tab
{% endhint %}

## Click on "Create a new dataset from this datasource "

Mandatory parameter(s)

* `Query`, here an SOQL query is expected to extract the data from the API. [here](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_examples.htm) for some examples.

## Misc

#### Authentication

Salesforce authentication phase can be quite challenging, this [stackoverflow thread](https://stackoverflow.com/questions/12794302/salesforce-authentication-failing) is really helpful for troubleshooting.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs-v3.toucantoco.com/data-management-in-datahub/datasources-in-toucan/managing-connectors/setting-up-a-connector/online-services-connectors/setting-up-a-salesforce-connector.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
