# Salesforce v2 Destination Setup Guide


> Set up the Salesforce v2 destination in RudderStack.



This guide will help you set up Salesforce as a destination in the RudderStack dashboard. It also lists the configuration settings required to correctly send data from the supported sources to Salesforce.

**Announcement:** **This integration does not support dev instances of Salesforce**. See [FAQ](#does-rudderstack-support-dev-instances-of-salesforce) for more information.

## Important: Prerequisites

- Before you get started, install the **RudderStack External Client App (ECA) package** in your Salesforce org before connecting the destination. Use the appropriate link for your organization type:

    - **Production orgs**: [Link to install package](https://login.salesforce.com/packaging/installPackage.apexp?p0=04tQP000001UwfVYAS)
    - **Sandbox orgs**: [Link to install package](https://test.salesforce.com/packaging/installPackage.apexp?p0=04tQP000001UwfVYAS)

**Info:** When prompted, select **Install for All Users**.

![Install package](/docs/images/event-stream-destinations/salesforce-v2/install-package.webp)

- **Optional** but recommended: Create a new Salesforce account to use with RudderStack to protect any confidential information in your existing Salesforce account.

    - To give RudderStack the required API permissions, add a new user account in your Salesforce dashboard by going to **Setup** > **Administration Setup** > **Users** > **New User** and select **System Administrator** as the profile type.

- Make sure to **turn off** two-factor authentication for your Salesforce account so that RudderStack can authenticate successfully.
- Make sure the Salesforce objects are searchable and fields are creatable before sending events. Otherwise, it can result in errors during event transformation or delivery.

## Connection compatibility

  
  
  
  <div class="quick-info">
    <div>
      <div class="connection-modes-column-headers">
        <table>
          <tr class="connection-modes-column-headers">
            <th colspan="4">
            Destination Information
          </th>
        </tr>
          <tr class="destination-info-content">
            <td>
              <ul>
                <li>
                  <b>Status:</b> Generally Available 
                </li>
                <li>
                  <b>Supported sources:</b>  
                  
                      Android (Java)
                      ,
                  
                  
                      Android (Kotlin)
                      ,
                  
                  
                      iOS (Obj-C)
                      ,
                  
                  
                      iOS (Swift)
                      ,
                  
                  
                      Web,
                  
                  
                      Unity,
                  
                  
                      AMP
                      ,
                  
                  
                      Cloud,
                  
                  
                      Warehouse,
                  
                  
                      React Native
                      ,
                  
                  
                      Flutter,
                  
                  
                      Cordova
                  
                </li>
                <li>
                  Refer to it as <b>Salesforce V2</b> in the <a href="/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/filtering/#filtering-destinations">Integrations object</a>.
                </li>
              </ul>
            </td>
          </tr>
        </table>
      </div>
      <div class="table-content connection-modes-table">
        
          <table>
            <tr class="heading connection-modes-header">
              <th colspan="5">
              Connection Modes
              <a href=/docs/destinations/rudderstack-connection-modes>
                <i class="fa-regular fa-circle-info"></i>
              </a>
            </th>
          </tr>
            <tr class="connection-modes-column-headers">
              <th>Source</th>
              <th>Cloud mode</th>
              <th>Device mode</th>
              <th>Hybrid mode</th>
              <th>Device Mode Transformations
                <a href=/docs/transformations/usage/#device-mode>
                  <i class="fa-regular fa-circle-info"></i>
                </a>
              </th>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                AMP
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Android (Java)
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Android (Kotlin)
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Cloud
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Cordova
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Flutter
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                iOS (Obj-C)
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                iOS (Swift)
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                React Native
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Unity
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Warehouse
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Web
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
          </table>
         
      </div>
      <div class="table-content message-types-table">
          <table>
            <tr class="heading message-types-header">
              <th colspan="9">
              Supported Message Types
            </th>
          </tr>
          <tr class="message-types-column-headers">
            <th>Source</th>
            <th>Identify</th>
            <th>Page</th>
            <th>Track</th>
            <th>Screen</th>
            <th>Group</th>
            <th>Alias</th>
            <th>Record</th>
            <th>AudienceList</th>
          </tr>
          
          
          
            
              
                
              
              
          
          
            
          
          
            
            <tr class="heading message-mode-header">
              <th colspan="9">Cloud mode</th>
            </tr>
              <tr class="message-mode-row">
                <td>Supported sources</td>
                <td>
                  <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
              </tr>
              
          
            </table>
        </div>
    </div>
  </div>
  

## Setup

In your [RudderStack dashboard](https://app.rudderstack.com/), add a source. Then, from the list of destinations, select **Salesforce v2**.

### Connection settings

| Setting | <div>Description</div> |
| :----| :-----|
| Name | Assign a name to uniquely identify the destination in RudderStack. |
| Event delivery account | <ol><li>Make sure you have [installed the RudderStack ECA package](#important-prerequisites) in your Salesforce org.</li><li>Click **Create Account** > **OAuth** and specify an account name.</li><li>Specify the **Environment type** from the dropdown — RudderStack supports both **Production** and **Sandbox** environments.</li><li>Click **Connect account**, log in to Salesforce, and grant RudderStack the necessary permissions to access your account.</li></ol> |

**Warning**

**The previous Salesforce OAuth account type is now deprecated.**

- Your existing Salesforce connections continue to work as long as no changes are needed — events will keep flowing normally. 
- You **cannot** create new accounts, edit, or re-authorize with the deprecated account type. - Any time you need to update or re-authorize your Salesforce connection, you need to use the new ECA-based account type.

RudderStack recommends migrating proactively so the switch happens on your schedule, not in response to an urgent change.

### Configuration settings

| Setting | <div>Description</div> |
| :----| :-----|
| Map RudderStack properties to Salesforce properties | This setting is toggled on by default and lets you map the RudderStack event properties to the corresponding Salesforce fields. |
| Use contact ID for converted leads | Toggle on this setting if both the lead and contact fields are the same. | 
| Consent management settings | Specify the **Consent management provider** from the dropdown and enter the corresponding consent category IDs. <br /><br />See the [Consent Management](https://www.rudderstack.com/docs/data-governance/consent-management/) guide for more information on configuring the consent settings. | 

## Next steps

- [Send events in cloud mode](https://www.rudderstack.com/docs/destinations/streaming-destinations/salesforce-v2/cloud-mode/)

## FAQ

#### Why am I getting an OAuth error during setup?

If you encounter an OAuth error while connecting to Salesforce:

1. Make sure you have [installed the RudderStack ECA package](#important-prerequisites) in your Salesforce org.
2. If the error persists, verify that the user account has the [Approve Uninstalled Connected Apps](https://help.salesforce.com/s/articleView?id=005132365&type=1) permission.

![Salesforce OAuth error](/docs/images/event-stream-destinations/salesforce-v2/salesforce-v2-oauth-error.webp)

#### Why am I getting an `OAUTH_EC_APP_NOT_FOUND` error while setting up the destination?

This error means the RudderStack External Client App (ECA) package is not installed in your Salesforce org. [Install the package](#important-prerequisites), then retry the OAuth connection.

![Account authentication error](/docs/images/event-stream-destinations/salesforce-v2/account-auth-error.webp)

#### What is the impact of deprecating the previous Salesforce OAuth account type on existing connections?

| State | Behavior |
| --- | --- |
| Existing Salesforce accounts (deprecated type) | Continue to work as long as no changes are needed — events flow as before |
| Creating a new Salesforce account | Must use the new ECA-based account type |
| Editing a deprecated account | Not allowed |
| Re-authorizing a deprecated account | Not allowed — create a new account instead |
| Reusing a deprecated account on a new destination | Not allowed |

#### Which Salesforce Edition should I use to access the API?

Before connecting to the Salesforce API with RudderStack, make sure you are using the right Salesforce edition. You must have either the **Enterprise**, **Unlimited**, **Developer**, or **Performance** editions to access the API.

See this [Salesforce help article](https://help.salesforce.com/articleView?id=000326486&type=1&mode=1) for more information.

#### How do I check the number of Salesforce API calls left for the day?

To check the number of Salesforce API calls, go to **Setup** > **Administration Setup** > **Company Profile** > **Company Information**. You should then be able to see a field called **API Requests, Last 24 Hours**, which contains the number of API calls left for the day.

#### Does RudderStack support dev instances of Salesforce?

No, RudderStack does not support Salesforce dev instances (for example, `https://companyabc-dev-ed-develop.lightning.force.com/`) currently.

#### How to fix "No such column 'X' on object of type Y" errors?

If event delivery to Salesforce fails due to the non-existence of a provided field - even though the field does exist - check the field-level security settings for that field in Salesforce.

When the field is **not** marked as visible to the role your RudderStack Salesforce user is using, you will get this error. To fix it, make the field visible to the appropriate role.

<br />
