# Salesforce (/integrations/native-integrations/salesforce)
## Overview [#overview]
Connect your Salesforce account to LettrLabs, and LettrLabs reads your leads, contacts and opportunities. You give LettrLabs the details of your own Salesforce app, then sign in to Salesforce to allow the connection. LettrLabs reads from Salesforce. It never writes to Salesforce.
You can use the Salesforce connection to:
* Mail your Salesforce leads and contacts.
* Count the opportunities that your mail brought in.
* Set the stage at which a person becomes a lead, for attribution.
## Connect Salesforce [#connect-salesforce]
Connect Salesforce once, before you build a campaign from your Salesforce data. You need the Client ID and the Client Secret of the app that you created in Salesforce. The setup guide shows where to find them. On a plan lower than Core, the **Setup** button opens an upgrade prompt.
Click **Integrations** > **Integrations**. The **Explore** tab opens.
On the Salesforce card, click **Setup**. The **Connect Salesforce** window opens. To read the Salesforce steps first, click **View setup guide**.
In **Name**, enter a name for the connection. LettrLabs shows this name on campaigns and reports.
In **Client ID**, paste the Client ID of your Salesforce app.
In **Client Secret**, paste the Client Secret of your Salesforce app.
If your Salesforce org is a sandbox, select **Sandbox**.
Click **Continue to Salesforce**. The Salesforce sign-in page opens.
Sign in to Salesforce, and allow access for LettrLabs. Salesforce sends you back to LettrLabs.
Wait while LettrLabs completes the setup. The **Connect Salesforce** window opens again, and shows "Connected to Salesforce".
Click **Continue**. The **Your lifecycle** step opens. It shows how LettrLabs measures Salesforce. To change where revenue counts, use **Settings** > **Lifecycle**.
Click **Connect and sync**. LettrLabs tests the connection, then starts the first sync. The window shows "Salesforce is connected".
Click **Sync in the background**. Or wait, then click **See my integrations**.
You're done when **Integrations** > **Integrations** > **My integrations** lists your Salesforce connection. Its **Health** reads **Setting up** until the connection is active, **Syncing** during the first sync, then **Healthy**. A message "Salesforce integration enabled successfully!" shows when the connection is active.
A first sync can take up to an hour. It keeps running when you leave the page. After it, LettrLabs syncs Salesforce once a day. You cannot change the sync time.
## Set the lead stage for attribution [#set-the-lead-stage-for-attribution]
Salesforce has an extra setup step. In it, you tell LettrLabs at which stage a person first becomes a lead. Do this after the connection is active.
Click **Integrations** > **Integrations** > **My integrations**.
Open the menu on the Salesforce row, and click **Settings**. The connection panel opens.
Click **Customize attribution**. The **Attribution Setup** page opens.
Under "Define at which stage a person first becomes a lead", select one option.
Click **Save & Continue**.
You're done when the page saves with no error. LettrLabs uses that stage to count the leads your mail brought in.
## Connect a second Salesforce account [#connect-a-second-salesforce-account]
Connect a second account when your company uses more than one Salesforce account. Each account is a separate connection.
On the **Explore** tab, click **Add Salesforce account** on the Salesforce card. The **Connect Salesforce** window opens.
Give the connection a name that is different from your first Salesforce connection.
Do the steps in [Connect Salesforce](#connect-salesforce) from the **Client ID** step. Use the app details and the sign-in of the second Salesforce account.
You're done when **My integrations** lists two Salesforce connections.
## Disconnect Salesforce [#disconnect-salesforce]
Disconnect Salesforce when you stop using it.
The connection stops syncing, and you cannot undo the delete. The records it already brought in stay. Campaigns that read this connection get no new records.
Click **Integrations** > **Integrations** > **My integrations**.
Open the menu on the Salesforce row, and click **Delete**.
In the **Delete this connection?** dialog, click **Delete**.
You're done when **My integrations** no longer lists the connection. To remove the access of LettrLabs in Salesforce too, revoke it in your Salesforce settings.
## FAQ [#faq]
LettrLabs could not complete the sign-in after Salesforce sent you back. The page shows the cause below the title. Click **Integrations** > **Integrations**, and click **Setup** on the Salesforce card again. Sign in, and allow access. If it fails again, send the message on the page to [support@lettrlabs.com](mailto:support@lettrlabs.com).
You did not allow access on the Salesforce sign-in page. The window goes back to the **Connect** step. Check the **Client ID** and the **Client Secret**, then click **Continue to Salesforce** again. Allow access when Salesforce asks.
Salesforce sent you back with no sign-in. A message from Salesforce can show in its place. Check the **Client ID** and the **Client Secret** of your Salesforce app. Then click **Continue to Salesforce** again.
LettrLabs could not create the connection. A message that names a cause, such as a name that another Salesforce connection uses, can show in its place. Change the name if the message asks for it, then click **Continue to Salesforce** again.
The connection test failed when you clicked **Connect and sync**. The window goes back to the **Connect** step. Sign in to Salesforce again, and allow access.
**Needs attention** means that the last daily sync failed. **Stopped** means that the setup did not finish. Open the menu on the row, click **Settings**, and use the button in the panel. For Salesforce, click **Reconnect**. It deletes the connection and opens the Salesforce sign-in again with the same name. See [Fix a failed connection](/integrations/how-integrations-work#fix-a-failed-connection).
You left the Salesforce sign-in before it ended, so the connection cannot sync. The panel reads "The Salesforce sign-in did not finish, so this connection cannot sync." Click **Reconnect**. It deletes the connection and opens the Salesforce sign-in again with the same name.
Salesforce needs the Core plan or higher. Upgrade your plan, then click **Setup** again. See [Plan and balance](/account/billing/plan-and-balance).
## Related [#related]