Skip to main content
The Contact mapping between WeGive and Salesforce synchronizes individual donor information between the two platforms, from basic personal details to relationship management, across both systems. Salesforce Object: Contact WeGive Model: Donor (type: individual)

Sync Process Overview

Contact-Level Synchronization

WeGive syncs individual donors at the Contact level in Salesforce, maintaining the related information and relationships between contacts, accounts, and other records. The integration handles both individual contacts and household members.

Pulling Data from Salesforce

When pulling data from Salesforce, WeGive queries Contacts based on the last modified date. The integration pulls all standard and custom fields that have been mapped, then creates or updates the corresponding WeGive Donor record.

Pushing Data to Salesforce

When a Donor record is created or updated in WeGive, the integration compiles a payload for the Salesforce Contact object, including all mapped fields, and maintains relationships to related records such as Accounts and Opportunities.

How Contact Data Syncs

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
Mapping Types:
  • Configurable - Can be customized via integration settings
  • Hard-coded - Built into the integration logic and cannot be changed

Standard Field Mappings

Address field pairing

Contact pairs the Salesforce Mailing Address (primary) with WeGive mailing_address, and the Salesforce Other Address (secondary) with WeGive billing_address. This differs from Account, which pairs Billing (primary) with billing_address and Shipping (secondary) with mailing_address.

WeGive Package Fields

(Requires WeGive Salesforce managed package installation.) If these fields are not visible in your Salesforce org, contact WeGive support about installing the WeGive Salesforce managed package.

State and Country Picklists

By default, Contact state and country are imported from Salesforce only, not exported. This avoids validation errors when an org uses Salesforce picklists. To sync state and country in both directions, add mapping rules:
  • Free-text orgs: add a both-ways rule on the plain fields (MailingState, MailingCountry, OtherState, OtherCountry) mapped to the WeGive value fields (mailing_address.state, mailing_address.country, billing_address.state, billing_address.country).
  • Picklist orgs: Salesforce State and Country/Territory Picklists is an org-wide setting. When enabled, state and country must be mapped through the code fields using a one-directional export/import split.
State and country mapping for picklist-enabled orgs (Contact): The split is required because the WeGive value field (state, country) is the writable column, while the code accessor (state_code, country_code) is read-only and derives the ISO code from the stored value. Exporting from the code accessor sends a valid ISO code that the restricted picklist accepts; importing into the value field lets the incoming code land in a writable column. A single both-ways rule cannot serve both directions. For the customer-facing setup walkthrough (including the equivalent Account mapping and how to remove conflicting rules), see Configuring Salesforce State and Country Picklist Mappings in the Knowledge Base.

Important Notes

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 has no last name in WeGive, it is set to “LNU” (Last Name Unknown). Hard-coded logic.
  • First Name defaults to “FNU” (First Name Unknown) if empty. Hard-coded logic.

Address Concatenation

When sending addresses to Salesforce, if WeGive has both Address Line 1 and Address Line 2, 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 determines whether to create a new Contact or update an existing one: Step 1: Check for existing Salesforce ID. If the WeGive donor already has a salesforce_id stored, the integration updates that Contact. If not, it proceeds to Step 2. Step 2: Search by email address. The integration searches Salesforce for a Contact with a matching email. If no match is found, it creates a new Contact. If a match is found, it proceeds to Step 3. Step 3: Verify Contact availability. If the matched Contact is not connected to another WeGive supporter, the integration links the WeGive donor to it, updates it, and stores the Salesforce ID. If the Contact is already connected to another WeGive supporter, the integration creates a new Contact to avoid mapping two supporters to the same record. This matching logic ensures each WeGive supporter maps to exactly one Salesforce Contact, existing Contacts are reused when appropriate, and supporters do not accidentally share a Contact record.