> For the complete documentation index, see [llms.txt](https://support.sayprimer.com/primer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.sayprimer.com/primer/connections/integrations/connecting-a-crm/salesforce.md).

# Salesforce

Connect Salesforce read-only; the connecting user needs API Enabled and read access to leads, contacts, accounts and opportunities.

Primer connects to Salesforce over OAuth to read your accounts, contacts, leads and opportunities, plus campaigns and campaign members where the connecting user can read them. The connection is **read-only** — Primer never writes back to Salesforce.

## The connecting user needs API Enabled

Salesforce only answers Primer's API calls if the user who authorizes the connection has the **API Enabled** permission on their profile or a permission set. This is a Salesforce-side setting, not something Primer can grant. Without it, the connection fails with a permissions error such as *"API permissions are disabled for this user. Please update your permissions."* Ask your Salesforce admin to enable it, then reconnect.

## The connecting user needs read access to core objects

When you connect, Primer checks that the user can read **Leads, Contacts, Accounts and Opportunities** and their fields. If any of these is blocked, the connection fails with *"User doesn't have permission to read entries from object: …"* (or *"…read fields from object: …"*) naming the object. Campaigns and campaign members are optional: if the user can't read them, the connection still works and Primer skips them.

## Connecting

1. Make sure the connecting user has **API Enabled** and read access to the objects above.
2. Click **Salesforce** on the Connections page and log in to Salesforce.
3. Approve the requested access.

To disconnect, remove the connection on the **Connections** page or revoke Primer's access in Salesforce.

## Unmapped fields don't break the sync

Primer maps your Salesforce fields to its own columns automatically. If it can't resolve a field for a record — a custom relationship it doesn't recognize, or a value that isn't present — that column comes through **empty** for that record and the **sync keeps running**. You won't see a field-level error in Primer; you'll see the gap as missing data on the affected records. If a field you expect is consistently empty, check that it's populated and readable by the connecting user in Salesforce.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.sayprimer.com/primer/connections/integrations/connecting-a-crm/salesforce.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
