---
title: Salesforce connector (CMS 12)
slug: cms-12/docs/salesforce-connector-cms-12
docTags: 
createdAt: 2026-08-10T15:55:57.000Z
---

:::hint{type="info"}
**Note**

The [Optimizely Digital Experience Platform (DXP)](https://www.optimizely.com/products) contains many features to support you in your daily work. Depending on how your solution is set up, some features described in this documentation may not be available.
:::

The Salesforce® connector add-on automatically exports form data from your website to your Salesforce account database by mapping [Optimizely Forms](docId\:KVnsZDpxrq5wlYjBejT3W) fields to Salesforce database fields. For information about other database connector add-ons, see [Marketing Automation](docId\:lw3KOQMT4bS88DycCZNow).

## Prerequisite

Install the [Forms Marketing Automation Integration (MAI) connector](docId\:vcnbGl6ldeyTW9611It-1).

If your Salesforce org requires [external client apps](https://help.salesforce.com/s/articleView?id=xcloud.external_client_apps.htm\&type=5), you must first create an external client app in Salesforce:

1. In Salesforce, go to **Setup > External Client App Manager**.
2. Create an external client app with the **Client Credentials** grant type enabled.
3. Copy the **Client ID** (Consumer Key) and **Client Secret** (Consumer Secret).
4. Get your **My Domain URL** from **Setup > My Domain**.

## Set up Optimizely forms with Salesforce

1. In the app selector, select **Addons** > **Marketing Automation**.
2. Click **Create**. The **Add connector** view displays.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/lGHz11ooKHP43BALAWh8B-20260720-145604.png" size="100" alt="Salesforce connector (CMS 12) - configuration settings" isUploading="false" showCaption="false" width="903" height="428" darkWidth="903" darkHeight="428" position="center" indent="3"}

3. Select **Salesforce** from the list of available connectors. The Salesforce configuration settings screen displays.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/2aCm5IY-YdVLKdvKL1iqz_salesforce-connector-cms-12-configuration-settings.png)

You can have multiple instances of the same connector. For example, if you have marketing teams in separate regions, you can have more than one Salesforce connector, such as *Salesforce - Europe*, *Salesforce - US*, and *Salesforce - APAC*.

4. Enter a **Connector Name**.
5. If you are using a Salesforce external client app, select **Use Client Credentials flow (External Client App)** and enter your **Instance URL (My Domain)** (for example, *https\://yourdomain.my.salesforce.com*).If you are using a Salesforce Connected App, enter your Salesforce account's email address, password, and token, then for **Account Type**, select **Production** or **Sandbox**.The security token is emailed when an account is set up. If you need a new token, you can get one by going to your Salesforce account and selecting **My Personal Information** > **Reset My Security Token**. Then click **Reset Security Token** to receive a new security token in an email sent to your Salesforce personal settings address.
6. For **Multiple submissions in same session**, select **Create new entity** or **Update previously created entity**.
7. As of Optimizely Salesforce version 4.2.0, you can choose REST API to communicate with Salesforce. You must have a Salesforce-connected app (see Create a Connected App) to get the ConsumerKey and ConsumerSecret for the fields. While creating the connected app, activate the **Enable OAuth Settings** check box. Select the following OAuth scopes: **Access and manage your data (api)** and **Allow access to your unique identifier (openid)**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/9tsjCcgFwovH-tRwbDvce_salesforceportal.png)

8. If you want faster performance form submissions and do not need auto-fill and personalization based on Salesforce Profile criteria, activate **Enable asynchronous form submissions** on the Salesforce configuration settings screen. When enabled, entities are created asynchronously when forms are submitted, but there is no user tracking.
9. Click **Save**.
10. [Create a form](docId\:eF7OUSBnR9dr-TKMOE_uq) on a page.
11. Click **All Properties** on the form.
12. Open the **Mappings** tab.
13. Select the database to which you map the form fields from the **MA System Database** drop-down field.
    - Salesforce MA Connector-Account
    - Salesforce MA Connector-Campaign
    - Salesforce MA Connector-Contact
    - Salesforce MA Connector-Lead
    - Salesforce MA Connector-Case
14. Click **Publish**.
15. On the form, select **Edit** from a form field's context menu.
16. Open the **Extra field mappings** tab. The database option that you selected earlier displays.
17. Enable the database option and open the associated drop-down list to see the available fields. For example, if your form has a [Text](docId\:dGqSQKV0mgM33Efyrw9v5) field that was configured to capture a name:
    - Edit the email text field.
    - Select the **Extra field mappings** tab.
    - Select **LastName** from the drop-down list to map the Salesforce database field to the **Last name** field on the form.

      ![Mapping Salesforce database field to a form field](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/ZxTbG6BGdZiXS5bCFWqDV-20260720-145604.png "Mapping Salesforce database field to a form field")
18. Repeat steps 10 through 12 for as many fields as you want to map.
19. Click **Publish**.

To test the mapping, go to your form on a published page, fill in and submit the form, and then go to your Salesforce provider to verify that the user is added to the Salesforce database.

## Retrieve contact data

When a visitor submits the form, the data is sent to Salesforce. To see who submitted the form, login into your Salesforce account, select the tab you want (**Account**, **Campaign**, **Contact**, or **Lead**), select the view you want, and click **Go**.

To create a visitor group for a Salesforce form, see [Create a visitor group for an MAI connector form](docId\:QDd7LrCkU_GEc-oNoNuL_).
