× Home Blog About Us
Products SimpleImport AddressTools PhoneTools IndustryComplete
Partners Support Careers Contact

Blog

 
Blog > Post

Provide an Address Status to the Nonprofit Success Pack (NPSP) Address Object and Display It on Related Household Accounts and Contacts

by Callum Hurry AddressTools

This article covers how to add an “Address Status” field to the NPSP Address object and display it on Household Accounts and Contacts.

By treating the Address object as the “true source” of address information, this is where the custom field belongs. Creating formula fields provides your Org with the functionality it needs to view the custom field data when looking at the Contact or Account record.

This specific use case covers displaying the Address Status field provided with the AddressTools Premium managed package but the following steps can be followed to implement other custom fields added to the Address object.

Adding a Custom Fields to the Addresses Object

As this guide covers the Address Status field provided with AddressTools, we need to add a new field to the Address object.

Create a new field on the Addresses object:

  • Type: Picklist
  • Name: Address Status
  • API Name: AddressStatus (this can be customized to your requirement)
  • Values: Not checked, Not matched, Parsed but not found, Ambiguous, Corrected, Verified.
  • Restrict picklist to the values defined in the value set: False.

If you are following this guide for configuration with AddressTools, see this article to complete an AddressTools implementation on the Address object.

In AddressTools context, any Address Status other than Corrected or Verified are considered “bad addresses” and need reviewing before sending mail.

Creating a Formula on the Contact to Display the Address Status for the Current Address

For Contacts, the Nonprofit Success Pack provides a “Current Address” lookup field which refers to a matching Address record. We will use this lookup to display the Address Status.

Create a new lookup on the Contact object:

  • Type: Formula
  • Name: Address Status Formula
  • Formula Return Type: Text
  • Select Next to enter the formula.

Enter the following formula:

  • TEXT(npsp__Current_Address__r.AddressStatus__c)

Note: ensure the field API name matches what was created in the previous section and TEXT() is only used for picklist fields.

  • Select Next to Establish field-level security.
  • Select Next to Add reference field to Page Layouts
  • Select Save.
Npsp contact finished

Creating a Lookup Field on the Account to Reference the Default Address

For Household Accounts, the Billing Address refers to the Address record where the Default Address equals True. This identifies the address record to fetch the Address Status from.

The Household Account does not have a lookup field as found in the Contact object, so we need to create a custom one.

Create a new field on the Account object:

  • Type: Lookup Relationship
  • Related To: Address
  • Field Label: Default Address
  • Field Name: DefaultAddress (this can be customized to your requirement)

  • Select Next to Establish field-level security.
  • Select Next to Add reference field to Page Layouts.
  • Select Next and uncheck Add Related List.
  • Select Save.

With the lookup field created, it needs to be automatically populated with the default address.

Populate the Lookup Field on the Account to Reference the Default Address

Create a new Process Builder by going Setup | Process Automation | Process Builder | New.

  • Process Name: Update Parent Account with Default Address
  • API Name: autofill
  • The process starts when: A record changes
  • Select Save.

Choose Object:

  • Object: Address
  • Start the process: when a record is created or edited
  • Select Save.

Add Criteria:

  • Criteria Name: When Address Is Default
  • Criteria for Executing Actions: Conditions are met

Set Conditions:

  • Field: Default Address
  • Operator: Equals
  • Type: Boolean
  • Value: True
  • Select Save.

Add Action:

  • Action Type: Update Records
  • Action Name: Update Parent Account - Record Type: Select a record related to the npsp__Address__c - Type to filter list…: Account
  • Choose
  • Criteria for Updating Records: No criteria—just update the records!

Set new field values for the records you update:

  • Field: Address
  • Type: Field Reference
  • Value: npsp__Address__c > Record ID
  • Save.
  • Active the process builder.

Note: A mass update will have to be run on the Address object to update existing records. You can use a data loading solution such as SimpleImport Premium to complete this job.

Creating a Formula on the Account to Reference the Address Status for the Current Address.

Create a new lookup on the Account object:

  • Type: Formula
  • Name: Address Status Formula
  • Formula Return Type: Text
  • Select Next to enter the formula.

Enter the following formula:

  • TEXT(DefaultAddress__r.AddressStatus__c)

Note: ensure the field API name matches what was created in the previous section and TEXT() is only used for picklist fields.

  • Select Next to Establish field-level security.
  • Select Next to Add reference field to Page Layouts
  • Press Save.

Summary

Your Organization will now have a field on both the Contact and Account referencing the Address Status value stored on the Address record. By leveraging Automated Address Verification in AddressTools, this address status will update automatically removing any requirement for end-user interaction.

To find out more about how AddressTools Premium can improve the Nonprofit Success Pack, get in contact with info@provenworks.com.