function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LFILFI 

Importing Contacts does not create Accounts and permissions issue

Hello,
I am helping a non-profit organizationg and setting up SF system for them. We need to import a list of about 2500 Contacts from another system. I have already created the fields and mappings, and import works. However during the import, accounts are not created and thus the contacts remain private. From there there are tons of other permissions related issues, suchs as the reports and dashboards don't work. I tried importing from both the Data Loader and the Data Wizard. Both don't create accounts, just contacts.
What am I missing and is there another way to upload a large CSV? We have the non-profit package for Sales Force if that has any limitation. Appreciated any thoughts on the problem!
Best Answer chosen by LFI
MissedCallMissedCall
Yes you can do that and i will leave the decision upto you. 

Create one account and have that id handy. Then in your contacts import file, include one other column "AccountId" (exclude quotes). When you perform data load make sure you map accountId column to accountId field on contacts. 

All Answers

MissedCallMissedCall
Hi,

Let me try answering part of your question, 

Before you import contacts, You need to import Accounts first (and have these newly created id's handy). If you think accounts already exist in sfdc, you will need these account id's maaped into your contact import file. That's how you create accounts and tie them to your contacts. Get through this part first and let me know if you have any problems with it.

Thanks.
LFILFI
Hello,
I have about 100 custom fields in the Contacts object that match the CSV we are getting from this other system. Do I need to create the same fields for the Accounts object or what is the bare minimum? I read something about that it needs names and company. I have the contact names in separate fields for first/middle/last. Thanks for any suggestions!
MissedCallMissedCall
From where ever you are getting the contact records, check how are they related to accounts (or 1 account). See what data is populated in that account record. 

Now you want to import this account data first and yes, you have to do some data massaging in order to map account data from your legacy system to sfdc (to learn about account object and fields: https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_account.htm#topic-title) 

In order to understand bare minimum for creating account, go into sfdc and try creating an account by navigating to accounts tab. 
LFILFI
I see I can have many contacts under one account. Can I create one Account with a name MyCompany, and then import all 2500 contacts under that? I'm trying to avoid any data massaging as the people that will be using the system are non-tech savy
MissedCallMissedCall
Yes you can do that and i will leave the decision upto you. 

Create one account and have that id handy. Then in your contacts import file, include one other column "AccountId" (exclude quotes). When you perform data load make sure you map accountId column to accountId field on contacts. 
This was selected as the best answer
MissedCallMissedCall
I forgot to include, please populate account id that you had handy into the accountId column for every row of contac data in your spreadsheet.
LFILFI
Yea, I created one account, got the ID number added the column/value to each line in the contacts.csv that I am trying to import. Another thought, can I create a Workflow rule to set the Account Name to that ID when new contact is created and that will link the contacts automatically to that account, without any changes to the original CSV?
LFILFI
So the AccountID is a reference field, and it won't let me update it during the import, just gives errors. Any workarounds?
 
MissedCallMissedCall
You cannot update accounts using contacts spreadhsheet. It's a sequential process. When importing contacts, all you could do on accounts is, tying contacts with accounts.
MissedCallMissedCall
For data loads, you really don't need to create wf rule or any sort of that activity. Instead, Just add an extra column to your spreadheet. What's the difficulty in it?
LFILFI
So I created the account and did an export to grab the Account ID. Then I added that column to the contacts.csv and imported. For some reason it did not work. Then I did the opposite - created a test contact under the account, exported to get the ID (which was the same as the first time), then added to the contacts.csv and import worked this time. Not sure what happend the first time, maybe there was a white space somewhere in the account ID or something. I think I'm all set :)