Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Map Standard and Custom Fields on a Standard Object

Prepare to Import Standard and Custom Fields

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 you 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 you 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, create the new custom preferred-language field. But before you dive into creating the new field itself, create a new global picklist value set. You 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 you 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, 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:
    • In the Field Label, enter Preferred Language.
    • In Values, leave Use global picklist value set selected, then select Preferred Language from the picklist.
    • The Field Name should populate automatically to Preferred_Language.

      The preferred language label and values in setup


  1. Leave the other values as default, and click Next.
  2. 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 on Trailhead.

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, you 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.

First, 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 you bend that rule in a moment.
  7. Enter these values:
    • In the Field Label, enter Contact1 Preferred Language.
    • In Values, leave Use global picklist value set selected, then select Preferred Language from the picklist.
    • The Field Name should automatically populate with Contact1_Preferred_Language.
  1. Leave the other values as default, and click Next.
  2. Click Next on the next screen, then Save & New.
  3. 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, create the NPSP Data Import object field for email opt-outs. And here’s the exception to the rule you just learned: 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 selected, False would mean unselected, and a blank value would leave the box unchanged if you were updating records.

  1. On the NPSP Data Import record in the Object Manager, click Fields & Relationships.
  2. Click New.
  3. Select Picklist, and then click Next.
  4. Enter these values:
    • In the Field Label, enter Contact1 Email Opt Out.
    • In Values, select Enter values, with each value separated by a new line and in the box, enter these values:
      True
      False
    • 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

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

Tip

When you create your own fields on the NPSP Data Import object in your nonprofit's Salesforce org, 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.

You’ve created all of the staging fields you need on the NPSP Data Import object. Now, 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 see that the new fields were added here by default.

    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, you’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

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. Toggle Advanced Mapping 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 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.

First, 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 you’re back on the Object Groups list. Next, 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 your 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, you have everything you need in Salesforce to start importing your data.

In the next step, you modify the import template and run a test import to check your work.

But before you 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

Teilen Sie Ihr Trailhead-Feedback über die Salesforce-Hilfe.

Wir würden uns sehr freuen, von Ihren Erfahrungen mit Trailhead zu hören: Sie können jetzt jederzeit über die Salesforce-Hilfe auf das neue Feedback-Formular zugreifen.

Weitere Infos Weiter zu "Feedback teilen"