Import Data to a Custom Object

Now that we have our new object created and the fields mapped, it’s time to go back into the spreadsheets and finish this import.

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

Update the Template

Open the template you modified earlier; the one you saved before you entered data and deleted columns.

Let’s add our new field to the template.

  1. Add a new columns after the Donation Type column.
  2. Enter Donor Survey Status in the header row.

    The new column headers in the spreadsheet

  3. Save the template.
Note

Remember that the Data Import template is just a starting point. You can use it to create your own templates for the data you import most often.

Create Test Records

Now, let’s create our test records.

  1. In the first data row of the template, enter this information:
    1. Contact1 First Name: Silas
    2. Contact1 Last Name: Stetson
    3. Contact1 Preferred Language: English
    4. Contact1 Email Opt Out: False
    5. Contact1 Personal Email: silas@mailinator.com
    6. Contact1 Preferred Email: Personal
    7. Donation Donor: Contact1
    8. Donation Amount: 5000
    9. Donation Date: Set to the last day of this month
    10. Donation Stage: Pledged
    11. Donor Survey Status: Completed
  2. In the second data row in the template, enter this information:
    1. Contact1 First Name: Marie
    2. Contact1 Last Name: Maldonado
    3. Contact1 Preferred Language: Spanish
    4. Contact1 Email Opt Out: False
    5. Contact1 Personal Email: marie@mailinator.com
    6. Contact1 Preferred Email: Personal
    7. Donation Donor: Contact1
    8. Donation Amount: 2500
    9. Donation Date: Set to the last day of this month
    10. Donation Stage: Closed Won
    11. Donor Survey Status: Thanked
  3. Optionally, delete any unused columns. (If you do, you should have columns through letter K.)
  4. Save the file as a .csv on your desktop.

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), enter NPSP in the search bar, and select NPSP Data Imports.
  2. Click Import.
  3. On the Custom objects tab, click NPSP Data Imports.
  4. Click Add new records under “What do you want to do?” and leave all of the associated settings as their defaults.
  5. 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 just saved.

    The import interface

  6. Click Next.
  7. You’re now on the Edit Field Mapping page. Make sure that your column headers in your CSV and the destinations in the NPSP Data Import object match (if you followed these instructions, they should), then click Next.

    Field mappings on the Edit Field Mapping page

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

    The Review & Start Import page

  9. Click OK on the “Congratulations!” popup.

You’ll find yourself on a Bulk Data Load Jobs page again, where you can check the results in the Batches area.

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 Silas Stetson, and scroll down to the bottom of the page to check that the donor survey data came through.

It looks like it did! You’ll notice that the Donor Survey Import Status and Donor Survey Imported fields are empty now, though, because those fields are automatically populated during the import.

The Donor Survey Information area on Silas Stetson’s NPSP Data Importer record

Perform an Import Dry Run

Now that the records are in NPSP Data Import objects, let’s check them by performing an optional dry run to check for problems.

  1. Starting on the To Be Imported list view on the NPSP Data Imports page, click Start Data Import.
  2. Leave the settings as they are for now, and click Begin Dry Run.
  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.

    NPSP Data Importer - Dry Run results

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

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

The Dry Run - Validated list view showing our new NPSP Data Import records

Import Your Data

It’s import time!

  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—this might take a minute—and then check the status. You should have 2 records processed and 2 records validated. Click Close.

    The NPSP Data Import status

Check the Results

Back on the NPSP Data Imports page, select the Successfully Imported list view and click into the record for Silas Stetson.

Scroll down to the very bottom of the record to see the status update for the donor survey record. The Donor Survey Import Status should be Created, and you should see a link underneath Donor Survey Imported.

The Donor Survey Information area of the NPSP Data Import record for Silas Stetson

Click on the link in the Donor Survey Imported field to view the donor survey record.

The Details tab on the new donor survey record

You’ll see that the donor survey number was automatically created, the contact record was related by NPSP Data Importer, and our status was imported.

Now, click into the contact record and click on the Related tab. You can see that the donor survey was automatically related here, as well.

The Donor Surveys related list on a contact record

When you complete an import like this and you’re happy with the results, you’ll usually want to delete the NPSP Data Import staging records (check out the link in Resources below). Don’t do that in your playground now, though, because we check those records to complete this challenge. 

Note

One important exception to deleting NPSP Data Import records: If the records were created by a tool like Gift Entry or Elevate, you may want to keep them around at least until after your annual audit is complete to show how the gift got into Salesforce.

The Tools for the Job

In this project you created new custom objects and fields, created corresponding staging fields on the NPSP Data Import object, used Advanced Mapping to create the fields, and imported data. Pat yourself on the back—this is a HUGE accomplishment!

The process map with falling confetti

The example from our friends at No More Homelessness (NMH) was pretty simple. But these are the same building blocks you’ll use whether you are importing data to a standard field not included in NPSP Data Importer, to your own custom elements, or to elements you added with an AppExchange app or other managed package.

And remember, you don’t have to go it alone. Check out the detailed documentation we’ve linked to in Resources throughout this project, and you can always turn to the communities in the Power of Us Hub or the Nonprofits Using Salesforce group in the Trailblazer Community.

For now, celebrate this first step toward many importing adventures to come. If you’ve followed along with the instructions in this step, select your Trailhead Playground and click Verify to complete this project and receive your badge.

Resources

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • 1 in 4 land a new job
  • 50% receive a promotion or raise
  • 80% learn new technologies that boost their resume
  • 66% say it increases productivity
Source: Trailblazer Community Impact Survey 2019