Sync Process Overview
Contact-Level Synchronization
WeGive syncs individual donors at the Contact level in Salesforce, ensuring that all related information and relationships are properly maintained. This includes not only the basic contact information but also the complex web of relationships between contacts, accounts, and other related records. The integration handles both individual contacts and household members, with special consideration for the different types of relationships that may exist.Pulling Data from Salesforce
When pulling data from Salesforce, WeGive queries Contacts based on the last modified date and. The integration pulls comprehensive data from the Contact record, including all standard and custom fields that have been mapped. This data is used to create or update the corresponding WeGive Donor record, maintaining all the necessary relationships and attributes.Pushing Data to Salesforce
When a Donor record is created or updated in WeGive, the integration compiles a payload for the Salesforce Contact object. This payload includes all mapped fields and ensures that the Contact record is properly created or updated in Salesforce. The integration also handles the creation and maintenance of relationships between contacts and other related records, such as accounts and opportunities.Field Mappings
Salesforce Object: ContactWeGive Model: Donor (type: individual)
How Contact Data Syncs
This table shows all fields that sync between WeGive and Salesforce for individual donors. Direction:- Import from Salesforce - Data imports from Salesforce into WeGive only
- Export to Salesforce - Data exports from WeGive to Salesforce only
- Both Ways - Data syncs in both directions
- Configurable - Can be customized via integration settings
- Hard-coded - Built into the integration logic and cannot be changed
Standard Field Mappings
| Salesforce Field | WeGive Field | WeGive API Field | Direction | Type | Notes |
|---|---|---|---|---|---|
| Id | Salesforce ID | salesforce_id | Import from Salesforce | Hard-coded | Salesforce’s unique identifier for this contact |
| AccountId | Salesforce Account ID | salesforce_account_id | Both Ways | Configurable import Hard-coded export | Links contact to their Salesforce Account Household |
| CreatedDate | Created At | created_at | Import from Salesforce | Hard-coded | When the contact was created in Salesforce |
| FirstName | First Name | first_name | Both Ways | Configurable import Hard-coded export | Defaults to “FNU” if empty when sending to Salesforce |
| MiddleName | Middle Name | middle_name | Both Ways | Configurable | |
| LastName | Last Name | last_name | Both Ways | Configurable import Hard-coded export | Defaults to “LNU” if empty when sending to Salesforce |
| Birthdate | Birthdate | birthdate | Both Ways | Configurable | |
| Gender__C | Gender | gender | Both Ways | Configurable | |
| Primary Email | Dynamic based on preferred_email | Export to Salesforce | Hard-coded | WeGive determines which email to use based on “Preferred Email” setting | |
| npe01__HomeEmail__c | Email 1 | email_1 | Both Ways | Configurable | |
| npe01__WorkEmail__c | Email 2 | email_2 | Both Ways | Configurable | |
| npe01__AlternateEmail__c | Email 3 | email_3 | Both Ways | Configurable | |
| npe01__Preferred_Email__c | Preferred Email | preferred_email | Both Ways | Configurable | Controls which email is used as the primary Email field |
| MobilePhone | Mobile Phone | mobile_phone | Both Ways | Configurable | |
| HomePhone | Home Phone | home_phone | Both Ways | Configurable | |
| OtherPhone | Office Phone | office_phone | Both Ways | Configurable | |
| Fax | Fax | fax | Both Ways | Configurable | |
| npe01__PreferredPhone__c | Preferred Phone | preferred_phone | Both Ways | Configurable | |
| MailingStreet | Mailing Address - Street | mailing_address.address_1 | Both Ways | Configurable import Hard-coded export | When exporting, Address 1 and Address 2 are combined |
| MailingCity | Mailing Address - City | mailing_address.city | Both Ways | Configurable import Hard-coded export | |
| MailingState | Mailing Address - State | mailing_address.state | Import from Salesforce | Configurable | When exporting, Address 1 and Address 2 are combined |
| MailingPostalCode | Mailing Address - Zip Code | mailing_address.zip | Both Ways | Configurable import Hard-coded export | |
| MailingCountry | Mailing Address - Country | mailing_address.country | Import from Salesforce | Configurable | When exporting, Address 1 and Address 2 are combined |
| OtherStreet | Billing Address - Street | billing_address.address_1 | Both Ways | Configurable import Hard-coded export | When exporting, Address 1 and Address 2 are combined |
| OtherCity | Billing Address - City | billing_address.city | Both Ways | Configurable import Hard-coded export | |
| OtherState | Billing Address - State | billing_address.state | Import from Salesforce | Configurable | Not sent to Salesforce (to avoid picklist validation issues) |
| OtherPostalCode | Billing Address - Zip Code | billing_address.zip | Both Ways | Configurable import Hard-coded export | |
| OtherCountry | Billing Address - Country | billing_address.country | Import from Salesforce | Configurable | Not sent to Salesforce (to avoid picklist validation issues) |
| npsp__Do_Not_Contact__c | Do Not Contact | do_not_contact | Both Ways | Configurable |
WeGive Package Fields
(Requires WeGive Salesforce Package Installation)| Salesforce Field | WeGive Field | WeGive API Field | Direction | Type | Notes |
|---|---|---|---|---|---|
| WeGive_Id__c | WeGive Donor ID | id | Both Ways | Configurable | WeGive’s unique identifier for this donor |
| WeGive_Type__c | Donor Type | type | Both Ways | Configurable | Donor type in WeGive (e.g., individual, company) |
| WeGive_Status__c | Donor Status | status | Both Ways | Configurable | Donor status in WeGive |
| WeGive_Created_Date__c | WeGive Created Date | created_at | Both Ways | Configurable | When the donor was created in WeGive |
| WeGive_Modified_Date__c | WeGive Modified Date | modified_at | Both Ways | Configurable | When the donor was last modified in WeGive |
Important Notes
WeGive Salesforce Package
The fields in the “WeGive Package Fields” section are only available if your organization has installed the WeGive Salesforce Package. These fields provide additional tracking and synchronization capabilities:- WeGive_Id__c - Stores the WeGive donor ID for quick reference and lookup
- WeGive_Type__c - Tracks whether this is an individual or company donor in WeGive
- WeGive_Status__c - Reflects the donor’s status in WeGive (active, inactive, etc.)
- WeGive_Created_Date__c - Preserves the original creation date from WeGive
- WeGive_Modified_Date__c - Tracks when the donor was last modified in WeGive
Email Logic
When sending donor data to Salesforce, WeGive automatically selects which email to populate in the main “Email” field based on the donor’s “Preferred Email” setting (Email 1, Email 2, or Email 3). This is hard-coded logic.Required Fields
- Last Name is required in Salesforce. If a donor doesn’t have a last name in WeGive, it will be set to “LNU” (Last Name Unknown) - hard-coded logic
- First Name defaults to “FNU” (First Name Unknown) if empty - hard-coded logic
Address State & Country Fields
State and Country fields are only imported from Salesforce, not exported. This prevents validation errors with Salesforce picklists that may have specific allowed values configured in your Salesforce org.Address Concatenation
When sending addresses to Salesforce, if you have both Address Line 1 and Address Line 2 in WeGive, they are combined into a single Street field in Salesforce. This is hard-coded logic.Understanding Configurable vs Hard-coded
- Configurable mappings can be customized through integration settings if needed for your organization’s specific field setup
- Hard-coded mappings are built into the integration’s core logic and handle special business rules (like email selection, name defaults, and address formatting)
Contact Matching & Create/Update Logic
When WeGive exports a donor to Salesforce, the integration uses the following logic to determine whether to create a new Contact or update an existing one:Step 1: Check for Existing Salesforce ID
The integration first checks if the WeGive donor already has asalesforce_id stored:
- If Salesforce ID exists: The integration will UPDATE the existing Contact record in Salesforce using this ID
- If no Salesforce ID exists: The integration proceeds to Step 2
Step 2: Search by Email Address
If there’s no Salesforce ID, the integration searches Salesforce for an existing Contact with a matching email address:- If NO email match found: The integration creates a NEW Contact in Salesforce
- If email match IS found: The integration proceeds to Step 3 to verify availability
Step 3: Verify Contact Availability
If a Salesforce Contact is found by email, the integration checks whether that Contact is already connected to a different WeGive supporter:- If the Contact is available (not connected to another WeGive supporter):
- The integration LINKS this WeGive donor to the existing Salesforce Contact
- Updates the Contact with the donor’s information
- Stores the Salesforce ID in WeGive for future syncs
- If the Contact is already connected to another WeGive supporter:
- The integration creates a NEW Contact in Salesforce to avoid conflicts
- This prevents two WeGive supporters from being mapped to the same Salesforce Contact record
Why This Matters
This matching logic prevents data conflicts and ensures:- Each WeGive supporter maps to exactly one Salesforce Contact
- Existing Salesforce Contacts are reused when appropriate
- Multiple WeGive supporters don’t accidentally share the same Salesforce Contact record