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 ObjectSalesforce Object(s)Sync DirectionNotes
Donor (Individual)ContactBidirectionalCorresponds to an individual donor.
Donor (Company)AccountBidirectionalCorresponds to a company/organization donor.
HouseholdAccount (Household Account Record Type)Pull from SFHouseholds are created in WeGive based on Salesforce Household Accounts.
CampaignCampaignBidirectional
Fundnpsp__General_Accounting_Unit__cBidirectionalThe specific Salesforce object can be customized.
TransactionOpportunity, npe01__OppPayment__cBidirectionalCreates/updates an Opportunity. If uses_payments is enabled, it also syncs to a Payment record.
Scheduled Donationnpe03__Recurring_Donation__cBidirectionalRepresents recurring giving plans.
Pledgewegive__Pledge__c (or custom)BidirectionalHandles pledge data. Specific implementation can vary per organization.
Fund Allocationnpsp__Allocation__cBidirectionalAllocates funds from Transactions or Scheduled Donations.
Campaign DonorCampaignMemberBidirectionalLinks a Donor (Contact) to a Campaign.
Soft Creditnpsp__Partial_Soft_Credit__c, npsp__Account_Soft_Credit__cBidirectionalHandles soft credits for both individual and company donors.
Payoutwegive__Payout__c (or custom)Push to SFPayout summary data from WeGive is pushed to Salesforce.
Communication Listwegive__Communication_List__cPush to SFWeGive Communication Lists are created in Salesforce.
Communication Preferencewegive__Communication_Preference__cBidirectionalManages donor subscriptions to Communication Lists.
Campaign Eventwegive__Event__cPush to SF
Campaign Event Ticketwegive__Event_Ticket__cPush to SF
Campaign Event Registrationwegive__Event_Registration__cPush to SF
Campaign Fundraiserwegive__Fundraiser__cPush to SF

Detailed Object Integration

1. Donors (Contacts & Accounts)

  • Sync Direction: Bidirectional

  • WeGive Model: Donor

  • Salesforce Objects:

    • Contact for donors of type individual.
    • Account for donors of type company.
  • Logic:

    • Pull (SF to WeGive): The integration pulls Contact and Account records from Salesforce to create or update Donor records in WeGive. It also pulls Salesforce Household Account records to create WeGive Household entities and associate donors. It can also process Contact and Account merges initiated in Salesforce.
    • Push (WeGive to SF): New or updated Donor records in WeGive are pushed to Salesforce as either Contact or Account records. When creating a new Contact from a WeGive Donor, if an existing Contact with the same email is found in Salesforce, it updates that record instead of creating a new one.
  • Key Field Mappings (Contact):

Salesforce Field (Contact)WeGive Field (Donor)
npe01__HomeEmail__cemail_1
AccountIdsalesforce_account_id
FirstNamefirst_name
MiddleNamemiddle_name
LastNamelast_name
OtherStreetbilling_address.address_1
OtherCitybilling_address.city
OtherStatebilling_address.state
OtherPostalCodebilling_address.zip
OtherCountrybilling_address.country
MailingStreetmailing_address.address_1
MailingCitymailing_address.city
MailingStatemailing_address.state
MailingPostalCodemailing_address.zip
MailingCountrymailing_address.country
MobilePhonemobile_phone
HomePhonehome_phone
OtherPhoneoffice_phone
Faxfax
Birthdatebirthdate
npe01__AlternateEmail__cemail_3
npe01__WorkEmail__cemail_2
Gender__Cgender
npsp__Do_Not_Contact__cdo_not_contact
npe01__Preferred_Email__cpreferred_email
npe01__PreferredPhone__cpreferred_phone
  • Key Field Mappings (Account):
Salesforce Field (Account)WeGive Field (Donor)Notes
Namename
npe01__One2OneContact__csalesforce_contact_idcreate_only
BillingStreetbilling_address.address_1
BillingCitybilling_address.city
BillingStatebilling_address.state
BillingPostalCodebilling_address.zip
BillingCountrybilling_address.country
ShippingStreetmailing_address.address_1
ShippingCitymailing_address.city
ShippingStatemailing_address.state
ShippingPostalCodemailing_address.zip
ShippingCountrymailing_address.country
Phoneoffice_phone
Faxfax

2. Households

  • Sync Direction: Pull from SF
  • WeGive Model: Household
  • Salesforce Object: Account (with record type Household Account)
  • Logic: WeGive households are created or updated based on Household Account records 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__csalesforce_contact_id
Namename

