Creating Households for Contacts Without Households

When using the new rollups, it's required that each contact have a Household record associated with them. If you haven't been using Households, we can automatically have Salesforce add Households for us by using the Data Loader.

(Developer's Note: The household creation code automatically checks for the existence of a household when an update is triggered on a contact using these settings. By using the Data Loader, we can cause an update to fire on each contact, without changing existing data, and have the trigger and class it calls create the households for us.)

Configure Settings

Our first step is to configure the settings for the Households. (1) Select 'Nonprofit Settings', then (2) Click on the 'Household Settings' tab. (3) Select the Household Rules as 'All New or Edited Contacts' This is adjustable if we later want to change the setting. Finally, (4) Click 'Update the Households Settings'.

Export Existing Contacts Without Households

Setup your Data Loader for 'Export', with 'Contacts' as the object to export. (1) Select the ID and LastName fields from the 'Contact' object. (2) Use the condition WHERE npo02__Household__c = '' to exclude contacts who already have existing households. Export the data to your desktop.

(For additional assistance configuring the Data Loader, please see "Downloading and Configuring the Apex Data Loader" in this manual. Step-by-step instructions for exporting can be found under "Exporting Data with the Apex Data Loader")

(Developer's Note: We use LastName since it's a required field for the contact object.)

Update Contacts - Select Object and Record

(1) Select 'Update' in your Data Loader. (2) Select 'Contact' as the update object. (3) Choose the file you exported in the previous step. Click 'Next'.

Update Contacts - Map Fields

(1) Create or Edit a Map, and (2) map the Id field and the LastName field. Click 'Next' and complete the update process.

Confirm Your Data

Check that your exported contacts without households now have a new household assigned to them.