# Enrich your data with Salesforce

Connect Salesforce to Fincome in a few clicks and unlock the full potential of your customer data.\
By enriching your Fincome axes with Salesforce properties, you benefit from more detailed insights, better segmentation, and more powerful analysis, all from a single, unified CRM source.

This improves your decision-making with automatically enriched, up-to-date data, for a more accurate and actionable view of your customer base.

## Prerequisites

Before you begin, make sure the following conditions are met:

* You have the necessary permissions in Salesforce to:
  * Access **Setup** and create an **External Client App**
  * View the Salesforce CRM objects you want to synchronize (e.g., **Accounts**)
* Your Salesforce organization allows authentication **OAuth 2.0**

## Step-by-step guide: connect Salesforce to Fincome

Connecting Salesforce to Fincome requires two phases:

1. **In Salesforce** – create an External Client App (ECA) to obtain the OAuth credentials.
2. **In Fincome** – configure the enrichment source with those credentials.

***

### Phase 1 – Create an External Client App in Salesforce

#### **Step 1 – Access the External Client App Manager**

1. Log in to Salesforce with an administrator account.
2. Click the**gear icon** (top right) and open **Setup**.

   <figure><img src="/files/fd4e7ef4316aa2a4021cb73416821c1d4ea84743" alt=""><figcaption></figcaption></figure>
3. In the **Quick Find**bar, type `External`.

   <figure><img src="/files/2b99e8c94d7f0619f6f8c52ed47b2a5561f5d141" alt=""><figcaption></figcaption></figure>
4. Select **External Client App Manager**.
5. Click **New External Client App**.

#### **Step 2 – Fill in the basic information**

In the **Basic Information**section, fill in:

* **External Client App Name** : a clear name (e.g., `Fincome`).
* **API Name** : automatically generated from the application name (e.g., `Fincome`). You can keep the default value.
* **Contact Email** : the email address of the team managing the integration (used by Salesforce to contact you about the application).
* **Distribution State** : leave as **Local** (the app is only used by your own organization).

<figure><img src="/files/3569dd1fd4caa596c1374d76719ec89d5c38ebec" alt=""><figcaption></figcaption></figure>

#### **Step 3 – Configure the OAuth settings**

Enable **API (Enable OAuth Settings)**, then fill in the following fields:

**1. Callback URL**

Enter the redirect URL provided by Fincome:

```
https://analytics.fincome.co/settings/sources
```

> This value corresponds to the`OAUTH_REDIRECT_URL` provided by Fincome. It must be **strictly identical**, with no extra spaces or characters.

**2. OAuth Scopes**

<figure><img src="/files/dfa24a1dea6800ee4f2695f7c3bda4016f536634" alt=""><figcaption></figcaption></figure>

Add **at least** the following scopes to the **Selected OAuth Scopes** :

* **Manage user data via APIs (`api`)** — allows Fincome to read your Salesforce data via the API.
* **Perform requests at any time (`refresh_token`, `offline_access`)** — required so that Fincome can renew its access token without asking you to log in again.

**3. Flow Enablement**

* Check **Enable Authorization Code and Credentials Flow**.\
  This is the flow used by the Fincome connector (OAuth 2.0 authorization code grant with refresh tokens).

**4. Security**

* Check **Require Secret for Refresh Token Flow** and **Require Secret for Web Server Flow**.\
  This ensures that the client secret is required when exchanging a refresh token, which is the recommended setting for server-to-server integrations like Fincome.

<figure><img src="/files/87773368d28d60a9cda3dd87613c36c97f8be625" alt=""><figcaption></figcaption></figure>

#### **Step 4 – Create the application**

1. Review your configuration.
2. Click **Create** at the bottom of the page.

Salesforce creates the External Client App and redirects you to its detail page.

#### **Step 5 – Retrieve your credentials**

You now need to copy the **Consumer Key** and the **Consumer Secret** that Fincome will use to authenticate.

1. Open your newly created application from the**External Client App Manager**.
2. Go to the **Settings**.

<figure><img src="/files/1fbe9208319dd324acd711e65a86c42544164c6c" alt=""><figcaption></figcaption></figure>

1. Scroll down to the **OAuth Settings**.
2. Click **Consumer Key and Secret**.

<figure><img src="/files/96d1a757d3a6cb183876857e71f28ddb28783e64" alt=""><figcaption></figcaption></figure>

1. Salesforce may ask you to verify your identity via a code sent by email — enter the code you received.
2. Copy the two values:

| Salesforce field    | Fincome identifier                |
| ------------------- | --------------------------------- |
| **Consumer Key**    | `secret_salesforce_client_id`     |
| **Consumer Secret** | `secret_salesforce_client_secret` |

{% hint style="danger" %}
Treat the Consumer Secret like a password. Never share it publicly or publish it in a public repository.
{% endhint %}

***

### Phase 2 – Configure the Salesforce source in Fincome

**Step 1 – Access settings**

