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.

The following articles describe using Single Dataloader to upsert data into Salesforce. The data is upserted 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.

  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 to fetch all the objects from your Salesforce Org.

  7. Select the object you wish to upsert 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.

  9. 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.

  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.

  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.

  17. On the Process Summary screen, you can:

    1. Give the process/job a Name.

    2. 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 either select an existing category or create a new category by clicking the + icon.

    3. Select the External ID field. An external ID field is simply a field that is a unique identifier for your record, other than the Salesforce ID, usually coming from an external system. For example, if you are importing accounts, you may have a field called ERP Account Number, the identifier for your Accounts within your ERP system.

    4. View the main Object.

    5. View the operation Type (Upsert).

    6. View the number of impacted Records.

    7. Use Bulk API.About Bulk APIThe Bulk API is based on REST principles and is optimized for inserting, updating, and deleting large data sets. You can use the Bulk API to process jobs in serial or parallel mode. Processing batches serially means running them one after another, while processing batches in parallel means running multiple batches simultaneously. When you run a bulk API job, processing more batches in parallel means giving that job a higher degree of parallelism, providing better overall data throughput.

  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 on top of the lists in the Dataloader Summary screen.

  21. Click Run to start the Dataloader immediately before the scheduled time.

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

  23. Click Run.

  1. The number of successful or failed records upserted can be seen in the Results of Last Run section. 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.

  2. 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

  1. Edit: Modifies or updates the process details.

  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 upsert process.

  5. Log: Provides information about the execution of the upserted 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. Sample VR/WFR attached:

  1. 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.

Last updated