How to Import Alumni

Importing Alumni

This guide covers how to import new alumni into the system from TSV (tab-separated) files.


Before You Begin

Important: Read Alumni_Database/IMPORT-FROM-ALMABASE.md for complete details on the import process and field mappings.


Preparing the Import File

Create a TSV file with these columns (tab-separated):

Column Description Required
First Name Given name Yes
Last Name Family name Yes
Email Email address (or empty) No
State Two-letter state code or country No
City City name No
Class Year 4-digit year (e.g., 1992) Yes

Running the Import

Single Alumni

./import_one_alumni.sh "First	Last	email@example.com	CA	San Francisco	1992"

Batch Import from TSV

while IFS=$'\t' read -r FIRST LAST EMAIL STATE CITY YEAR; do
    ./import_one_alumni.sh "$FIRST	$LAST	$EMAIL	$STATE	$CITY	$YEAR"
done < alumni_to_import.tsv

Parallel Import (Faster)

count=0
while IFS=$'\t' read -r FIRST LAST EMAIL STATE CITY YEAR; do
    ./import_one_alumni.sh "$FIRST	$LAST	$EMAIL	$STATE	$CITY	$YEAR" &
    ((count++ % 8 == 0)) && wait
done < alumni_to_import.tsv
wait

What the Import Does

  1. Creates WordPress user with um_alumni role
  2. Sets username as firstname.lastname (or firstname.lastname.YYYY if conflict)
  3. For users without email: creates placeholder firstname.lastname.YYYY@noemail.antiochians.org
  4. Sets Ultimate Member metadata
  5. Syncs to MailerPress (if real email)
  6. Geocodes location (if city/state provided)

Checking for Existing Users

Before importing, filter out users who already exist:

# Get existing emails
./wp-cli-php83.sh user list --field=user_email --role=um_alumni | sort -u > existing.txt

# Filter import file
cut -f3 import_file.tsv | sort -u | comm -23 - existing.txt > new_emails.txt

After Import

  1. Verify user count: ./wp-cli-php83.sh user list --role=um_alumni --format=count
  2. Run geocoding: ./wp-cli-php83.sh um-maps geocode-all
  3. Check MailerPress sync: ./wp-cli-php83.sh um-mailerpress stats

Troubleshooting

  • "User already exists" - Email is already in the system
  • "Invalid email" - Email format is incorrect
  • Duplicate usernames - Script auto-appends class year

← Back to Help Center