> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ETL: Salesforce REST API Destination

> Configure the Salesforce REST API destination to write records to Salesforce Sales Cloud objects with per-record success and failure outputs.

The Salesforce REST API destination writes records to Salesforce Sales Cloud objects through the Salesforce REST API. Use it when you need per-record success and failure feedback, or when the Bulk API is not a good fit for your workload size or latency requirements. For high-throughput asynchronous loads, use the [Salesforce Bulk API destination](/docs/etl/using-components-salesforce-destination) instead.

## Connection

Select an existing Salesforce connection or create a new one. See [Allowing Integrate.io ETL access to my data on Salesforce](/docs/etl/allowing-integrateio-etl-access-to-my-data-on-salesforce) for setup.

<Note>
  **Salesforce orgs with IP login restrictions:** Salesforce connections route through Integrate.io's secure proxy by default. If your Salesforce org limits access by IP (for example, **Login IP Ranges** on a user profile, or **Trusted IP Ranges** under **Setup → Network Access**), allowlist Integrate.io's IP addresses so the connection can authenticate and run. See [Integrate.io ETL's IP addresses](/docs/etl/integrateio-etls-ip-list/).
</Note>

## Destination properties

* **Target object** - the API name of the Salesforce object to write to (for example, `Account`, `Contact`, or a custom object like `Invoice__c`).
* **Operation** - one of:
  * **Insert** - creates new records.
  * **Update** - updates existing records matched on the ID field.
  * **Upsert** - inserts new records and updates existing ones matched on an external ID field.
  * **Delete** - deletes records by Salesforce ID.
* **ID field** - required for **Update**, **Upsert**, and **Delete**. For **Update** and **Delete** this is typically the Salesforce internal `Id`. For **Upsert** this is the external ID field on the target object.

## Write mode

Controls how records are sent to Salesforce.

* **Single per record** - sends one HTTP request per record. Use this when you need precise per-record error handling or when you must throttle request volume against a rate-limited org.
* **Batch** - groups records into a single request using the Salesforce composite sObjects Collections API. Batch size is capped at 200 records per call, which matches the Salesforce API limit.

### Batch size

Available in **Batch** mode. Maximum and default is 200. Salesforce rejects composite requests larger than 200 records.

### Request sleep interval

Available in **Single per record** mode. Sets a delay between requests, from `0` to `60000` milliseconds. Use this to stay within your Salesforce API request limits.

## Field mapping

Map input fields to Salesforce fields on the target object. Field names must match the API names on the object.

* For **Insert**, map every field required on the object.
* For **Update**, map the ID field and every field you want to change.
* For **Upsert**, map the external ID field and the fields you want to write. Unmapped fields are left unchanged on existing records.
* For **Delete**, map only the ID field.

### Null handling

Enable **Include null values in the payload** to send `null` for unmapped or empty input fields. When disabled, null fields are omitted so existing values on the record are preserved.

## Error handling

* **Maximum failed records** - the job fails once the cumulative number of failed records across all requests exceeds this value. Set to `0` to fail on the first error. Leave empty to continue through all records regardless of failures.
* **Output failed records (CSV)** - writes a CSV of failed records and the Salesforce error message for each to a file storage connection. Supports Amazon S3, Google Cloud Storage, SFTP, FTPS, Azure Blob Storage, and Google Drive.
* **Output successful records (CSV)** - writes a CSV of successfully written records, including the returned Salesforce ID for inserts and upserts. Supports the same connection types as failed records.

To write either CSV to Google Drive, re-authenticate the Google Drive connection once before you first use it as an output target. The re-authentication grants the additional `drive.file` scope required for uploads.

## When to use this destination

Use the Salesforce REST API destination when you need:

* Per-record success and error output for reconciliation.
* Synchronous writes with immediate response, without polling a Bulk job.
* Fine-grained throttling through **Request sleep interval**.
* Composite writes of small to medium volumes (up to 200 records per request).

Use the [Salesforce Bulk API destination](/docs/etl/using-components-salesforce-destination) when you need to write large volumes asynchronously through the Bulk API.

## Related

<CardGroup cols={2}>
  <Card title="Salesforce Bulk API Destination" icon="arrow-right" href="/docs/etl/using-components-salesforce-destination" horizontal />

  <Card title="Salesforce Source" icon="arrow-right" href="/docs/etl/using-components-salesforce-source" horizontal />

  <Card title="Allowing Integrate.io access to Salesforce" icon="arrow-right" href="/docs/etl/allowing-integrateio-etl-access-to-my-data-on-salesforce" horizontal />

  <Card title="REST API Destination" icon="arrow-right" href="/docs/etl/using-components-rest-api-destination" horizontal />
</CardGroup>
