Insert Users with Data Loader in Salesforce

Insert Users with Data Loader in Salesforce

Last Updated on March 28, 2022 by Rakesh Gupta

Big Idea or Enduring Question:

  • How to insert users with Data Loader in Salesforce?

There are times when you will have to create users in Salesforce, for example,

  1. At the end of project development, create users for UAT testing. 
  2. Load users from legacy system to Salesforce.
  3. You’ve hired a few members to your team. 

Creating users manually is a slow and tedious process. One option is to use Add multiple Users feature to achieve it.

It has its own limitations. Using a data loader to mass create users with different user licenses is the fastest way. 

Objectives:

After reading this blog, you’ll be able to:

  • Create CSV file to load the users in Salesforce
  • Use data loader to upload records in any object

Business Use case

Jestilla Zetkin is working as a System administrator at Gurukul On Cloud (GoC). She has received a requirement from her Sales Director to grant the new hires to Salesforce as per the below table:

Name
Email Profile
Role
Location
Lilah Madden nullam@yahoo.net Sales Representative Eastern Sales Team New York
Riley Wallace urna.justo@icloud.org Sales Representative Western Sales Team Los Angeles
Orli Hoover sed@hotmail.ca Sales Representative Eastern Sales Team Chicago
Nola Santana egestas@hotmail.com Sales Representative Eastern Sales Team Chicago

I have used a free test data generator tool generatedata.com.

Guided Practice (We-do): 

To insert users with Data Loader perform the steps below: 

  1. The first step is to identify the key fields to upload the user data from the data loader. 
    1. First Name
    2. Last Name
    3. Alias
    4. Username
    5. Email
    6. RoleId
    7. ProfileId
    8. LocaleSidKey
    9. LanguageLocaleKey
    10. EmailEncodingKey
    11. TimeZoneSidKey
    12. CurrencyIsoCode
  2. The next step is to find out RoleId for Eastern Sales Team and Western Sales Team.
    1. In the Query Editor, run the following SOQL query 
    2. Select id, name from userrole where Name IN (‘Eastern Sales Team’, ‘Western Sales Team’)
    3. Make sure to copy the role Ids. 
  3. The next step is to find out the profile Id for the Sales Representative profile.
    1. In the Query Editor, run the following SOQL query 
    2. Select id, name from profile where name=’Sales Representative’
    3. Make sure to copy the profile Id. 
  4. Now download the user creation template and start filling in the data.
  5. Open the Data Loader and click Insert.
    1. Log in with your Sandbox or Production username and password.
    2. Upon successful login, click Next.
  6. Select User object then choose user creation template CSV file created in step 4, and click Next.
  7. Click Create or Edit a Map button.
  8. Now select the Auto-Match Fields to Columns option to auto-match the Salesforce User object fields to columns mentioned in the CSV file.
  9. Verify the mapping and make sure it is correct, and then click OK
  10. In the end, select the folder location to save success and error files.
  11. Finally, click Finish and click Yes to proceed. 
  12. After the final process, a dialog box will appear with the number of successes and errors.

Check out the YouTube video for step-by-step instructions and some tips:

Points to Remember

  1. If you don’t specify the IsActive field when inserting users’ records from the data loader, it will automatically be inserted as Active. In case there are no sufficient licenses in your Salesforce org, you can insert the data with IsActive as False and activate the users once licenses are available.
  2. You can add more fields if needed, for example, address, department, manager, etc. 
  3. Here you can find a list of Salesforce-supported times zones.

Formative Assessment:

I want to hear from you!

What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? Feel free to share in the comments below.

Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.