Start tracking your progress
Trailhead Home
Trailhead Home

Create Custom Relationships

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain how the relationships settings control relationships.
  • Configure relationship settings.

Relationships Overview

Relationships in NPSP are a custom object that connects a contact to another contact in your org. In the No More Homelessness org, they use relationships to connect family members who are clients, donors or volunteers. On the contact record, relationships in the NMH org look like this:

Relationships related list on the contact detail page

NPSP comes with 24 types of relationships out of the box. To see all the types of relationships available:

1. Click the gear icon ( Setup menu gear icon), then click Setup.

2. Click the Object Manager tab.

3. From the list of objects, select Relationship.

4. Click Fields & Relationships.

5. Click the field labeled Type.

To keep things simple, you can deactivate any relationship types that your organization won’t use from this list by clicking the Deactivate link.

Picklist values from the relationship object in object manager

For many organizations, those 24 relationships more than meet their needs, but the system is flexible to allow for additional configuration and customization of relationship settings. We’ll dig into that now.

To navigate to the relationships settings, click NPSP Settings in the navigation bar,  click the Relationships menu to expand the settings, then click the Relationships from within the menu to see all the settings. 

Let’s quickly walk through the four settings that control how relationships behave in NPSP. 

(1) Reciprocal Method

This is perhaps the most important of your relationships settings, because it determines how NPSP generates reciprocal relationships. The options are:

  • List Setting (the default) works in conjunction with gender and other predefined settings from your reciprocal relationships settings list to set the appropriate type on the reciprocal relationship. For example, if you create a relationship from a male's contact record with the type “Son,” NPSP automatically creates a reciprocal relationship of “Father” on the son's record. Most people leave the List Setting as the default and don't change it.

With the List Setting method, Salesforce determines the appropriate gender-specific type based on one of two methods:

  • Pre-defined Gender field: The reciprocal relationships setting looks for “Female” and “Male” values in the gender field on Contact records specifically for the purpose of tracking gender.
  • Salutations: In the case where Salesforce cannot identify a gender on the contact, Salesforce evaluates the salutation field to determine gender, if possible. (Ms. or Mrs. = Female and Mr. = Male.)

If Salesforce can’t determine the gender-specific type based on those two methods, it assigns a gender-neutral value.

  • Value Inversion works to reverse the relationship where it can. The key is to enter a type with a delimiter around which the system will swap the words. So a relationship with a type of "Mother-Daughter" would receive a reciprocal type of "Daughter-Mother.” Value Inversion doesn't use any of the values in relationship reciprocal settings. Instead, you can create picklist values on the relationship object's type field for both “Mother-Daughter” and “Daughter-Mother.”

(2) Gender Field

This field specifies the gender of a contact for the purposes of creating a reciprocal relationship. The value in the Gender Field interacts with the values in the Reciprocal Method field (described above) to determine the correct reciprocal relationship. For example, if you create a relationship from a “Mother” contact record to a female contact record, the NPSP creates a reciprocal relationship of “Daughter,” as opposed to “Son.”

The Gender Field is a picklist on the contact record with out-of-the-box values, but you can also create and use your own custom picklist. You may want to add additional values to the picklist depending on your organizational best practices (we’ll show you how to do this later on in this unit). If the gender picklist value is not “male” or “female,” the reciprocal relationship created will be gender neutral.

(3) Allow Auto-Created Duplicates

This setting is specific to the feature that auto-creates relationships based on a custom lookup field. By default, when an auto-created relationship is triggered, and a relationship between those Contacts of the same Type already exists, the NPSP won’t create a new, duplicate relationship. You can override this behavior by checking this box and Salesforce will create a new relationship each time the auto-create is triggered, regardless of any existing Relationships.

(4) Enable Custom Field Sync

This setting allows you to sync custom relationships fields between the two contacts in a relationship pair. So if your organization adds a custom field to the relationships object, you will want to review this setting.

Reciprocal Relationships List

