Map Standard and Custom Fields on a Standard Object

Prepare to Import Standard and Custom Fields

Let’s start with the fields that No More Homelessness (NMH) would like to import to contact records: email opt-out and preferred language.

Email opt-out is a standard Salesforce field but not included by default in the NPSP Data Import object. Preferred language is not a standard Salesforce or NPSP field, so we will need to add this custom field to the Contact object and map it to the NPSP Data Import object in your Trailhead playground.

Remember the process: Create the custom fields, create the corresponding staging field on the NPSP Data Import object, then connect the two. That’s what we’ll do in this step.

A process diagram with create target fields, create staging fields, and connect staging and target fields highlighted

Create the Custom Field on the Contact Object

First, let’s create the new custom preferred-language field. But before we dive into creating the new field itself, let’s create a new global picklist value set. We’ll use the same picklist values for three custom fields, so creating a global picklist value set will save us time and assure that the fields are uniformly updated if we need to add values in the future. 

  1. Click the setup gear (The setup gear icon), then click Setup.
  2. Enter Picklist in the Quick Find box, then select Picklist Value Sets.
  3. Next to the Global Value Sets header, click New.
  4. In the Label field, enter Preferred Language.
  5. In the Name field, enter Preferred_Language. (This should populate automatically.)
  6. Enter these values, one per line:

    English
    Spanish
    Tagalog
    Vietnamese


  7. Click Save.

    The picklist value set interface

With that picklist value set created, let’s create the new field.

  1. Click Object Manager in the Settings navigation bar.
  2. Find and select Contact.

    The contact label in the Object Manager

  3. Click Fields & Relationships in the left rail.

    The Fields & Relationships list on the contact object

  4. Click New.
  5. Select Picklist, and click Next.
  6. Enter these values:
    1. In the Field Label, enter Preferred Language.
    2. In Values, leave Use global picklist value set selected, then select Preferred Language from the picklist.
    3. The Field Name should populate automatically to Preferred_Language.

      The preferred language label and values in setup


  7. Leave the other values as default, and click Next.
  8. Click Next on the next screen, then Save.
Note

If you want more details and instruction on creating custom fields, check out the Custom Fields: Quick Look module linked in Resources below.

To verify that the contact record was updated correctly, click on the App Launcher (The App Launcher icon), find and select Contacts, and select a contact to view the field. It should appear on the Details tab in the Contact Details section.

The Preferred Language field on a contact record

While you’re here on the contact record, you can see the standard email opt-out field in the Contact Information section, as well.

Create Corresponding Fields on the NPSP Data Import Object

Now that both the preferred language and email opt-out fields exist on the contact object, we need to create corresponding fields (your staging fields) on the NPSP Data Import object. You’ll have to create these fields for both the NPSP Data Import object’s Contact 1 and Contact 2 if you want to import these fields for both members of a household.

Follow along in your Trailhead Playground as we create the fields.

First, let’s create the NPSP Data Import field for preferred language.

  1. Go to Setup.
  2. Click Object Manager.
  3. Find and select NPSP Data Import.

    The NPSP Data Import object in the Object Manager

  4. Click Fields & Relationships.
  5. Click New.
  6. Select Picklist, and click Next. The NPSP Data Import field should be the same type as the target field—though we’ll bend that rule in a moment.
  7. Enter these values:
    1. In the Field Label, enter Contact1 Preferred Language.
    2. In Values, leave Use global picklist value set selected, then select Preferred Language from the picklist.
    3. The Field Name should automatically populate with Contact1_Preferred_Language.
  8. Leave the other values as default, and click Next.
  9. Click Next on the next screen, then Save & New.
  10. Repeat the same step but create the same field for Contact2 Preferred Language, then click Save at the end of the process before moving on.

Now, let’s create the NPSP Data Import object field for email opt-outs.

  1. On the NPSP Data Import record in the Object Manager, click Fields & Relationships.
  2. Click New.
  3. Here’s the exception to the rule we just covered: If your target field is a checkbox, you should select a picklist with True and False values to give yourself more flexibility. In your data for import, True would mean checked, False would mean unchecked, and a blank value would leave the box unchanged if you were updating records. Select Picklist, and then click Next.
  4. Enter these values:
    1. In the Field Label, enter Contact1 Email Opt Out.
    2. In Values, select Enter values, with each value separated by a new line and in the box, enter these values:
      True
      False
    3. The Field Name should automatically populate with Contact1_Email_Opt_Out.

      The Contact1 Email Opt Out field label, values, and field name in the setup workflow

  5. Click Next.
  6. Click Next on the next screen, then Save & New.
  7. Repeat the same steps to create a field for Contact2 Email Opt Out, then click Save at the end of the process.
