> For the complete documentation index, see [llms.txt](https://docs.appmixer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appmixer.com/connector-configuration/salesforce.md).

# Salesforce

## OAuth app properties

| Property                | Value                                                                                                                                                                                                                                                                                       |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Multi-tenant**        | **Conditional.** A *Local* External Client App works only for users of the org where it was created. To serve other orgs, put the app into a second-generation managed package and install it in each customer org, or use an existing Connected App, which users of any org can authorize. |
| **Vendor review**       | **None.** An AppExchange security review applies only if you list a package on AppExchange.                                                                                                                                                                                                 |
| **Review time**         | Not applicable.                                                                                                                                                                                                                                                                             |
| **Users before review** | No limit. The app's **Permitted Users** policy decides who in the org may authorize it.                                                                                                                                                                                                     |
| **App owner**           | Any Salesforce org, for example a free Developer Edition org.                                                                                                                                                                                                                               |
| **Regions**             | One app. Production orgs sign in through `login.salesforce.com`; sandbox users need `baseUrl` set to `https://test.salesforce.com` (see [Login URL](#login-url)).                                                                                                                           |
| **Client secret**       | No expiry documented.                                                                                                                                                                                                                                                                       |
| **Rate limits**         | Per customer org, shared by all integrations: a 24-hour allocation of API requests, for example 100,000 plus 1,000 per Salesforce license in Enterprise Edition, 15,000 in Developer Edition.                                                                                               |
| **Checked**             | 2026-11-13                                                                                                                                                                                                                                                                                  |

**Limitations**

* Since Spring '26 new apps are External Client Apps. A Local one cannot serve your customers' orgs; see **Multi-tenant**.
* If the app's **Refresh Token Policy** sets an expiry, every connected account stops working when it runs out. Use *Refresh token is valid until revoked*.
* Salesforce allows five approvals (refresh tokens) per user and app. Connecting the same Salesforce user a sixth time through the app revokes the oldest connection.
* A Local External Client App is not copied into a sandbox when the sandbox is created or refreshed.
* Professional Edition orgs need API access enabled; without it the components fail.

Sources: [External Client App basics (Trailhead)](https://trailhead.salesforce.com/content/learn/modules/external-client-app-basics/use-external-client-apps-when-connected-apps-wont-do), [API request limits and allocations](https://developer.salesforce.com/docs/platform/salesforce-app-limits-cheatsheet/guide/salesforce-app-limits-platform-api.html). What the rows mean: [OAuth app properties](https://docs.appmixer.com/connector-configuration/oauth-app-properties.md).

### Create a Salesforce application

To integrate Appmixer with Salesforce, you are going to need an app in your Salesforce org. You can either create a new one or use one that already exists.

Salesforce has two kinds of apps:

* **External Client App** – the current app type. Since Spring '26 the *New Connected App* button is disabled in all orgs, so every new app is an External Client App. External Client Apps always require PKCE (the **Require Proof Key for Code Exchange (PKCE)** setting is checked and cannot be changed).
* **Connected App** (legacy) – older apps you may already have. They keep working. Salesforce is progressively enforcing PKCE for them too.

{% hint style="info" %}
The Appmixer Salesforce connector uses PKCE from version **1.7.4**. With an older connector version, connecting an account through an External Client App fails with `error=invalid_request&error_description=missing required code challenge`. Upgrade the connector before following this guide.
{% endhint %}

#### Create an External Client App

Log in to Salesforce, open **Setup** and in the left menu look up **Platform Tools -> Apps -> External Client App Manager**. Click **New External Client App**.

Fill out the basic information:

* **External Client App Name** and **API Name** – for example *Appmixer*.
* **Contact Email** – your email.
* **Distribution State** – *Local*.

Expand the **API (Enable OAuth Settings)** section and tick **Enable OAuth**. Then fill out:

* **Callback URL** – `https://api.acme.com/auth/salesforce/callback`, replace *api.acme.com* with the domain of your Appmixer API and keep the suffix `/auth/salesforce/callback`.
* **Selected OAuth Scopes** – add at least:
  * *Manage user data via APIs (api)*
  * *Access the identity URL service (id, profile, email, address, phone)*
  * *Perform requests at any time (refresh\_token, offline\_access)*

In **Flow Enablement**, tick **Enable Authorization Code and Credentials Flow**.

In **Security**, tick **Require secret for Web Server Flow** and **Require secret for Refresh Token Flow**. Leave **Require Proof Key for Code Exchange (PKCE)** checked – the connector sends the PKCE parameters. **Refresh Token Rotation** may stay enabled as well; the connector stores the rotated token.

Click **Create**.

Next, open the **Policies** tab of the new app, click **Edit** and in the **OAuth Policies** section:

* tick **Enable OAuth Policies**,
* set **Permitted Users** to *All users may self-authorize* (or restrict it to a profile or permission set),
* set **Refresh Token Policy** to *Refresh token is valid until revoked*.

Save the policies.

#### Getting the client id and secret

Open the **Settings** tab of your External Client App, expand **OAuth Settings** and click **Consumer Key and Secret**. Salesforce may ask you for a verification code sent to your email. You should now see your client id (shown as **Consumer Key**) and secret (shown as **Consumer Secret**).

#### Legacy: Connected App

If your org still allows creating Connected Apps (Setup -> **External Client App Manager** -> **Settings** -> *Allow creation of connected apps*), or you already have one, the steps are similar. Look up **Platform Tools -> Apps -> App Manager** and click *New Connected App* on the top right side:

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-da4a925035cfb1c5afb50d4df30652f5815fc801%2Fsalesforce-1.png?alt=media" alt=""><figcaption><p>App manager</p></figcaption></figure>

Look out for the **API (Enable OAuth Settings)** section. Tick the Enable OAuth Settings checkbox, and fill out the callback URL and scopes as shown in this screenshot:

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-1ad64e1694a7f1876c2ab4f7ce915713540a5130%2Fsalesforce-2.png?alt=media" alt=""><figcaption><p>Filling OAuth settings for your application</p></figcaption></figure>

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-f7bb2eb31c2aba939b3abbd5a8934c2968ba959c%2Fsalesforce-10.png?alt=media" alt=""><figcaption><p>Configure additional properties</p></figcaption></figure>

Check the **Require Secret for Web Server Flow**, **Require Secret for Refresh Token Flow** and **Enable Authorization Code and Credentials Flow** checkboxes. **Require Proof Key for Code Exchange (PKCE)** can be either checked or unchecked with connector 1.7.4 or newer.

To get the client id and secret, go to the **App Manager**, search for your app in the list and on the dropdown in the right side click the **View** option.

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-f4670049cf65bf679d6ddaeb47157da65f7fdf31%2Fsalesforce-3.png?alt=media" alt=""><figcaption><p>Navigating to your app details</p></figcaption></figure>

In the next screen, look out for **API (Enable OAuth Settings)** section and click on the **Manage Consumer Details** button. You should see now your client id (shown as Consumer Key) and secret (shown as Consumer Secret):

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-6f1678e79de48315d6982e07b868c5ba432703be%2Fsalesforce-4.png?alt=media" alt=""><figcaption><p>Salesforce client id (Consumer Key) and secret (Consumer Secret)</p></figcaption></figure>

### Troubleshooting

* `missing required code challenge` when connecting an account – the app requires PKCE but the connector is older than 1.7.4. Upgrade the connector.
* `invalid_client_id` or `redirect_uri_mismatch` – the Consumer Key or the callback URL in the app does not match the Appmixer configuration. The callback URL must end with `/auth/salesforce/callback`.
* The account stops working after some time – check the **Refresh Token Policy** of the app; *Refresh token is valid until revoked* is the recommended setting.

## Backoffice configuration

Configuration ID: `appmixer:salesforce` (Backoffice → Configuration; see [Connector Configuration](https://docs.appmixer.com/getting-started/services) for how a configuration is created and how its keys reach the connector).

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-4e02c0a828c590417dea20f5316765d84820baa8%2Fsalesforce-5.png?alt=media" alt=""><figcaption><p>Creating configuration for Salesforce in the Backoffice</p></figcaption></figure>

* `clientId` — The Consumer Key of the Salesforce app created above. Not needed when Salesforce is authenticated through the Appmixer Auth Hub.
* `clientSecret` — The Consumer Secret of the same app. Not needed with the Auth Hub.
* `promptType` — Optional. How Salesforce prompts the user when an account is connected. Default `login`. The values (from the Salesforce [OAuth docs](https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_web_server_flow.htm\&type=5)):
  * `login` — the authorization server must prompt the user for reauthentication, forcing the user to log in again.
  * `consent` — the authorization server must prompt the user for reapproval before returning information to the client.
  * `select_account` — if zero or one hint is available and the user is logged in, show the approval page without prompting for login; if zero or one hint is available and the user isn't logged in, prompt for login; if more than one hint is available, show the account chooser.
* `baseUrl` — Optional. The Salesforce login URL. Default `https://login.salesforce.com`.
* `apiVersion` — Optional. Salesforce REST API version used by the components, without the `v`, for example `58.0`. Default `58.0`.
* `listObjectsCacheTTL` — Optional. How long, in milliseconds, the list of Salesforce objects offered in the object dropdowns is cached. Default `20000` (20 seconds).
* `objectPropertiesCacheTTL` — Optional. How long, in milliseconds, the field list of an object is cached for the inspector. Default `300000` (5 minutes).
* `listAccountsCacheTTL` — Optional. How long, in milliseconds, the account list of **ListAccounts** is cached when it is used as a dropdown source. Default `300000` (5 minutes).
* `listCampaignsCacheTTL` — Optional. How long, in milliseconds, the campaign list of **ListCampaigns** is cached when it is used as a dropdown source. Default `300000` (5 minutes).
* `outputFilePrefix` — Optional. File name prefix of the CSV file that **FindContacts**, **FindContactsByField**, **ListCampaigns** and **Query** create when their output is set to a file. Default `salesforce-objects-export`.

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-967287ea9e7a64d20ca46c19759d79cc8b0d9658%2Fsalesforce-6.png?alt=media" alt=""><figcaption><p>Adding clientId and clientSecret to Appmixer</p></figcaption></figure>

![Setting promptType](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-c63707a45fd947fc53e9394a6207d74b5201e88b%2Fsalesforce2.png?alt=media)

<figure><img src="https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-ec92f4d829573710dc04f45e9250009ca3286d38%2Fsalesforce-9.png?alt=media" alt=""><figcaption><p>Setting baseUrl</p></figcaption></figure>

The same keys can be set with the CLI (`-u` updates the existing configuration instead of creating it):

```bash
appmixer service-config set appmixer:salesforce -u -d '{
  "clientId": "<consumer key>",
  "clientSecret": "<consumer secret>"
}'
```


---

# 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://docs.appmixer.com/connector-configuration/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.
