Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I would like to import several contacts into Salesforce and avoid duplicates. I would like to do this via upsert (not the the import wizard). For the upsert I plan on using dataloader.io.

I have performed an export of the Account and Contact objects in two separate CSV files. For the export of the Contact object, I have the (record) Id and Account Id.

I am not sure how to update the working CSV that contains new Account and Contact information with the information from the exported sheets.

What are the steps to preparing the working CSV to upsert into Salesforce?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

When performing an upsert you can avoid duplicates by matching on either the Salesforce ID or custom External ID type field. If your performing an upsert, or update using dataloader.io, you must map a column to the Salesforce ID or an external ID.

Using dataloader.io, the ~ steps: Import your parent Account records.

  1. Select the Import option
  2. Select the import operation type – upsert.
  3. Select the object you wish to import data into Account.
  4. Verify Mapping Between Fields
  5. Click Next Upload the CSV file you wish to import by clicking the Upload CSV button.

Import your child Contact records, ensure the Account field contain the name of your Accounts.

  1. Select the Import option
  2. Select the import operation type – upsert.
  3. Select the object you wish to import data into Contact.
  4. Verify Mapping Between Fields
  5. You'll need to Lookup the Account Ids you've just imported, on the mapping file, select your Account field, and choose the "Lookup via Account" Account Name.
  6. Click Next Upload the CSV file you wish to import by clicking the Upload CSV button.

Note, because you are upserting from an export ensure your upsert files do not contain any system fields.

Good Luck.

share|improve this answer
    
Say the contact already exists in Salesforce, as well as on my working CSV. That is, I have a duplicate entry of Contact A on my CSV. On one row I have Contact A’s information, along with a column called Account Id and a column called Id (the Contact Record Id?). On the other row, (the duplicate) I have Contact A but this row contains additional information for other fields. This row, however, has blank cells for ‘Account Id’ and (Record) ‘Id’. For the Upsert, should I copy over the Account Id and (Record) Id to the duplicate entry of Contact A and then follow the steps listed above? –  rahi Dec 14 '12 at 18:55
    
You need to copy the contact ID as this the PK used to upsert and will merge duplicates. You need to include the account name (lookup) as well so that its not updated as null. –  rcraven Dec 16 '12 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.