Import Data to a Standard Object

Now that we’ve created our staging and target fields, and connected them with Advanced Mapping, it’s time to format our data and put it through the NPSP Data Import process.

A process map with format data for import, import to staging fields, check your work, and import to target fields

Add Fields to the Import Template

You should know by now that 99% of the work you do on any data import is outside of Salesforce, so now it’s time to hit the spreadsheets.

The staff at NMH celebrate around a screen showing a spreadsheet

First, download the NPSP Data Import template. There are two tabs where you can enter data: Import Wizard Template uses field labels to match data, while Data Loader Template uses API names.

If you were to use Salesforce Data Loader or Dataloader.io, you would use the Data Loader Template. For this project we’re using the Data Import Wizard and the Import Wizard Template, so open up that tab and let’s get started adding our new columns.

  1. Add a new column after Contact1 Title, and enter Contact1 Preferred Language in the header row.
  2. Add another column after your new Contact1 Preferred Language column, and enter Contact1 Email Opt Out in the header row.

    The new column headers

  3. Add a new column after Contact2 Title, and enter Contact2 Preferred Language in the header row.
  4. Add another new column after Contact2 Preferred Language, and enter Contact2 Email Opt Out in the header row.
  5. Delete the sample data in the first row.
  6. Save the template but leave it open. We’ll use it in the next step.

Create Test Records

Now, it’s time to enter some test data to see how the import works with our new fields and mappings. Create a copy of the spreadsheet you just modified (preserving a version with all of the fields that we'll use in a later step) and and enter two rows of data:

  1. First, enter a row with these details:
    1. Contact1 FirstName: Elisa
    2. Contact1 LastName: Harmon
    3. Contact1 Preferred Language: English
    4. Contact1 Email Opt Out: True (Remember that in a picklist that is being translated to a checkbox, “True” means “Checked.”)
    5. Contact1 Personal Email: elisa@mailinator.com 
    6. Contact1 Preferred Email: Personal
    7. Contact2 FirstName: Bryan
    8. Contact2 LastName: Harmon
    9. Contact2 Preferred Language: English
    10. Contact2 Email Opt Out: False
    11. Contact2 Personal Email: bryan@mailinator.com
    12. Contact2 Preferred Email: Personal
  2. Next, enter these details into another row:
    1. Contact1 FirstName: Bill
    2. Contact1 LastName: Rodriguez
    3. Contact1 Preferred Language: Tagalog
    4. Contact1 Email Opt: False (In a picklist that is being translated to a checkbox, “False” means “Unchecked.”)
    5. Contact1 Personal Email: bill@mailinator.com
    6. Contact1 Preferred Email: Personal
  3. Optionally, you can delete all columns without data to avoid hitting data limits. (You should only have columns A through L after this.) It's important that you're working from a copy of your template when you do this, though, because later in this project you'll need the full template that includes our new fields and others we aren't using here. See the note below for advice on creating your own templates.
  4. Save a copy of the file as a .csv in an easy-to-find place, like your desktop.
Note

Note

The NPSP Data Import template is a good place to start, but it’s best practice to modify and save versions of it to create your own custom templates. This way, you can save time and focus on just the fields you need for the data you import most often.

Upload Your CSV to NPSP Data Import Objects

It’s time to test our work by importing it to NPSP Data Import objects.

  1. Go to the App Launcher (The App Launcher icon) to find and select NPSP Data Imports.
  2. Click Import.

    The Import button

  3. You’re now in the Data Import Wizard. On the Custom objects tab, click NPSP Data Imports.
  4. You’ll see three options in the “What do you want to do?” panel. With NPSP Data Imports, you always want to click Add new records because we are creating new NPSP data import staging records.
  5. Leave the settings below Add new records as the default.
  6. In the “Where is your data located?” panel, either drag your CSV to where it says “Drag CSV file here to upload” or click CSV and then Choose file to select the CSV you saved earlier.

    The Data Import Wizard with the options above selected

  7. Click Next in the lower right corner.
  8. You’re now on the Edit Field Mapping page. This is an important step to make sure our CSV headings match the NPSP Data Import staging fields. Because we used the same text in the CSV and in the Data Import staging object, these should all match. Check this one more time, and then click Next.

    The Edit Field Mapping page showing the new fields we added

  9. On the Review & Start Import page, you should see that the import will include 12 mapped fields and 0 unmapped fields. Click Start Import.

    The Review & Start Import page

  10. Click OK on the “Congratulations, your import has started!” popup.

    The Congratulations popup

You’ll see the Bulk Data Load Jobs screen with details about the import next. If you want to check the results, you can click View Result in the Batches section to download a CSV of records.

We should also check the NPSP Data Import records themselves. Use the App Launcher (The App Launcher icon) to go back to the NPSP Data Imports page, then select the To Be Imported list view. Check the first record, for Elisa Harmon, to make sure all of the fields appear as you’d expect.

Perform an Import Dry Run

Now that the records are in the NPSP Data Import object, let’s validate them by performing a dry run on the import to check for problems. (This is optional, but we want to double-check the records to make sure that everything is okay before we move ahead with the actual import.)

  1. Starting on the To Be Imported list view on the NPSP Data Imports page, click Start Data Import.
  2. Leave the settings as is, and click Begin Dry Run.

    The Begin Dry Run button on the NPSP Data Import page

  3. Wait for the dry run to complete and then check the status. You should have 2 records processed and 2 records validated. Click Close.

    The results of the dry run

  4. Back on the NPSP Data Imports page, change the list view to Dry Run - Validated.

    The Dry Run - Validated list view showing two records

Check out the records. They should both be validated and ready for import.

Import Your Data

With setup and a test run complete, we’re ready to send our data to their target fields and objects.

  1. On the Dry Run - Validated list view on the NPSP Data Import page, click Start Data Import.
  2. On the next page, leave the Configuration Options as they are, and click Begin Data Import Process.

    The Begin Data Import Process button

  3. Wait for the import to complete, and then check the status. You should have 2 records processed and 2 records imported. Click Close.

    The data import results

Let’s look for the records we just imported. Go to global search, and find and select the contact record for Elisa Harmon.


The Contact Details area on Elisa Harmon’s contact record

In the Contact Details section, we can see that her preferred language is set to English, and in the Contact Information section, we can see that the email opt-out box is checked.

The Contact Information area on Elisa Harmon’s contact record

NPSP Data Importer also created a new household account for her. Let’s click Harmon Household under Account Name and look at the related contacts.

Contacts on the Harmon Household

We can see that a record was also created for Bryan, who belongs in Elisa’s household. If we click into his record, we can see that his preferred language and email opt-out preference were imported, as well.

Now, let’s look at our other imported contact by searching for and selecting Bill Rodriguez in global search.

The Contact Details of Bill Rodriguez’s record


Looking at Bill’s record, we can see that his language and email opt-out preference were also imported.

It worked! This is great and helps to meet some of the goals at our (fictional) nonprofit, No More Homlessness (NMH), but what about its other goal? Can Gorav and the team at NMH set up a custom object and import data to it with NPSP Data Importer?

They can, and so can you! We’ll do just that in the next step.

But before you move on, be sure to select the playground you used to follow along with these steps, and click Verify to collect your points.

Resources