# Insert Salesforce Data

The following articles describe using the **Single Dataloader** to insert data into Salesforce. The data is inserted via a CSV file.

1. Log in to your ARM account.
2. Hover your mouse over the [**`Dataloader`**](https://www.autorabit.com/blog/10-benefits-of-salesforce-data-loader/) module and select **`Dataloader`**. The **Dataloader** screen is best viewed when the zoom setting is **75%** on your Chrome/Firefox browser.
3. Click **`Insert`** 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%2FNDdjzvTGksbl7Fo3vxXL%2Fimage.png?alt=media&#x26;token=fdeaaf37-7a71-4a74-8d81-67d2f5110e36" alt=""><figcaption></figcaption></figure>

4. Choose your **`Salesforce Org`** and your org **Environment** (*Production* or *Development e*dition, *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`** to fetch all the objects from your Salesforce org.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FLtA2WapgfKUkUCVebCK9%2Fimage.png?alt=media&#x26;token=80be1a71-dcf6-48ad-a40f-693cfb223eed" alt=""><figcaption></figcaption></figure>

7. Select the object in which you wish to insert the data. For example, **Account**, **Contact**, **Lead**, etc. You can use the **`search`** function to search through your objects and the **`filter`** button to filter your standard/custom objects quickly.
8. Click **`Next`**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FzfdL692WQtrfzGKaSw6M%2Fimage.png?alt=media&#x26;token=dc841100-f8bf-4c8f-99ae-509d5f4f98eb" alt="" width="563"><figcaption></figcaption></figure>

9. You can import your file from your local directory on the next screen. Upload the **`CSV`** file you wish to import by clicking the **`Upload`** button.
10. A notification pop-up will display the number of records that will be impacted. Click **`OK`**.
11. The next step is to prepare your field mappings. Field mappings match columns in your CSV to fields in your Salesforce org. When clicking on a salesforce field, use the **"Quick Search"** function to search through those and the quick filter tabs to find your *Required*, *Unmapped*, *IDs* and *Custom fields*.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FvvlycolZk7riHA9Yrhmz%2Fimage.png?alt=media&#x26;token=1cc3d0f5-a415-4bab-b92c-adcdb04414f0" alt="" width="415"><figcaption></figcaption></figure>

12. You can automatically map the members and the fields using **`Automap`**. It compares the destination fields with the fields available in uploaded CSV files, and if both match, the value is selected automatically.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F2V1DTuuDwCwnDJ41mhvK%2Fimage.png?alt=media&#x26;token=c4c4a7ff-c3eb-4de7-b733-f8631caf2f56" alt=""><figcaption></figcaption></figure>

13. The number of fields mapped out of the total number of fields is displayed below the **`Automap`** checkbox.
14. Use the **`search`** option to look up a field by name from the long list to map it.
15. Use the **`Filter`** dropdown to choose which fields to display:
    * **`All:`** Displays all fields, whether they have been mapped or not.
    * **`Mapped:`** Displays only the fields which have been mapped yet.
    * **`Unmapped:`** Displays only the fields which haven't been mapped yet.\
      After selecting the filter, the list updates automatically as you map or unmap each field.
16. Make sure you have mapped all the required fields. Otherwise, you can't move forward. Click **`Next`**.Lookup Reference ObjectsIf you need an object ID but don't have it, you can use the lookup function to retrieve it dynamically. For example, if you're importing Contacts with the **"Account name"** but not the **"ID,"** you can use the [lookup feature](https://knowledgebase.autorabit.com/~/revisions/cT0ZuVgeUzTQt27sMR9n/product-guides/arm/arm-features/dataloader/single-dataloader/using-data-loader-with-lookups) to find it.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FZrABxLRiHzHDLNjGN2en%2Fimage.png?alt=media&#x26;token=336dd213-742e-4d30-972a-084cac19c49e" alt="" width="448"><figcaption></figcaption></figure>

17. On the **`Process Summary`** screen, you can:
    * Give the process/job a **name**.
    * Select the **`Category`**. Categories are used to classify and group similar processes having similar functionality. In simple terms, you are assigning similar processes to a category. You can select an existing category or create a new one by clicking the **`+`** icon.
    * View the main object.
    * View the operation **`Type`** *(Insert)*.
    * View the number of impacted **records**.
18. You can schedule your tasks so they start running regularly. You can choose between **`Daily`**, **`Weekly`**, or **`On-demand`** schedules.
19. Finally, click **`Save`** to save your task and run it later.
20. Your task is listed at the top of the list on the **`Dataloader Summary`** screen.
21. Click **`Run`** to start Dataloader immediately before the scheduled time.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FihlOdbojfyZTHMH3B6nM%2Fimage.png?alt=media&#x26;token=7286b8a4-7378-4cb1-8f6a-b585be641a96" alt="" width="563"><figcaption></figcaption></figure>

22. Select the criteria you can set for the data loader process to continue:

| Configurations                                             | Descriptions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Batch Size                                                 | <p>Whenever the Bulk API checkbox is left unchecked, the Batch API is used.<br><br>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                                     | All the workflows of the Salesforce objects are deactivated, and the data is transferred from the source to the destination sandbox. Once the migration is complete, workflows are reactivated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Disable Validation Rules                                   | Validation rules verify that the data a user enters in a record meets the specified criteria before the user can save the record. On selection, all the validation rules of the Salesforce objects are deactivated, and the data is transferred from the source to the destination sandbox. Once the migration is complete, validation rules are reactivated.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Insert/Update with null values.                            | This will either insert or update record field values with null (if the value is null in source org) in destination org.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Use UTF-8 file encoding for file read and write operations | Use UTF-8 as the internal representation of strings. Text is transcoded from the local encoding to UTF-8 when data is written to or read from a file. UTF-8 must be enabled in your data exclusively containing English alphabets. UTF-8 must be disabled if your data contains non-English alphabets. UTF-8 should be enabled by default as per Salesforce.                                                                                                                                                                                                                                                                                                                                                                                                                                      |

23. Click **`Run`**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FiT25DdCLHP9vRJ2gJaV0%2F1.png?alt=media&#x26;token=8b049d8b-6d6c-4b8b-9e55-e03a39bf6c3a" alt="" width="375"><figcaption></figcaption></figure>

24. The **`Results of Last Run`** section shows the number of successful or failed records. The values in this field are updated dynamically while the job is still running. You can view the records or download them to your local system. The records are generated in CSV format.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FV9TDFzHYFbCjx6o7rIXW%2Fimage.png?alt=media&#x26;token=f43a8940-b607-46c4-b1a7-b5b662329f76" alt="" width="563"><figcaption></figcaption></figure>

25. The number of impacted records can be seen in the **`Records`** section. The value in this field is updated dynamically while the job is still running.

### More Options <a href="#more-options" id="more-options"></a>

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FXCjijRdhfN0SWSw48ckz%2Fimage.png?alt=media&#x26;token=d309fb4d-ef91-4d96-9fec-1949ef5a65b7" alt="" width="563"><figcaption></figcaption></figure>

1. **`Edit:`** Modifies or updates the process details.&#x20;
2. **`Abort:`** Aborts the process while it is still running.
3. **`Schedule:`** Sets the schedule at which the process must run.
4. **`Delete:`** Deletes the insert process
5. **`Log:`** Provides information about the execution of the inserted task.
6. **`VR/WFR:`** ARM lists all the validations/workflow rules that were set. The UI lists all the validation rules, and users must enable them for the disabled validation rules (if required). For more info, refer to the article: [Validation/ Workflow Rules](https://knowledgebase.autorabit.com/~/revisions/cT0ZuVgeUzTQt27sMR9n/product-guides/arm/arm-features/dataloader/validation-workflow-rules). Sample VR/WFR attached:

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fm2K62DlozXyruEQSVBiy%2Fimage.png?alt=media&#x26;token=2569d57e-9084-4515-879f-ff83eff27205" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FnV3C9osBhlz3QBEqWDTG%2Fimage.png?alt=media&#x26;token=d9d83c8b-b6ae-4ee7-ba0b-7b0f328004f5" alt=""><figcaption></figcaption></figure>

7. **`Clone:`** Creates a copy (clone) of the insert process. Operation type and object name are displayed. Enter the **`Process Name`** in the field. The default **`Salesforce Org`** is automatically selected. To choose a different org, use the dropdown list. Select the **`Choose Different Data CSV File`** check box to upload a different CSV file. Finally, click **`Clone`**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FDyXfHamDzK8LQS67jN1Z%2Fimage.png?alt=media&#x26;token=958d1f57-506b-4b67-973f-b3cf9f854ee5" alt="" width="399"><figcaption></figcaption></figure>