If you choose the Reciprocal Method List Setting (which is the default), then the reciprocal relationships list is what the List Setting uses to determine reciprocal relationships. (You don't use Reciprocal Relationships settings if you are using the Value Inversion relationship method.)

Here's how it works: If Salesforce can determine the contact's gender (based on the user-defined gender field or the salutation), then the reciprocal relationship is created using the value that matches the gender. If no gender is specified, then Salesforce uses the neutral value.

Let’s take a look at how this works in the NMH org. An NMH staff member creates a new volunteer contact record for Liam Byrne and selects “male” for the Gender Field since Liam self-selected this value on his volunteer interest form. The staffer adds another contact to the household, Alex Byrne, and enters “Unknown” (a custom value NMH created) in the Gender Field. 

The NMH staffer knows that these two contacts live at the same household and that Alex is Liam’s child, so they create a relationship record from Alex’s contact record and choose the “child” relationship type, rather than “son” or “daughter” because Alex’s gender is unknown. In this case, NPSP automatically creates the reciprocal relationship record “father” for Liam because his gender is male.

Relationship related list on the contact detail record

Add a New Reciprocal Relationship

The development department at our fictional No More Homelessness nonprofit requests a way to track the deceased spouse of a donor on the contact record in NPSP. Gorav, the NMH admin, reviews the relationships documentation and determines that he can create a new reciprocal relationship for deceased spouses. Let’s follow along as Gorav creates a new reciprocal relationship.

First, Gorav needs to the update the relationship type picklist field to add the value of “Deceased Spouse.”

1. Click the gear icon ( Setup menu gear icon), then click Setup.

2. Click the Object Manager tab.

3. From the list of objects, select Relationship.

4. Click Fields & Relationships.

5. In the list of fields, click Type. You may have to click View All to find the field.

6. Under Picklist Values, click New.

Relationships object new value for type picklist

7. Type the new values into the text box, placing each on separate line. In this case, Gorav just adds a single value for “Deceased Spouse.”

The Picklist Values form

8. Click Save.

Now Gorav needs to create the new reciprocal relationship. He navigates back to the NPSP Settings tab and clicks on Relationship settings.

  1. Click New Reciprocal Relationship.

Relationship Settings page

2. Fill out the text boxes and click Create Reciprocal Relationship. In this example, Gorav and NMH choose to create a gender neutral reciprocal no matter what the gender field or salutation might say, the reciprocal relationship will always be gender neutral. They could have entered “widow” for the female value and “widower” for the male value if they wanted gender specific relationships created.

Relationship Reciprocal Settings

Gorav will do the same thing for “Former Spouses” as well. NMH definitely doesn’t want to solicit someone and include their deceased spouse or seat former spouses together at a fundraiser. Better safe than sorry, right?

Relationships Auto-Creation Settings

Auto-created relationships allow a custom contact lookup field on the contact or campaign member objects to automatically trigger the creation of a new relationship type of your choice. Use the relationships auto-creation setting to have a new relationship automatically established between these two contacts.

At NMH, they have a mentorship program whereby successful graduates of their transitional housing program mentor clients who are in the beginning stages of their transition out of homelessness. The NMH staff wants to be able to see this mentor/mentee relationship on client contact records. 

Robert works with Alex in the NMH mentorship program.

Before Gorav can add a new auto-created relationship, he creates a custom contact lookup field on the contact record titled “Mentee.” He also updates the picklist values on the relationship object type field and adds a new reciprocal relationship in NPSP Settings for “Mentor-Mentee.” 

Add a New Auto-Created Relationship

Now Gorav is ready to add his new auto-created relationship. Let’s follow along:

1. Navigate back to the NPSP Settings tab

2. Select Relationships > Relationships Autocreation, and click New Automatic Relationship. Then:

(1) Select the Object with which you want to make the association.

(2) Select the Field.

(3) Choose the Relationship Type. The reciprocal type will automatically be created as well.

Relationships Autocreation settings and options

3. Click Create Automatic Relationship.

Now an NMH program staffer can connect a mentor and mentee easily by using the new lookup field on the Contact record.

Adding reciprocal relationship directly on the contact record

Alright, we’ve seen how to customize household naming, we’ve learned how address management works, and we’ve dug into creating custom relationships between contacts. Now we’re going to explore an issue that plagues nearly every CRM implementation - duplicate data!