3. Transactions (Opportunities & Payments)

  • Sync Direction: Bidirectional

  • WeGive Model: Transaction

  • Salesforce Objects: Opportunity, and optionally npe01__OppPayment__c.

  • Logic:

    • Pull (SF to WeGive): The integration pulls Opportunity records (and Payment records if applicable) to create or update Transaction records in WeGive. It respects different RecordType settings in Salesforce to determine if a transaction is tax-deductible or should be hidden.
    • Push (WeGive to SF): WeGive Transaction records create or update Opportunity records.
      • The StageName of the Opportunity is set based on the Transaction status (e.g., Success -> ‘Closed Won’).
      • If the WeGive organization uses payments, a corresponding npe01__OppPayment__c record is also created/updated.
  • Key Field Mappings (Opportunity):

Salesforce Field (Opportunity)WeGive Field (Transaction)Notes
Namenamecreate_only
Amountamount
AccountIdowner.salesforce_account_idcreate_only
CloseDatecreated_at
CampaignIdcampaign.salesforce_id
ContactIdowner.salesforce_idcreate_only
npe03__Recurring_Donation__cscheduled_donation.salesforce_idcreate_only
StageNamestage_nameexport only, custom logic
npe01__Do_Not_Automatically_Create_Payment__ctrue (literal)export only, create_only
  • Key Field Mappings (npe01__OppPayment__c):
Salesforce Field (npe01__OppPayment__c)WeGive Field (Transaction)Notes
npe01__Payment_Date__ccreated_at
npe01__Payment_Method__csource_typeexport only
npe01__Paid__ctrue (literal)export only
npe01__Payment_Amount__camount
npe01__Opportunity__csalesforce_idexport only, create_only
npsp__Batch_Number__cpayout_idexport only, not on create
npsp__Gateway_Payment_ID__cidexport only, create_only
npsp__Total_Transaction_Fees__cfee_amountexport only, not on create
npsp__Donor_Cover_Amount__cfee_covered_amountexport only, create_only
npsp__Card_Last_4__cpaymentMethod.last_fourexport only, create_only
npsp__Card_Network__cpaymentMethod.issuerexport 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__c records from Salesforce to create or update ScheduledDonation records in WeGive.
    • Push (WeGive to SF): Creates or updates Recurring_Donation__c records in Salesforce. The status (Active, Paused, Closed) is synced from WeGive.
  • Key Field Mappings (npe03__Recurring_Donation__c):

Salesforce Field (npe03__Recurring_Donation__c)WeGive Field (ScheduledDonation)Notes
npe03__Amount__camount
npe03__Contact__csource.salesforce_id
npe03__Next_Payment_Date__cstart_date
npe03__Recurring_Donation_Campaign__ccampaign.salesforce_id
npe03__Installment_Period__cperiod
npsp__CardLast4__cpaymentMethod.last_fourexport only
npsp__ACH_Last_4__cpaymentMethod.last_fourexport only
npsp__InstallmentFrequency__cfrequency

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
Namename
ParentIdparent_campaign.salesforce_idexport only
StartDatestart_date
EndDateend_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 FieldWeGive Field
      Namename
  • Fund Allocations:

    • Sync Direction: Bidirectional
    • WeGive Model: FundAllocation
    • Salesforce Object: npsp__Allocation__c
    • Logic:
      • Fund allocations link a Transaction or ScheduledDonation to one or more Funds.
      • Pull (SF to WeGive): Pulls Allocation records and attaches them to the correct Transaction or ScheduledDonation in WeGive.
      • Push (WeGive to SF): When a Transaction or ScheduledDonation is pushed, the integration syncs its fund allocations. It will create, update, or delete npsp__Allocation__c records in Salesforce to perfectly match the allocations set in WeGive. This includes handling allocations to multiple funds.
    • 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 is Transaction | | npsp__Recurring_Donation__c | model->allocatable->salesforce_id | If allocatable is ScheduledDonation | | 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 like Pledge_Plan__c for 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__c or similar):
Salesforce Field (Pledge_Plan__c)WeGive Field (Pledge)Notes
Amount__camount
Contact__cdonor.salesforce_id
Account__cdonor.salesforce_account_id
Campaign__ccampaign.salesforce_id
Date_Established__cstart_date
Idsalesforce_idimport only
End_Date__cend_date
GAU_Allocation__cfund.salesforce_id
Installment_Period__cinstallment_frequency
Next_Donation_Date__cnext_installment_date

9. Soft Credits

  • Sync Direction: Bidirectional
  • WeGive Model: SoftCredit
  • Salesforce Objects:
    • npsp__Partial_Soft_Credit__c for individuals.
    • npsp__Account_Soft_Credit__c for 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 to Opportunity | | 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 Payout object in Salesforce. This record contains aggregated data about the payout, such as total donations, fees, refunds, and net amounts. Mappings are hard-coded in the compilePayoutPayload method 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 Event object 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 Ticket object 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 Registration object 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 Fundraiser object 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 |