Detailed Object Mappings
This document provides a comprehensive overview of the data synchronization between the WeGive platform and Salesforce. The integration is designed to keep data consistent between the two systems, supporting both inbound (Salesforce to WeGive) and outbound (WeGive to Salesforce) data flows for various objects.Overview
The integration syncs key fundraising and donor management objects. For most objects, the synchronization is bidirectional, meaning changes in either WeGive or Salesforce are reflected in the other system. Some objects, particularly those related to WeGive-specific features like Payouts and Events, are push-only from WeGive to Salesforce. The integration relies on a mapping system that allows for flexible configuration of field mappings between WeGive and Salesforce, in addition to default mappings for standard fields.Synced Objects Summary
| WeGive Object | Salesforce Object(s) | Sync Direction | Notes |
|---|---|---|---|
| Donor (Individual) | Contact | Bidirectional | Corresponds to an individual donor. |
| Donor (Company) | Account | Bidirectional | Corresponds to a company/organization donor. |
| Household | Account (Household Account Record Type) | Pull from SF | Households are created in WeGive based on Salesforce Household Accounts. |
| Campaign | Campaign | Bidirectional | |
| Fund | npsp__General_Accounting_Unit__c | Bidirectional | The specific Salesforce object can be customized. |
| Transaction | Opportunity, npe01__OppPayment__c | Bidirectional | Creates/updates an Opportunity. If uses_payments is enabled, it also syncs to a Payment record. |
| Scheduled Donation | npe03__Recurring_Donation__c | Bidirectional | Represents recurring giving plans. |
| Pledge | wegive__Pledge__c (or custom) | Bidirectional | Handles pledge data. Specific implementation can vary per organization. |
| Fund Allocation | npsp__Allocation__c | Bidirectional | Allocates funds from Transactions or Scheduled Donations. |
| Campaign Donor | CampaignMember | Bidirectional | Links a Donor (Contact) to a Campaign. |
| Soft Credit | npsp__Partial_Soft_Credit__c, npsp__Account_Soft_Credit__c | Bidirectional | Handles soft credits for both individual and company donors. |
| Payout | wegive__Payout__c (or custom) | Push to SF | Payout summary data from WeGive is pushed to Salesforce. |
| Communication List | wegive__Communication_List__c | Push to SF | WeGive Communication Lists are created in Salesforce. |
| Communication Preference | wegive__Communication_Preference__c | Bidirectional | Manages donor subscriptions to Communication Lists. |
| Campaign Event | wegive__Event__c | Push to SF | |
| Campaign Event Ticket | wegive__Event_Ticket__c | Push to SF | |
| Campaign Event Registration | wegive__Event_Registration__c | Push to SF | |
| Campaign Fundraiser | wegive__Fundraiser__c | Push to SF |
Detailed Object Integration
1. Donors (Contacts & Accounts)
- Sync Direction: Bidirectional
-
WeGive Model:
Donor -
Salesforce Objects:
Contactfor donors of typeindividual.Accountfor donors of typecompany.
-
Logic:
- Pull (SF to WeGive): The integration pulls
ContactandAccountrecords from Salesforce to create or updateDonorrecords in WeGive. It also pulls SalesforceHousehold Accountrecords to create WeGiveHouseholdentities and associate donors. It can also processContactandAccountmerges initiated in Salesforce. - Push (WeGive to SF): New or updated
Donorrecords in WeGive are pushed to Salesforce as eitherContactorAccountrecords. When creating a newContactfrom a WeGiveDonor, if an existingContactwith the same email is found in Salesforce, it updates that record instead of creating a new one.
- Pull (SF to WeGive): The integration pulls
-
Key Field Mappings (
Contact):
Salesforce Field (Contact) | WeGive Field (Donor) |
|---|---|
npe01__HomeEmail__c | email_1 |
AccountId | salesforce_account_id |
FirstName | first_name |
MiddleName | middle_name |
LastName | last_name |
OtherStreet | billing_address.address_1 |
OtherCity | billing_address.city |
OtherState | billing_address.state |
OtherPostalCode | billing_address.zip |
OtherCountry | billing_address.country |
MailingStreet | mailing_address.address_1 |
MailingCity | mailing_address.city |
MailingState | mailing_address.state |
MailingPostalCode | mailing_address.zip |
MailingCountry | mailing_address.country |
MobilePhone | mobile_phone |
HomePhone | home_phone |
OtherPhone | office_phone |
Fax | fax |
Birthdate | birthdate |
npe01__AlternateEmail__c | email_3 |
npe01__WorkEmail__c | email_2 |
Gender__C | gender |
npsp__Do_Not_Contact__c | do_not_contact |
npe01__Preferred_Email__c | preferred_email |
npe01__PreferredPhone__c | preferred_phone |
- Key Field Mappings (
Account):
Salesforce Field (Account) | WeGive Field (Donor) | Notes |
|---|---|---|
Name | name | |
npe01__One2OneContact__c | salesforce_contact_id | create_only |
BillingStreet | billing_address.address_1 | |
BillingCity | billing_address.city | |
BillingState | billing_address.state | |
BillingPostalCode | billing_address.zip | |
BillingCountry | billing_address.country | |
ShippingStreet | mailing_address.address_1 | |
ShippingCity | mailing_address.city | |
ShippingState | mailing_address.state | |
ShippingPostalCode | mailing_address.zip | |
ShippingCountry | mailing_address.country | |
Phone | office_phone | |
Fax | fax |
2. Households
- Sync Direction: Pull from SF
- WeGive Model:
Household - Salesforce Object:
Account(with record typeHousehold Account) - Logic: WeGive households are created or updated based on
Household Accountrecords from Salesforce. The integration does not push new or updated households from WeGive to Salesforce. - Key Field Mappings (
Account):
Salesforce Field (Account) | WeGive Field (Household) |
|---|---|
npe01__One2OneContact__c | salesforce_contact_id |
Name | name |
3. Transactions (Opportunities & Payments)
- Sync Direction: Bidirectional
-
WeGive Model:
Transaction -
Salesforce Objects:
Opportunity, and optionallynpe01__OppPayment__c. -
Logic:
- Pull (SF to WeGive): The integration pulls
Opportunityrecords (andPaymentrecords if applicable) to create or updateTransactionrecords in WeGive. It respects differentRecordTypesettings in Salesforce to determine if a transaction is tax-deductible or should be hidden. - Push (WeGive to SF): WeGive
Transactionrecords create or updateOpportunityrecords.- The
StageNameof theOpportunityis set based on theTransactionstatus (e.g.,Success-> ‘Closed Won’). - If the WeGive organization uses payments, a corresponding
npe01__OppPayment__crecord is also created/updated.
- The
- Pull (SF to WeGive): The integration pulls
-
Key Field Mappings (
Opportunity):
Salesforce Field (Opportunity) | WeGive Field (Transaction) | Notes |
|---|---|---|
Name | name | create_only |
Amount | amount | |
AccountId | owner.salesforce_account_id | create_only |
CloseDate | created_at | |
CampaignId | campaign.salesforce_id | |
ContactId | owner.salesforce_id | create_only |
npe03__Recurring_Donation__c | scheduled_donation.salesforce_id | create_only |
StageName | stage_name | export only, custom logic |
npe01__Do_Not_Automatically_Create_Payment__c | true (literal) | export only, create_only |
- Key Field Mappings (
npe01__OppPayment__c):
Salesforce Field (npe01__OppPayment__c) | WeGive Field (Transaction) | Notes |
|---|---|---|
npe01__Payment_Date__c | created_at | |
npe01__Payment_Method__c | source_type | export only |
npe01__Paid__c | true (literal) | export only |
npe01__Payment_Amount__c | amount | |
npe01__Opportunity__c | salesforce_id | export only, create_only |
npsp__Batch_Number__c | payout_id | export only, not on create |
npsp__Gateway_Payment_ID__c | id | export only, create_only |
npsp__Total_Transaction_Fees__c | fee_amount | export only, not on create |
npsp__Donor_Cover_Amount__c | fee_covered_amount | export only, create_only |
npsp__Card_Last_4__c | paymentMethod.last_four | export only, create_only |
npsp__Card_Network__c | paymentMethod.issuer | export only, create_only |
4. Scheduled Donations (Recurring Donations)
- Sync Direction: Bidirectional
-
WeGive Model:
ScheduledDonation -
Salesforce Object:
npe03__Recurring_Donation__c -
Logic:
- Pull (SF to WeGive): Pulls active
Recurring_Donation__crecords from Salesforce to create or updateScheduledDonationrecords in WeGive. - Push (WeGive to SF): Creates or updates
Recurring_Donation__crecords in Salesforce. The status (Active,Paused,Closed) is synced from WeGive.
- Pull (SF to WeGive): Pulls active
-
Key Field Mappings (
npe03__Recurring_Donation__c):
Salesforce Field (npe03__Recurring_Donation__c) | WeGive Field (ScheduledDonation) | Notes |
|---|---|---|
npe03__Amount__c | amount | |
npe03__Contact__c | source.salesforce_id | |
npe03__Next_Payment_Date__c | start_date | |
npe03__Recurring_Donation_Campaign__c | campaign.salesforce_id | |
npe03__Installment_Period__c | period | |
npsp__CardLast4__c | paymentMethod.last_four | export only |
npsp__ACH_Last_4__c | paymentMethod.last_four | export only |
npsp__InstallmentFrequency__c | frequency |
5. Campaigns
- Sync Direction: Bidirectional
-
WeGive Model:
Campaign -
Salesforce Object:
Campaign - Logic: Standard bidirectional sync for campaign information.
-
Key Field Mappings (
Campaign):
Salesforce Field (Campaign) | WeGive Field (Campaign) | Notes |
|---|---|---|
Name | name | |
ParentId | parent_campaign.salesforce_id | export only |
StartDate | start_date | |
EndDate | end_date |
6. Campaign Donors
- Sync Direction: Bidirectional
- WeGive Model:
CampaignDonor - Salesforce Object:
CampaignMember - Logic: Links a WeGive Donor (Salesforce Contact) to a WeGive Campaign (Salesforce Campaign).
- Key Field Mappings (
CampaignMember): | Salesforce Field (CampaignMember) | WeGive Field (CampaignDonor) | | ----------------------------------- | ------------------------------- | |CampaignId|campaign.salesforce_id| |ContactId|donor.salesforce_id|
7. Funds & Allocations
-
Funds:
- Sync Direction: Bidirectional
- WeGive Model:
Fund - Salesforce Object: Typically
npsp__General_Accounting_Unit__c(GIA). This is configurable. - Logic: Syncs fund information between WeGive and Salesforce.
- Key Field Mappings (
npsp__General_Accounting_Unit__c):Salesforce Field WeGive Field Namename
-
Fund Allocations:
- Sync Direction: Bidirectional
- WeGive Model:
FundAllocation - Salesforce Object:
npsp__Allocation__c - Logic:
- Fund allocations link a
TransactionorScheduledDonationto one or moreFunds. - Pull (SF to WeGive): Pulls
Allocationrecords and attaches them to the correctTransactionorScheduledDonationin WeGive. - Push (WeGive to SF): When a
TransactionorScheduledDonationis pushed, the integration syncs its fund allocations. It will create, update, or deletenpsp__Allocation__crecords in Salesforce to perfectly match the allocations set in WeGive. This includes handling allocations to multiple funds.
- Fund allocations link a
- Key Field Mappings (
npsp__Allocation__c): | Salesforce Field | WeGive Field / Value | Notes | | --------------------------------- | ----------------------------------- | ---------------------- | |npsp__Amount__c|model->amount / 100| | |npsp__General_Accounting_Unit__c|model->fund?->salesforce_id| | |npsp__Opportunity__c|model->allocatable->salesforce_id| If allocatable isTransaction| |npsp__Recurring_Donation__c|model->allocatable->salesforce_id| If allocatable isScheduledDonation| |npsp__Percent__c| (calculated percentage) | Calculated based on total amount |
8. Pledges
- Sync Direction: Bidirectional
- WeGive Model:
Pledge - Salesforce Object:
wegive__Pledge__c(or a custom object likePledge_Plan__cfor specific organizations). - Logic: Syncs pledge data, including total amount, installment details, start/end dates, and links to donors and campaigns.
- Key Field Mappings (
Pledge_Plan__cor similar):
Salesforce Field (Pledge_Plan__c) | WeGive Field (Pledge) | Notes |
|---|---|---|
Amount__c | amount | |
Contact__c | donor.salesforce_id | |
Account__c | donor.salesforce_account_id | |
Campaign__c | campaign.salesforce_id | |
Date_Established__c | start_date | |
Id | salesforce_id | import only |
End_Date__c | end_date | |
GAU_Allocation__c | fund.salesforce_id | |
Installment_Period__c | installment_frequency | |
Next_Donation_Date__c | next_installment_date |
9. Soft Credits
- Sync Direction: Bidirectional
- WeGive Model:
SoftCredit - Salesforce Objects:
npsp__Partial_Soft_Credit__cfor individuals.npsp__Account_Soft_Credit__cfor companies/organizations.
- Logic:
- Pull (SF to WeGive): Pulls both types of soft credit records from Salesforce.
- Push (WeGive to SF): Creates, updates, or deletes soft credit records in Salesforce based on changes in WeGive.
- Key Field Mappings:
| Salesforce Field | WeGive Field | Notes |
|---|---|---|
|
npsp__Transaction__c|transaction.salesforce_id| Refers toOpportunity| |npsp__Contact__c|donor.salesforce_id| For Partial Soft Credit | |npsp__Account__c|donor.salesforce_account_id| For Account Soft Credit | |npsp__Amount__c|amount| | |npsp__Date__c|date| |
10. Payouts
- Sync Direction: Push to SF only
- WeGive Model:
Payout - Salesforce Object:
wegive__Payout__c(or custom). - Logic: When a payout is processed in WeGive, a detailed summary is pushed to a custom
Payoutobject in Salesforce. This record contains aggregated data about the payout, such as total donations, fees, refunds, and net amounts. Mappings are hard-coded in thecompilePayoutPayloadmethod and not based on mapping rules.
11. Campaign Events
- Sync Direction: Push to SF only
- WeGive Model:
CampaignEvent - Salesforce Object:
wegive__Event__c - Logic: WeGive campaign events are pushed to a custom
Eventobject in Salesforce. - Key Field Mappings:
| Salesforce Field | WeGive Field |
|---|---|
|
wegive__Access_Type__c|access_type| |wegive__Ask_Donations__c|ask_donations| |wegive__Company_Registrations__c|company_registrations| |wegive__Description__c|description| |wegive__DS_Template_Id__c|ds_template_id| |wegive__End_Date__c|end_date| |Name|name| |wegive__Has_Tickets__c|has_tickets| |wegive__Is_Opened__c|is_opened| |wegive__Location__c|location| |wegive__Location_Address__c|location_address| |wegive__Location_URL__c|location_url| |wegive__Max_Capacity__c|max_capacity| |wegive__One_Ticket_Per_Person__c|one_ticket_per_person| |wegive__Registration_Success_Description__c|registration_success_description| |wegive__Registration_Success_Title__c|registration_success_title| |wegive__Require_Registration_Waiver__c|require_registration_waiver| |wegive__Show_Registration_Activity__c|show_registration_activity| |wegive__Show_View_Events__c|show_view_events| |wegive__Show_View_Tickets__c|show_view_tickets| |wegive__Slug__c|slug| |wegive__WeGive_Id__c|id| |wegive__Timezone__c|timezone|
12. Campaign Event Tickets
- Sync Direction: Push to SF only
- WeGive Model:
CampaignEventTicket - Salesforce Object:
wegive__Event_Ticket__c - Logic: WeGive event tickets are pushed to a custom
Event Ticketobject in Salesforce. - Key Field Mappings:
| Salesforce Field | WeGive Field |
|---|---|
|
wegive__Description__c|description| |wegive__Event__c|event.salesforce_id| |Name|name| |wegive__Event_WeGive_Id__c|event.id| |wegive__Limite__c|limit| |wegive__Price__c|price| |wegive__WeGive_Id__c|id|
13. Campaign Event Registrations
- Sync Direction: Push to SF only
- WeGive Model:
CampaignEventRegistration - Salesforce Object:
wegive__Event_Registration__c - Logic: WeGive event registrations are pushed to a custom
Event Registrationobject in Salesforce. - Key Field Mappings:
| Salesforce Field | WeGive Field |
|---|---|
|
npe03__Event__c|campaign.salesforce_id| |npe03__Contact__c|donor.salesforce_id| |Name|name| |wegive__Event_Ticket__c|ticket.salesforce_id| |wegive__Event_Ticket_WeGive_Id__c|ticket.id| |wegive__Quantity__c|quantity| |wegive__Status__c|status| |wegive__Transaction_Id__c|transaction_id| |wegive__WeGive_Donor_Id__c|donor.id| |wegive__WeGive_Event_Id__c|event.id| |wegive__WeGive_Id__c|id|
14. Campaign Fundraisers
- Sync Direction: Push to SF only
- WeGive Model:
CampaignFundraiser - Salesforce Object:
wegive__Fundraiser__c - Logic: WeGive fundraisers are pushed to a custom
Fundraiserobject in Salesforce. - Key Field Mappings:
| Salesforce Field | WeGive Field |
|---|---|
|
wegive__Allow_Fundraising__c|allow_fundraising| |wegive__Description__c|description| |wegive__Donate_After_Expiration__c|donate_after_expiration| |wegive__Donations_p2p_Only__c|donations_p2p_only| |wegive__End_Date__c|end_date| |Name|name| |wegive__Hide_Fundraise__c|hide_fundraise| |wegive__Show_Activity__c|show_activity| |wegive__Show_Child_Fundrasiers__c|show_child_fundraisers| |wegive__Show_Leader_Board__c|show_leader_board| |wegive__Slug__c|slug| |wegive__Start_Date__c|start_date| |wegive__WeGive_Id__c|id|
15. Communication Lists & Preferences
-
Communication Lists:
- Sync Direction: Push to SF only
- WeGive Model:
CommunicationList - Salesforce Object:
wegive__Communication_List__c - Logic: WeGive communication lists are created as records in Salesforce.
- Key Field Mappings:
| Salesforce Field | WeGive Field |
|---|---|
|
Name|name| |wegive__Description__c|description| |wegive__Double_Opt_In__c|double_opt_in| |wegive__Show_To__c|show_to| |wegive__UUID__c|uuid| |wegive__Visible__c|visible| |wegive__WeGive_Id__c|id|
-
Communication Preferences:
- Sync Direction: Bidirectional
- WeGive Model:
CommunicationListDonor - Salesforce Object:
wegive__Communication_Preference__c - Logic: Manages a donor’s subscription status to a communication list. Changes can originate in either system.
- Key Field Mappings:
| Salesforce Field | WeGive Field |
|---|---|
|
wegive__Contact__c|donor.salesforce_id| |wegive__Account__c|donor.salesforce_account_id| |wegive__Communication_List_c|communication_list.salesforce_id| |wegive__Communication_List_Id_c|communication_list.id| |wegive__Donor_Id__c|donor.id| |wegive__Double_Opt_In__c|double_opt_in_required| |wegive__Subscribed__c|subscribed|