Transaction Data Mapping
This document details how one-time WeGive transactions map to DonorPerfect gift records. This is a fixed field set — there is no configurable mapping and no automatic retry.DonorPerfect Table Reference
Primary Table:dpgift (Gift Records)
WeGive Model: Transaction
Sync Direction: WeGive → DonorPerfect (Push Only)
Core Transaction Fields
Unlike other WeGive CRM integrations, there’s no explicit auto-create-donor-then-retry-transaction recovery here —
syncGift() simply calls exportDonor() synchronously first if needed, as part of the same request, not as an error-recovery retry.Financial Information
Amount Processing
There’s no currency code validation or exchange-rate conversion in the code — whatever the transaction’s
currency value is gets sent directly.Date
Fund Attribution
Recurring-Gift Linking
This only links a payment to an existing pledge record — it doesn’t create or modify the pledge itself. See Recurring Donation Mapping for how pledges themselves sync.
Tribute Information
There is no
tribute_type field on the WeGive transactions table at all (WeGive’s real tribute fields are a boolean tribute flag plus tribute_name/tribute_message/tribute_email) — honor-vs.-memorial distinction isn’t tracked or sent to DonorPerfect. tribute_message and tribute_email also aren’t mapped.Gift Narrative
Data Flow Process
syncGift()is called on transaction create/update (real-time)- If the owning donor has no
dp_id,exportDonor()runs first (synchronously, same request) - If the transaction’s fund has no
dp_id,syncFund()runs next (synchronously, same request, not caught) - Under a per-transaction DB lock: if
dp_idalready exists, the previous DonorPerfect record is fetched and any locally-null param is backfilled from it before sending an update - If no
dp_idyet, a reference-token lookup (WG:txn:<id>) runs first to recover from a possible earlier phantom-gift creation, before sending a newdp_savegift - On success,
dp_idis stored
Error Handling
API Operations
dp_savegift
Full parameter list (from syncGift()): gift_id, donor_id, record_type ("G"), gift_date, amount, gl_code, solicit_code (always null), sub_solicit_code (always null), campaign (always null), gift_type (always null), split_gift ("N"), pledge_payment, reference (the WG:txn:<id> token), memory_honor, gfname/glname (always null), fmv (0), batch_no (0), gift_narrative, ty_letter_no (always null), glink (always null), plink, nocalc ("N"), receipt ("N"), old_amount (always null), user_id ("WeGive"), gift_aid_date/gift_aid_amt/gift_aid_eligible_g (always null — no Gift Aid support), currency, receipt_delivery_g ("N").
campaign, solicit_code, sub_solicit_code, and gift_type are all always sent as null — there is no campaign-attribution sync of any kind in this integration, despite the dashboard exposing a “Sync Campaigns” toggle (see Configuration Options).Data Quality Considerations
Before Sync
- Link donors to their DonorPerfect
dp_idbefore their first gift push where possible, to avoid unlinked-donor creation as a side effect - Set up fund GL codes ahead of time if consistent GL code attribution matters (though a missing fund GL code doesn’t block the gift —
gl_codeis simply sent as null/empty)
Ongoing Maintenance
- Check Sentry (not the WeGive dashboard) for
dp_savegiftfailures — there’s no sync-status dashboard for this integration
Troubleshooting
Transactions Not Syncing
Possible causes:- The integration is disabled
- The donor or fund sync (triggered inline before the gift) failed
- API authentication failure
- Confirm the integration’s
enabledflag - Check Sentry for the specific failure — donor export, fund sync, or the gift push itself
- Verify API credentials
Incorrect Amounts
Possible cause: Confirm the fee-deduction math —(amount - fee) / 100 — matches what’s expected; there’s no separate currency-conversion step to account for.
Missing Tribute Information
Possible cause:tribute_name wasn’t set on the transaction, or the tribute information lives in tribute_message/tribute_email, neither of which sync to DonorPerfect at all.
Solution: Only tribute_name maps to DonorPerfect’s memory_honor field — there’s no field to carry the tribute message or the tribute-recipient’s email.
Related Documentation
Donor Mapping
Learn how donor records are synchronized
Recurring Donations
Understand recurring gift and pledge mapping
Fund Management
GL code and fund designation mapping
Configuration Guide
Integration-level configuration (most sync-scope toggles are currently non-functional)