Skip to main content
Únase a nosotros en TDX, en San Francisco, o en Salesforce+ los días 5 y 6 de marzo en la conferencia para desarrolladores sobre la era de agentes de IA. Registrarse ahora.

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) wants to import to contact records: email opt-out and preferred language.

Email opt-out is a standard Salesforce field but isn't included by default in the NPSP Data Import object. Preferred language isn't a standard Salesforce or NPSP field, so 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. From Setup, in the Quick Find box, enter picklist, and then select Picklist Value Sets.
  2. Next to the Global Value Sets header, click New.
  3. In the Label field, enter Preferred Language.
  4. In the Name field, enter Preferred_Language (This should populate automatically.)
  5. Enter these values, one per line:
    English
    Spanish
    Tagalog
    Vietnamese
  6. Save your work.
    The picklist value set interface

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

  1. Click Object Manager in the Setup navigation bar.
  2. Find and select Contact.
    The contact label in the Object Manager
  3. Click Fields & Relationships.
    The Fields & Relationships list on the contact object
  4. Click New.
  5. Select Picklist, and click Next.
  6. Specify these values:
    • Field Label: Preferred Language
    • Values: Select Use global picklist value set, then select Preferred Language from the picklist.
    • Field Name:  Preferred_Language (This should populate automatically.)
      The preferred language label and values in setup
  1. Click Next.
  2. Click Next.
  3. Save your work.
Note

If you want more details and instructions on creating custom fields, check out the Custom Fields: Quick Look module on Trailhead.

To verify that the contact record was updated correctly, find and select Contacts from the App Launcher (“”), then select a contact to view the field. The field 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. In Setup, click Object Manager.
  2. Find and select NPSP Data Import.
  3. Click Fields & Relationships.
  4. Click New.
  5. 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.
  6. Specify these values:
    • Field Label: Contact1 Preferred Language
    • Values: Select Use global picklist value set, then select Preferred Language from the picklist.
    • Field Name: Contact1_Preferred_Language (This should populate automatically.)
  1. Click Next.
  2. Click Next.
  3. Click Save & New.
  4. 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, 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. Specify these values:
    • Field Label: Contact1 Email Opt Out
    • Values: Select Enter values, with each value separated by a new line and in the box, enter these values:
      True
      False
    • Field Name: Contact1_Email_Opt_Out (This should populate automatically.)
      The Contact1 Email Opt Out field label, values, and field name in the setup workflow
  1. Click Next.
  2. Click Next.
  3. Click Save & New.
  4. 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. Save your work.

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. From the App Launcher (“”), 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. Turn on Advanced Mapping.

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—such as contacts, accounts, and so on—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 window for preferred language
  5. Save your work 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 window for email opt-out
  5. Save your work.

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

Now click Back to Object Groups 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

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios