> 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="/files/IQU9t0gJ3Btr63NzJimC" 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 dynamically by asking a question.

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

```
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=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
