# Upsert Salesforce Data

**Upsert** is a combination of Updating and Inserting. If a record in a file matches an existing record, the existing record is updated with the values in your file. The record is created as a new entity if no match is found.

**Limitation on Record ID Availability**\
Except for the **Upsert** operation in a single DataLoader job, when errors occur during data operations, Salesforce imposes a limitation where **record ID information is not available** in the error details.

The following articles describe using **Single DataLoader** to upsert data into Salesforce via a CSV file.

1. Log in to your ARM account.
2. Hover your mouse over the **`DataLoader`** module and select **`DataLoader`**.
3. Click **`Upsert`** on the right side of the screen.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F0t4yRSQCB4jzNzm55z2r%2Fimage.png?alt=media&#x26;token=61535176-7759-48d4-aa2b-932950a90ba0" alt="Upsert option in Dataloader UI"><figcaption></figcaption></figure>

4. Choose your **`Salesforce Org`** and your org environment (**`Production or Development Edition`**, **`Sandbox`**, or **`Pre-Release`**).
5. The corresponding **`URL`** and your **`Username`** are automatically generated based on the above selection.
6. Click **`Login and Fetch Objects`**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FZY1yE0YXk37skudPQlmS%2Fimage.png?alt=media&#x26;token=539c41c8-3084-4bc8-92e7-0f82023a9b77" alt="Login and fetch Salesforce objects"><figcaption></figcaption></figure>

7. Select the object you wish to upsert data into (e.g., **`Account`**, **`Contact`**, **`Lead`**). Use the **`search`** function and **`filter`** button for convenience.
8. Click **`Next`**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FBAVd40hT1YRiOloqAqos%2Fimage.png?alt=media&#x26;token=e0e4fc76-978c-4a97-ba59-90d1e1aa00d4" alt="Object selection page" width="563"><figcaption></figcaption></figure>

9. Upload your CSV file by clicking the **`Upload`** button.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FtOa1efnl42jtJr73VBav%2Fimage.png?alt=media&#x26;token=8d459f7c-9c03-441f-8223-0aceb2eb8e8b" alt="CSV upload screen"><figcaption></figcaption></figure>

10. Click **`OK`** on the notification popup showing impacted records.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FnFJHxs7EEsUvysmvDPZ3%2Fimage.png?alt=media&#x26;token=d415b44a-d843-4bb9-a752-a70cbe289458" alt="Notification on number of records affected"><figcaption></figcaption></figure>

11. Prepare field mappings: Match CSV columns to Salesforce fields.
12. Use **`Automap`** to match fields automatically if names align.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F6Cgiq09vwkGvykKLeVo2%2Fimage.png?alt=media&#x26;token=fe128cb6-0448-4e4d-a451-dc722c513313" alt="Field mapping with Automap"><figcaption></figcaption></figure>

13. Confirm all required fields are mapped, then click **`Next`**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FlO1rw1cfQVlGWjzioGh3%2F6.png?alt=media&#x26;token=e8c42c03-2d80-4c95-aa1c-bc2ec85c223c" alt="Process summary screen"><figcaption></figcaption></figure>

### Process Summary Options

* **Name:** Assign a name to the job.
* **Category:** Organize processes by categories (create new or use existing).
* **External ID Field:** Specify unique identifier other than Salesforce ID (e.g., ERP ID).
* **Object:** Displays the object being upserted.
* **Operation Type:** Displays **Upsert**.
* **Impacted Records:** Shows record count.

You can also schedule tasks as **Daily**, **Weekly**, or **On-demand**. Click **`Save`** to store and run later.

14. The task appears in the **DataLoader Summary** list.
15. Click **`Run`** to execute the task immediately.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FLAkPlw4f4UQw4mMGIdB8%2Fimage.png?alt=media&#x26;token=d5f339f8-319a-47e3-acbc-da375712a814" alt="Run Dataloader job" width="563"><figcaption></figcaption></figure>

### DataLoader Configuration Options

| Configuration                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Batch Size**                     | <p>Salesforce Batch API is based on SOAP principles and is optimized for real-time client applications that update small numbers of records at a time. Although SOAP API can also process large numbers of records, it becomes less practical when the data sets contain hundreds of thousands of records. In those cases, Bulk API is the best option. Batch API processes data in smaller batches than Bulk API, resulting in a higher API call usage per operation on large volumes of data.<br><br><strong>Note:</strong> <em>When you run a Bulk API job, processing more batches in parallel means giving that job a higher degree of parallelism, giving your overall run better data throughput.</em></p> |
| **Disable workflow rules**         | Deactivates workflows during operation and reactivates post-process.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Disable Validation Rules**       | Deactivates validation rules during the process and re-enables afterward.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Insert/Update with null values** | Allows null value updates in destination org.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Use UTF-8 file encoding**        | Required for data containing English alphabets. Disable for non-English content.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

22. Click **`Run`** to begin.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FwG3HD8ViAl9h5Sz2vRGE%2F7.png?alt=media&#x26;token=417b2292-6dcb-42c5-b4e6-5272aa835619" alt="Click Run to initiate upsert job" width="375"><figcaption></figcaption></figure>

### Results Monitoring

* **Results of Last Run:** Shows success/failure record count dynamically.
* **Records:** Displays the total records affected.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FE4G5AFPI9yr0nDvxOdb8%2Fimage.png?alt=media&#x26;token=19bf05e0-68c0-4b9e-9612-0d5ca615cec8" alt="Results of last run" width="563"><figcaption></figcaption></figure>

### More Options

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F21QxWi6XzheGDWStfIOu%2Fimage.png?alt=media&#x26;token=795e5f7f-d5c7-446b-9548-90e751309ee3" alt="More options menu" width="563"><figcaption></figcaption></figure>

1. **Edit:** Update job configuration.
2. **Abort:** Stop a running job.
3. **Schedule:** Set periodic execution.
4. **Delete:** Remove the job.
5. **Log:** View execution logs.
6. **VR/WFR:** View validation/workflow rules. See [Validation/ Workflow Rules](https://knowledgebase.autorabit.com/product-guides/arm/arm-features/dataloader/validation-workflow-rules).
7. **Clone:** Create a copy of the process with an option to choose a different data file.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FzUxj8gFahen2v9VmcuIu%2Fimage.png?alt=media&#x26;token=dc2f0ac1-0a62-4a22-8448-2ca98d736a6f" alt="Clone a dataloader job" width="398"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.autorabit.com/product-guides/arm/arm-features/dataloader/single-dataloader/upsert-salesforce-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
