Donor Data Mapping
This document details the real field mapping for donor profiles between WeGive and DonorPerfect. It’s a fixed, hardcoded mapping — there’s no custom-field support or configurable sync scope.DonorPerfect Table Reference
Primary Table:dp (Donor Profile)
WeGive Model: Donor
Sync Direction: Bidirectional — push on create/update (real-time), pull once daily
Core Identity Fields
Personal Information
Name Fields and Donor Type
WeGive’s real donor type field istype (enum: individual/company), not donor_type.
Individual donors (type = 'individual'):
DonorPerfect
donor_type sent: 'IN'
Company donors (type = 'company'):
DonorPerfect
donor_type sent: 'CO'
There’s no middle name, suffix, title, salutation, or professional-title field sent at all —
exportDonor() sends null for all of them unconditionally, for both individual and company donors.Phone Numbers
There’s no phone-number formatting, digit-stripping, or format validation anywhere in this integration’s code — whatever string is stored in WeGive is sent as-is. There’s also no separate
other_phone mapping despite WeGive having an other_phone column.Email Addresses
email_2/email_3 are not sent on push — DonorPerfect’s donor record has one email field, and only email_1 maps to it.Address Information
Mailing Address Mapping
There’s no address length truncation, standardization, or partial-address validation logic in the code — whatever is in
mailingAddress is sent as-is, including null for any missing component.Data Flow Patterns
WeGive to DonorPerfect (Push)
- Push is triggered by donor create/update in WeGive (real-time, not scheduled)
- A donor with no
dp_idyet creates a new DonorPerfect record; one with an existingdp_idupdates it - If updating a
dp_idthat no longer exists in DonorPerfect (deleted externally), the push is simply not retried as a create —exportDonor()returns early in that case (there’s no automatic re-create-on-404 for donors, unlike some other WeGive CRM integrations) - The returned
donor_idis stored back asdp_id
DonorPerfect to WeGive (Pull)
- Rows with a missing/invalid email are skipped
- Match to an existing WeGive
Userby exact email string - If no
Userexists, one is created (with a random password) alongside the newDonor - If a
Donorwith thatdp_idalready exists, onlydp_idandnameare refreshed — the rest of the profile is not re-imported on subsequent pulls
API Operations
Create/Update Donor
Action:dp_savedonor
The full parameter set sent (from exportDonor()): donor_id, first_name, last_name, donor_type, middle_name (always null), suffix (always null), title (always null), salutation (always null), prof_title (always null), opt_line (always null), address, address2, city, state, zip, country (always "US"), address_type (always null), email, mobile_phone, home_phone, business_phone, fax_phone, org_rec (always "N"), nomail (always "N"), nomail_reason (always null), narrative (always null), user_id (always "WeGive").
On update, any of these fields that are null are backfilled from DonorPerfect’s own existing value for that donor before sending — so an update doesn’t overwrite an existing DonorPerfect field with null.
Pull Query Shape
Pull uses a literal SQL-style string, e.g.:created_date, once on modified_date — recursing forward by the last-seen donor_id.
Error Handling
Data Quality Considerations
Before Sync
- Link existing DonorPerfect donors to their WeGive counterpart (via
dp_id) before enabling push, since there’s no automatic matching beyond exactdp_id - Ensure donor emails in DonorPerfect are valid — this is a hard requirement for pull, not a soft warning
Ongoing Maintenance
- Check Sentry (not the WeGive dashboard) for donor sync failures — there’s no sync-status dashboard for this integration
Custom Field Mapping
There is no custom field-mapping mechanism for this integration at all — the field list above is the complete, fixed set. The legacy dashboard’s “Mapping Rules” tab is commented out in source for DonorPerfect specifically.
Selective Sync
Troubleshooting
Donors Not Syncing
Possible causes:- Missing or invalid email (pull only — push has no email requirement)
- API authentication failure
- The integration is disabled (
enabled = false) — no other toggle stops donor sync
- Verify email validity in DonorPerfect for missing pulls
- Check API credentials
- Confirm the integration’s
enabledflag
Duplicate Donor Records
Possible cause: A donor was pushed before being linked (viadp_id) to an existing DonorPerfect person — this always creates a new record since there’s no email/name matching on push.
Solution: Link the donor’s dp_id manually before its next push.
Related Documentation
Transaction Mapping
Learn how donor transactions are mapped
Configuration Guide
Integration-level configuration (most sync-scope toggles are currently non-functional)