Updating Data Example: Updating the Organization Name for Contacts
When a volunteer registers on the public site, they enter their Employer Name, but they are still assigned t the Organization Name: "Individual"
That's because their employer's name, may not already exist as an organization in our database. Or they might type a variation on the organization's name that couldn't be matched to an existing organization.
However, if a sponsor, let's say Target, asks us to provide data about all their employees volunteerism -- we might want to update the record of anyone who works for Target from individual to "Target". And we also want to update their contact type to "Employee"
To do this - we create a report to find who those contacts might be. We then export and update the data. And then import the corrected data back into Salesforce to update all the records.
Step 1: Create the Report
We create a contacts and organizations report as we'll need info for both those objects.
Before we started, we considered what fields we would need for our report
We make sure the fields we need are present in the report we create:
I've created a report with the following fields:
- Contact ID (This is the Salesforce.com ID for the contact record
- First Name
- Last Name
- Employer (a field I am going to 'filter on' to find the records I'm looking for
- Organization Name (The field I want to update)
- Contact Type (The other field I want to update)
- Organization ID (so I can find the Organization ID to ensure I update the right organizational record)
I've filtered to get any records created in the last two years, and on any employer containing the word 'Target".
Notice the report returns a lot of variations on target, as reported by the volunteer when they registered.
We can see also that they are currently associated with the organization Individual and have no contact type.
Only John Target, the Chief Executive seems to be associated with our Target Organization. Notice that his organization ID is different.
That is the Salesforce.com ID for our organization record for Target.
I can now export the data by clicking on export details.
Exporting the data
I can choose to export the data as a .csv file or an excel file
I prefer to export the file as an excel file because on my system the .csv file appears as text in the browser, rather than automatically downloading a file I can open in excel.
I will have to convert the file to .csv before importing back into Salesforce however.
The resulting excel file can now be edited with the corrected information.
1) First I save the original file on my hard drive - in case I need to convert the data BACK the way it was! I do a "Save as" and save it now as a .csv file
2) You must delete the footer info in rows 12 - 16
3) I can now update the Organization Name for each organization to "Target", and update the contact type to each record to 'employee"
Note: I consult the picklist values and make sure that 'Employee' is a valid value, and that it uses an upper case 'E'. It must be an exact match.
Had I updated this to 'employee' it would import it, but skew my data reports as I'd now have some records with "Employee" and some with 'employee'.
My revised spreadsheet looks like this:
I'm now ready to import the data back into Salesforce
Batch Updating the Records
Go to Setup / Admin Setup / Import Accounts/Contacts to get the import wizard for accounts/contacts.
There are helpful tips on doing imports on the splash page.
Note that they recommend you import a small test tile of 5 records before importing, to ensure you have a correctly prepared import file. Good idea if you're doing a large update!
Click on "Start the Import Wizard to start!"
1. We choose our edited file.
2. Leave at default
3. We want to use the Salesforce.com ID (because in this case we have them). This will prevent duplicates
4. Salesforce.com ID for the Account matching type as well
5. We do not want to trigger workflows rules and send out emails to contacts
6. You can only update one account record type at a time. Target is Business!
Step 5: Map Account Fields
Here we have to manually map, because our field "Organization ID" is equivalent to what Saleforce calls Organization ID.
The same is true with Organization Name and Account.
We also need to check the box to to overwrite the existing account data for these records.
We have nothing to update in Step 6.
Because we have mapped all our fields - there will be no choices available for Step 7.
You can see when the import is completed
If I go to the Target organizational record - I see all my contacts are now associated with the organization
I can click on any of the contacts, and I'll see their contact type is now 'employee'.