Note

When you create your own fields on the NPSP Data Import object in your nonprofit's Salesforce org, you can name them in any way that makes sense for your organization (unless it's a Unique ID field). We suggest picking a label that makes it clear which record this field maps to. For example, we picked something really obvious here.

We’ve created all of the staging fields we need on the NPSP Data Import object. Now, let’s place them on the page layout.

  1. On the NPSP Data Import record in the Object Manager, click Page Layouts.
  2. Click Data Import Layout.
  3. Scroll down to the Information area and you can see that the new fields were added here by default. We want to move those to the Contact1 Information and Contact2 Information areas.

    The new fields in the Information area by default

  4. Click and drag Contact1 Preferred Language under Contact1 Title in the Contact1 Information area.
  5. Click and drag Contact1 Email Opt Out above Contact1 Personal Email in the Contact1 Information area.

    The new fields in the Contact1 Information area

  6. Move the Contact2 Preferred Language and the Contact2 Email Opt Out fields to the corresponding locations in the Contact2 Information area.
  7. Click Save.

Now, we’re ready to map the staging fields in the NPSP Data Import object to the target fields in the contact object.

Turn on Advanced Mapping

Let’s start by making sure that Advanced Mapping is enabled.

  1. Click on the App Launcher (The App Launcher icon), then find and select NPSP Settings. (It may take some time to load.)
  2. Click System Tools then Advanced Mapping for Data Import & Gift Entry.

    The Advanced Mapping for Data Import & Gift Entry page

  3. Click the toggle button to set Advanced Mapping to Enabled.

    Advanced Mapping set to Enabled

The page will load with a message saying, “Deployment in progress. You can leave this page. The page will reload when deployment is finished.” It may take a minute or two, so take the opportunity to practice some deep breathing.

Note

If Advanced Mapping is already enabled in your own Salesforce org, don’t turn it off. Leave the setting as is. If you turn it off and then back on, it will create duplicate field mapping metadata—and that is difficult to fix.

Once the page reloads, click Configure Advanced Mapping.

Map the New Fields

After clicking Configure Advanced Mapping, you’ll see a list of Object Groups, which are collections of field mappings that tell NPSP Data Importer what objects (contacts, accounts, etc.) to create or update. There are already object groups for Contact 1 and Contact 2. We’ll edit those now.

First, let’s add the preferred language field mapping.

  1. Find the Contact 1 row, click on the menu button (The menu button) and then click View Field Mappings.
  2. You're now on the Contact 1 Group Field Mappings page. Click Create New Field Mapping.
  3. In the Source (NPSP Data Import Object) Field Label search field, find and select Contact1 Preferred Language (Contact1_Preferred_Language__c).
  4. In the Target (Contact 1 Object) Field Label search field, find and select Preferred Language (Preferred_Language__c).

    The New Contact 1 Field Mapping setup popup for preferred language

  5. Click Save then refresh the page.

After the page reloads we're back on the Object Groups list. Next, we’ll create a new field mapping for email opt-outs for Contact 1.

  1. Look for the Contact 1 row and click View Field Mappings under the menu button (The menu button) again.
  2. On the Contact 1 Group Field Mappings page, click Create New Field Mapping.

    The Contact 1 Group with Create New Field Mapping button

  3. In the Source (NPSP Data Import Object) Field Label search field, find and select Contact1 Email Opt Out (Contact1_Email_Opt_Out__c).
  4. In the Target (Contact 1 Object) Field Label search field, find and select Email Opt Out (HasOptedOutOfEmail).

    The New Contact 1 Field Mapping setup popup for email opt-out

  5. Click Save.

You should receive a message that the update was successful. That maps our fields for Contact 1.

Now click Back to Object Group in the upper left corner to go to the list of Object Groups. Find the Contact 2 row, click on the menu button (The menu button) and then click View Field Mappings, and repeat the steps above to map Contact2 Email Opt Out (Contact2_Email_Opt_Out__c) and Contact2 Preferred Language (Contact2_Preferred_Language__c) to the corresponding target field on the contact record.

Get Ready to Prepare the Data

With the target and staging fields set up and mappings in place, we have everything we need in Salesforce to start importing our data.

In the next step, we’ll modify the import template and run a test import to check our work.

But before we move on, if you’ve followed along with the steps above, select the Trailhead Playground you are using for this project and click Verify.

Resources

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities