> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# Salesforce

Supports:
* ✅ Models
* ✅ Model sync destination
* ✅ Bulk sync source
* ✅ Connection Proxy


## Connection

### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>connect_mode</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Authentication method<br/><br/>Accepted values: `browser`, `clientcredentials` <a href="#connect-mode-clientcredentials">↓</a>, `code`, `api`</td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>domain</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Domain<br/><br/>The Salesforce instance's login domain, e.g. acmecorp.my.salesforce.com</td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>enable_multicurrency_lookup</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Enable multicurrency source field support<br/><br/>If incremental mode for bulk-syncing from Salesforce formula fields is enabled, setting this to true extends support to accurate currency conversions.</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>enable_tooling</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Enable support for Tooling API<br/><br/>If true, expose objects from the Salesforce Tooling API in the Polytomic bulk sync source object list.</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>enforce_api_limits</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Enforce API limits<br/><br/>If true, Polytomic will restrict itself to a fixed daily cap of Salesforce API calls enforced by the number in daily_api_calls. <a href="#enforce-api-limits-true">↓</a></td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>oauth_refresh_token</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;"></td>
<td><code>optional</code></td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr>
<th>Read-only property</th><th>Type</th><th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>instance_url_override</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Instance URL override<br/><br/>This URL will be used for API requests instead of the one provided by Salesforce during OAuth.</td>
</tr>
<tr>
<td><code>username</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Salesforce user</td>
</tr>
</tbody>
</table>

<a id="connect-mode-clientcredentials"></a>

#### `connect_mode`

When `connect_mode` is `clientcredentials`:

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>client_id</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Client ID</td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>client_secret</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Client secret</td>
<td><code>required</code></td>
</tr>
</tbody>
</table>

```json
{
  "name": "Salesforce connection",
  "type": "salesforce",
  "configuration": {
    "client_id": "a45gadsfdsaf47byor2ugfbhsgllpf12gf56gfds",
    "client_secret": "ay8d5hdepz62px8lqeoakuea2ccl4rxm13i6tbyorxhu1i20kc8ruvksmzxq",
    "connect_mode": "clientcredentials",
    "domain": "acmecorp.my.salesforce.com",
    "enable_multicurrency_lookup": false,
    "enable_tooling": false,
    "enforce_api_limits": false,
    "oauth_refresh_token": "dasfdasz62px8lqeoakuea2ccl4rxm13i6tbyorxhu1i20kc8ruvksmzxq"
  }
}
```

<a id="enforce-api-limits-true"></a>

#### `enforce_api_limits`

When `enforce_api_limits` is `true`:

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>daily_api_calls</code></td>
<td><code>integer</code></td>
<td style="vertical-align: top;">Daily call limit<br/><br/>The daily Salesforce API call cap that Polytomic should adhere to.</td>
<td><code>required</code></td>
</tr>
</tbody>
</table>

```json
{
  "name": "Salesforce connection",
  "type": "salesforce",
  "configuration": {
    "connect_mode": "browser",
    "daily_api_calls": 0,
    "domain": "acmecorp.my.salesforce.com",
    "enable_multicurrency_lookup": false,
    "enable_tooling": false,
    "enforce_api_limits": true,
    "oauth_refresh_token": "dasfdasz62px8lqeoakuea2ccl4rxm13i6tbyorxhu1i20kc8ruvksmzxq"
  }
}
```


#### Example

```json
{
  "name": "Salesforce connection",
  "type": "salesforce",
  "configuration": {
    "connect_mode": "browser",
    "domain": "acmecorp.my.salesforce.com",
    "enable_multicurrency_lookup": false,
    "enable_tooling": false,
    "enforce_api_limits": false,
    "oauth_refresh_token": "dasfdasz62px8lqeoakuea2ccl4rxm13i6tbyorxhu1i20kc8ruvksmzxq"
  }
}
```


## Model Sync
### Source
#### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>include_deleted</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Include deleted records</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>query</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;"></td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>table</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Object</td>
<td><code>optional</code></td>
</tr>
</tbody>
</table>


#### Example
```json
{
  ...
  "configuration": {
    "include_deleted": false,
    "query": "select Id from Contact",
    "table": "Contact"
  }
}
```


### Target
Salesforce connections may be used as the destination in a model sync. Some destinations support additional configuration.
#### Lead or Contact

Applies to:
* `multi:leadOrContact`


##### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bulk_batch_size</code></td>
<td><code>integer</code></td>
<td style="vertical-align: top;">Bulk batch size</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>concurrency_mode</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Concurrency mode<br/><br/>Accepted values: `Parallel`, `Serial`</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>create_records_as</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Create new records as<br/><br/>Accepted values: `Contact`, `Lead`, `ContactIfAccountId`</td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>ingestion_api</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Ingestion API<br/><br/>Accepted values: `automatic`, `bulk`, `rest`</td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>rest_batch_size</code></td>
<td><code>integer</code></td>
<td style="vertical-align: top;">REST batch size</td>
<td><code>optional</code></td>
</tr>
</tbody>
</table>


##### Example
```json
{
  ...
  "target": {
      "configuration": {
        "bulk_batch_size": 100,
        "concurrency_mode": "Parallel",
        "create_records_as": "Contact",
        "ingestion_api": "bulk",
        "rest_batch_size": 200
    }
  }
}
```


#### Leads

Applies to:
* `Lead`


##### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bulk_batch_size</code></td>
<td><code>integer</code></td>
<td style="vertical-align: top;">Bulk batch size</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>concurrency_mode</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Concurrency mode<br/><br/>Accepted values: `Parallel`, `Serial`</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>ingestion_api</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Ingestion API<br/><br/>Accepted values: `automatic`, `bulk`, `rest`</td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>insert_null_values</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Copy null values</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>invalid_relationships</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Records with invalid relationship IDs<br/><br/>Accepted values: `error`, `omit_values`, `omit_records`</td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>only_sync_different</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Only update if different from Salesforce</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>rest_batch_size</code></td>
<td><code>integer</code></td>
<td style="vertical-align: top;">REST batch size</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>skip_converted</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Ignore converted and duplicate leads</td>
<td><code>optional</code></td>
</tr>
</tbody>
</table>


##### Example
```json
{
  ...
  "target": {
      "configuration": {
        "bulk_batch_size": 100,
        "concurrency_mode": "Parallel",
        "ingestion_api": "bulk",
        "insert_null_values": false,
        "invalid_relationships": "error",
        "only_sync_different": false,
        "rest_batch_size": 200,
        "skip_converted": false
    }
  }
}
```


#### Other targets


##### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bulk_batch_size</code></td>
<td><code>integer</code></td>
<td style="vertical-align: top;">Bulk batch size</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>concurrency_mode</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Concurrency mode<br/><br/>Accepted values: `Parallel`, `Serial`</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>ingestion_api</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Ingestion API<br/><br/>Accepted values: `automatic`, `bulk`, `rest`</td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>insert_null_values</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Copy null values</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>invalid_relationships</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Records with invalid relationship IDs<br/><br/>Accepted values: `error`, `omit_values`, `omit_records`</td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>only_sync_different</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Only update if different from Salesforce</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>rest_batch_size</code></td>
<td><code>integer</code></td>
<td style="vertical-align: top;">REST batch size</td>
<td><code>optional</code></td>
</tr>
<tr>
<td><code>sort_batches_by</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Sort batches by</td>
<td><code>required</code></td>
</tr>
</tbody>
</table>


##### Example
```json
{
  ...
  "target": {
      "configuration": {
        "bulk_batch_size": 100,
        "concurrency_mode": "Parallel",
        "ingestion_api": "bulk",
        "insert_null_values": false,
        "invalid_relationships": "error",
        "only_sync_different": false,
        "rest_batch_size": 200,
        "sort_batches_by": "AccountId"
    }
  }
}
```









## Bulk Sync
### Source
Salesforce connections may be used as a bulk sync source. No additional configuration options are required.