AdvologixPM

Data Loader: Inserting, Updating, or Deleting Data (optional)

Updated on

The insert, update, upsert, delete, and hard delete wizards in the Data Loader allow you to add new records, modify existing records, or delete existing records.

Note that “upsert” is a combination of inserting and updating - if a record in your file matches an existing record, the existing record is updated with the values in your file.

If no match is found, then the record is created as new. When you hard delete records, the deleted records are not stored in the Recycle Bin and become immediately eligible for deletion.  

Getting Started

  1. Start the Data Loader on your PC by choosing Start | Programs | salesforce.com | Data Loader | Data Loader.
  2. Click Insert, Update, Upsert, Delete or Hard Delete. These commands can also be found in the File menu. For example, to insert new Account records, begin by clicking Insert.
  3. Enter your Salesforce username and password. Click Log in to log in. After your login completes successfully, click Next. (Until you log out or close the program, you are not asked to log in again.)
    • If your organization restricts IP addresses, logins from untrusted IPs are blocked until they're activated. 
    • Salesforce automatically sends you an activation email that you can use to log in. 
    • The email contains a security token that you must add to the end of your password. 
    • For example, if your password is mypassword, and your security token is XXXXXXXXXX, you must enter mypasswordXXXXXXXXXX to log in. 
  4. Choose an object.
    • For example, if you are inserting Account records, select Account. If your object name does not display in the default list, check Show all objects to see a complete list of the objects that you can access.
    • The objects are listed by localized label name, with developer name noted in parentheses.
    • For object descriptions, see the Web Services API Developer's Guide.
  5. Click Browse... to select your CSV file. For example, if you are inserting Account records, you could specify a CSV file named insertaccounts.csv containing a Name column for the names of the new accounts.
  6. Click Next. After the object and CSV file are initialized, click OK.
  7. If you are performing an upsert:
    • Your CSV file must contain a column of ID values for matching against existing records.
      • The column may be either an external ID (a custom field with the “External ID” attribute), or Id (the Salesforce record ID).
      • From the drop-down list, select which field to use for matching.
      • If the object has no external ID fields, Id is automatically used.
      • For more information on external IDs, see Custom Field Attributes.
      • Click Next to continue.
    • If your file includes the external IDs of an object that has a relationship to your chosen object, enable that external ID for record matching by selecting its name from the drop-down list.
      • If you make no selection here, you can use the related object's Id field for matching by mapping it in the next step.
      • Click Next to continue.
  8. Define how the columns in your CSV file map to Salesforce fields. Click Choose an Existing Map to select an existing field mapping, or click Create or Edit a Map to create a new map or modify an existing map. For more details and an example of usage, see Defining Field Mappings.
  9. Click Next.
  10. For every operation, the Data Loader generates two unique CSV log files; one file name starts with “success,” while the other starts with “error.”
    • Click Browse... to specify a directory for these files.
  11. Click Finish to perform the operation, and then click Yes to confirm.
  12. As the operation proceeds, a progress information window reports the status of the data movement.
  13. After the operation completes, a confirmation window summarizes your results.
    • Click View Successes to view your success file, click View Errors to open your errors file, or click OK to close.

For more information, see Reviewing Output Files.

Previous Article Install the Data Loader (optional)