Fund Data Mapping
This document details how WeGive funds map to DonorPerfect GL codes. This is a narrow, one-way, create-only sync — not the full lifecycle management the name suggests.DonorPerfect Table Reference
Primary Table:dpcode (Code Tables)
WeGive Model: Fund
Sync Direction: WeGive → DonorPerfect (Push Only, create-only)
Core Fund Fields
What’s Actually Sent (dp_savecode)
Fields That Don’t Sync
- Fund
description(the extended field, distinct fromname) - Fund category
- Fund goal amount
- Fund active/inactive status (always sent as
inactive: "N") - Fund hierarchy/parent-child structure
GL Code Creation Process
- A gift push (
syncGift()) checks whether the transaction’s fund has adp_id - If not,
syncFund()is called inline, before the gift itself is sent syncFund()acquires a per-fund Redis lock, re-checksdp_idunder the lock (to prevent duplicate creation under concurrent pushes), then callsdp_savecodeif still null- On success,
dp_idis set to the fund’s ownid(not a value returned by DonorPerfect — DonorPerfect’sdp_savecoderesponse isn’t parsed for an id at all) - That’s it — there’s no further update, validation, or lifecycle step
Because
dp_id is set to the fund’s own numeric id rather than something returned by the API, there’s no way to detect from WeGive’s side whether the dp_savecode call actually succeeded on DonorPerfect’s end beyond the HTTP response status — a logical DonorPerfect-side error (returned as an <error> XML element under an HTTP 200) would still result in dp_id being set locally.Fund Deactivation
API Operations
dp_savecode (Create Only)
See the parameter table above — this is the complete, fixed set every time.
Pull
Error Handling
Data Quality Considerations
Before Sync
- There’s no need to pre-configure custom GL codes — the fund’s own WeGive
idis what gets used, anddp_gl_codeisn’t read for this purpose - If you need a specific, human-readable GL code in DonorPerfect rather than WeGive’s internal fund id, this integration doesn’t support setting it — the code is always the fund’s numeric id
Ongoing Maintenance
- Fund name changes made after the GL code already exists won’t propagate — if a name correction is needed in DonorPerfect, it has to be made there directly
- Check Sentry (not the WeGive dashboard) for
dp_savecodefailures
Troubleshooting
GL Codes Not Creating
Possible causes:- The integration is disabled
- API authentication failure
- A DonorPerfect logical error was returned (check Sentry for the raw response body)
- Confirm the integration’s
enabledflag - Verify API credentials
- Check Sentry for the specific DonorPerfect error text
Fund Name Not Updating in DonorPerfect
Cause: Not a bug — there’s genuinely no update path once a GL code exists for a fund. This is expected behavior, not a sync failure. Solution: Update the GL code’s description directly in DonorPerfect.Known Limitations
- Create-only — no update, no status sync, no pull
dp_gl_codeisn’t used to control the created GL code’s identifier (it’s gift-attribution metadata only)- No fund hierarchy, category, or goal-amount sync
- No custom GL code numbering — the code is always the fund’s own WeGive id
Related Documentation
Transaction Mapping
How GL codes are used in transaction/gift processing
Configuration Guide
Integration-level configuration (most sync-scope toggles are currently non-functional)
Integration Nuances
Platform-specific fund handling behaviors
Data Overview
Complete data mapping documentation