1. Go to **Settings** in Fincome.
2. Open the **Data sources**.
3. Click **Enrichment sources**.
4. Select **Connect a new enrichment source**.
5. Choose **Synchronize Salesforce property(ies)**.

**Step 2 – Configure the Salesforce source**

A configuration window opens with the following fields:

**1. Source name**

Give your source a clear and **unique** name (e.g., *Salesforce – Accounts*).\
This name makes the source easy to identify in Fincome.

**2. Salesforce credentials**

Paste the values retrieved from your External Client App:

* **Client ID** → the **Consumer Key** from Salesforce.
* **Client Secret** → the **Consumer Secret** from Salesforce.

**3. Salesforce properties to retrieve (separated by commas)**

Enter the **exact API names** of the Salesforce fields to synchronize.

**Example:**\
`Industry, Phone, BillingCity`

**How to find the exact API name of a field:**

1. In Salesforce, open **Setup**.
2. Go to **Object Manager** and select the object (e.g., **Account**).
3. Click **Fields & Relationships**.
4. Copy the value from the **Field Name** column (this is the API name, e.g., `Industry` or `Custom_Segment__c`).

**4. Name of the Salesforce identification axis in Fincome**

Enter the**Fincome axis** that contains the identifier used to match with Salesforce.

By default, this is the **Salesforce Record ID** (the 15- or 18-character identifier, e.g., `0015g00000XyZabAAB`), but you can also use **another Salesforce field** (for example an internal customer ID), provided that:

* the identifier is **unique**
* the identifier is **complete** across all your customers
* the value is **strictly identical** the same between Salesforce and Fincome

> The goal is to use a common, reliable, and consistent identifier across all sources used in Fincome.

{% hint style="danger" %}
This axis must already exist in Fincome, otherwise synchronization will not work.
{% endhint %}

**5. Axis prefix (optional)**

Define a prefix for axes created from Salesforce properties.

* **Without a custom prefix** :
  * Default prefix: `Salesforce_xxxxxx_`
  * Example: `Salesforce_726564_Industry`
* **With a custom prefix** :
  * Prefix: `_Axis`
  * Example: `Salesforce_AxisIndustry`

{% hint style="danger" %}
If no prefix is entered and the names match existing axes, Fincome will merge the axes.
{% endhint %}

#### **Step 3 – Finalize the connection**

6. Click **Validate**.
7. You are redirected to Salesforce.
8. Log in with the Salesforce account to connect.
9. Review and accept the requested permissions (`api`, `refresh_token`).
10. Click **Allow**.

#### Final check

Go back to **Settings → Data sources → Enrichment sources** and verify that your Salesforce source appears as active.

## \*What is a Record ID and where to find it in Salesforce

A **Record ID** is the unique identifier assigned by Salesforce to each record — here, an **Account**.\
It exists in two formats:

* **15-character ID** (case-sensitive): visible in the record URL.
* **18-character ID** (case-insensitive): returned by the API and exports. Both point to the same record.

Fincome can use this identifier to match a Fincome customer (via an analytical axis) with the correct Salesforce account, in order to synchronize CRM properties correctly.

### **Where to find the Record ID in Salesforce (Accounts)**

1. Log in to Salesforce.
2. Open the **Accounts** (or use **App Launcher → Accounts**).
3. Click the relevant account to open its record.
4. Look at the browser address bar: the Record ID appears in the URL.

**Example URL:**\
`https://your-org.lightning.force.com/lightning/r/Account/0015g00000XyZabAAB/view`\
👉 In this example, `0015g00000XyZabAAB` corresponds to the **Record ID**.

### **Other ways to obtain the Record ID**

* From a Salesforce report or list view, add the **Account ID**.
* column When exporting from Salesforce (Data Export or Data Loader), include the **Id**.
* column Via the Salesforce REST API, the Record ID corresponds to the `Id`.

## **Best practices for synchronization with Fincome**

* Make sure the Record ID stored in Fincome is **strictly identical** the same as Salesforce's (with no spaces or formatting).
* Prefer the**18-character ID** to avoid case-sensitivity issues during matching.
* For large volumes, it is recommended to export Salesforce accounts with their IDs, then update Fincome axes in bulk.

⚠️ If the identifier stored in Fincome does not match Salesforce's, enrichment will not work.

## **FAQ**

→ **What type of Salesforce data can I enrich in Fincome?**\
You can synchronize all Salesforce account fields you have access to: industry, size, location, custom fields (`__c`), etc.

***

→ **What happens if the identification axis does not exist in Fincome?**\
Synchronization will fail. The axis must be created beforehand.

***

→ **What happens if a Salesforce field's API name is incorrect?**\
Synchronization runs, but the affected axes will be populated with the value `None`.

***

→ **What happens if I revoke the External Client App in Salesforce?**\
Synchronization will stop immediately. You will need to reconnect the source in Fincome, possibly with new credentials.

***

→ **How often is the data updated?**\
The data is updated daily.


---

# 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://help.fincome.co/en/guide/enrich-your-data-with-crms/enrich-your-data-with-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.
