WeGive Models:
- Donor (type: company)
- Household (type: family)
How Account Data Syncs
This table shows all fields that sync between WeGive and Salesforce for company/organization donors and household accounts. 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
Account Types in NPSP
In Salesforce NPSP, the Account object is used for two distinct purposes, differentiated by Record Type:- Organization Accounts - Companies and organizational donors (non-household)
- Household Accounts - Family/household groupings of individual contacts
Sync Triggers
From WeGive to Salesforce (Export)
Account data is exported from WeGive to Salesforce when:- Account Created: A new company donor or household is created in WeGive
- Account Updated: An existing company donor or household is modified in WeGive (e.g., name changed, phone number updated, address modified)
From Salesforce to WeGive (Import)
Account data is imported from Salesforce to WeGive based on:- Last Modified Date: WeGive periodically polls Salesforce for Accounts that have been modified since the last sync
- Sync Frequency: The integration checks for updated Accounts on a scheduled basis (frequency varies by integration configuration)
- Modified Field Tracking: Only Accounts with a
LastModifiedDatenewer than the last successful sync are pulled into WeGive - Record Type Filtering: The integration separates Household Accounts from Organization Accounts based on Record Type
- Creating a new Account in Salesforce (either type) will import it to WeGive on the next sync cycle
- Updating an existing Account in Salesforce will trigger an import to WeGive on the next sync cycle
- The sync is based on Salesforce’s
LastModifiedDatefield, not individual field changes
Sync Process Overview
Account-Level Synchronization
WeGive syncs company/organization donors and households at the Account level in Salesforce, maintaining proper organizational relationships and hierarchies. This includes company information, household groupings, contact relationships, and address details. The integration handles both standalone organization accounts and those with primary contact relationships.Pulling Data from Salesforce
When pulling data from Salesforce, WeGive queries Accounts based on the last modified date, Record Type, and any specific filtering criteria. The integration pulls comprehensive data from the Account record, including all standard and custom fields that have been mapped. For Organization Accounts:- Creates or updates the corresponding WeGive company Donor record
- Maintains relationships to primary contacts
- Handles organizational address information
- Creates or updates the corresponding WeGive Household record
- Links all household members (Contacts associated with the Account)
- Identifies and sets the primary household member via the
npe01__One2OneContact__cfield
npe01__One2OneContact__c or configurable primary contact column), ensuring that organizational contacts and household members are properly linked.
Pushing Data to Salesforce
When a company Donor or Household record is created or updated in WeGive, the integration compiles a payload for the Salesforce Account object. This payload includes all mapped fields and ensures that the Account record is properly created or updated in Salesforce. The integration handles complex logic including:- Type Assignment: Automatically sets the Type field to “Organization” for companies (households don’t set this field)
- Record Type Assignment: Assigns the appropriate Record Type based on whether it’s a company or household
- Companies: Uses
non_household_record_type_namesetting (default: “Organization”) - Households: Uses
household_record_type_namesetting (default: “Household Account”)
- Companies: Uses
- Primary Contact Linking: Can establish primary contact relationships via the
npe01__One2OneContact__cfield (create only)
- For Companies: The
Typefield is automatically set to “Organization” to distinguish it from Household accounts - For Households: The Type field is not set (households typically don’t have a Type value)
- The appropriate Record Type is assigned based on your integration settings
- Primary contact relationships can be established via the
npe01__One2OneContact__cfield (create only)
Standard Field Mappings
| Salesforce Field | WeGive Field | WeGive API Field | Direction | Type | Notes |
|---|---|---|---|---|---|
| Id | Salesforce Account ID | salesforce_account_id | Import from Salesforce | Hard-coded | Salesforce’s unique identifier for this account |
| Name | Company Name | name | Both Ways | Configurable import Hard-coded export | |
| Type | Organization Type | Static: ‘Organization’ | Export to Salesforce | Hard-coded | Always set to ‘Organization’ to distinguish from Household accounts |
| RecordTypeId | Record Type | Dynamic | Export to Salesforce | Hard-coded | Queried from RecordType based on non_household_record_type_name setting |
| npe01__One2OneContact__c | Primary Contact Salesforce ID | salesforce_contact_id | Both Ways | Configurable | Create only; links to primary contact |
| primaryContactColumn | Primary Donor ID | primary_donor_id | Import from Salesforce | Hard-coded | Maps to WeGive donor record |
| Phone | Office Phone | office_phone | Both Ways | Configurable import Hard-coded export | |
| Fax | Fax | fax | Both Ways | Configurable import Hard-coded export | |
| BillingStreet | Billing Address - Street | billing_address.address_1 | Both Ways | Configurable | |
| BillingCity | Billing Address - City | billing_address.city | Both Ways | Configurable | |
| BillingState | Billing Address - State | billing_address.state | Both Ways | Configurable | |
| BillingPostalCode | Billing Address - Zip Code | billing_address.zip | Both Ways | Configurable | |
| BillingCountry | Billing Address - Country | billing_address.country | Both Ways | Configurable | |
| ShippingStreet | Mailing Address - Street | mailing_address.address_1 | Both Ways | Configurable | |
| ShippingCity | Mailing Address - City | mailing_address.city | Both Ways | Configurable | |
| ShippingState | Mailing Address - State | mailing_address.state | Both Ways | Configurable | |
| ShippingPostalCode | Mailing Address - Zip Code | mailing_address.zip | Both Ways | Configurable | |
| ShippingCountry | Mailing Address - Country | mailing_address.country | Both Ways | Configurable |
Complete Field Mapping - Household
| 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 household account |
| Name | Household Name | name | Both Ways | Configurable import<br>Hard-coded export | |
| RecordTypeId | Record Type | Dynamic | Import from Salesforce | Hard-coded | Queried from RecordType based on household_record_type_name setting |
| npe01__One2OneContact__c | Primary Contact Salesforce ID | salesforce_contact_id | Both Ways | Configurable import<br>Hard-coded export | Links to primary household member |
| primaryContactColumn | Primary Contact Salesforce ID | salesforce_contact_id | Import from Salesforce | Hard-coded | Configurable field name; maps to primary household member |
| wegive__WeGive_Id__c | WeGive Household ID | id | Export to Salesforce | Hard-coded | WeGive’s unique identifier for this household |
Important Notes
Record Type Assignment
The integration automatically assigns the appropriate Record Type based on whether the Account represents a company or a household: For Companies:- Record Type is determined by the
non_household_record_type_namesetting (default: “Organization”) - The
Typefield is automatically set to “Organization”
- Record Type is determined by the
household_record_type_namesetting (default: “Household Account”) - The
Typefield is NOT set (households typically don’t have a Type value)
Primary Contact Linking
For Companies: Thenpe01__One2OneContact__c field links the Account to a primary Contact in Salesforce. This field is only set during account creation and follows the NPSP model for organization contacts. After creation, this relationship cannot be changed via the integration.
Primary Contact Behavior on Create:
- When creating an Account in Salesforce, if the company donor in WeGive has an associated user (logged in previously), the integration will:
- Find the primary individual donor linked to that user
- Set
npe01__One2OneContact__cto that individual’s Salesforce Contact ID - Copy the primary individual’s email addresses to the company donor record
npe01__One2OneContact__c field identifies the primary member of the household. On import:
- WeGive finds the Contact whose
salesforce_idmatches the value innpe01__One2OneContact__c - That Contact is marked as the primary household member in WeGive
- All other Contacts with the same
AccountIdare added as household members
- WeGive sets
npe01__One2OneContact__cto the Salesforce ID of the primary household member
Household Member Management
On Import (Salesforce → WeGive):- The integration queries for all Contacts where
AccountIdmatches the Household Account’s Salesforce ID - All matching Contacts are added as members of the Household in WeGive
- The Contact referenced in
npe01__One2OneContact__cis set as the primary member
- When a Household is created in WeGive with members, the integration first pushes all member Contacts to Salesforce
- The Household is then created as an Account with the appropriate Household Record Type
- The
npe01__One2OneContact__cfield is set to reference the primary member
- WeGive will import the newly created Household Account
- The Contact will be linked to this Household in WeGive
- If no Household previously existed in WeGive, one will be created
Address Handling
Unlike Contact records, Account address state and country fields sync in both directions. This is because Accounts typically don’t have the same picklist validation constraints as Contacts, and organizational addresses often need full bi-directional syncing. Note: Account uses different address field names than Contact:- Billing Address on Account = Primary business address
- Shipping Address on Account = Secondary/mailing address
- Mailing Address on Contact = Primary address
- Other Address on Contact = Secondary/billing address
Email Inheritance from Primary Contact (Companies Only)
When a company donor is created in Salesforce and has a primary contact (via user login relationship), the integration automatically copies email addresses from the primary individual donor to the company donor:- Company
email_1← Primary Contactemail_1 - Company
email_2← Primary Contactemail_2 - Company
email_3← Primary Contactemail_3
Required Fields
For Companies:- Name is required in Salesforce. The company name from WeGive is always sent to Salesforce.
- Name is required in Salesforce. The household name from WeGive is always sent to Salesforce.
- Household names are typically formatted as “[Primary Member Last Name] Household” but can be customized
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 automatic Type assignment and RecordType selection)
Account Matching & Create/Update Logic
For Companies
When WeGive exports a company donor to Salesforce, the integration uses the following logic to determine whether to create a new Account or update an existing one:Step 1: Check for Existing Salesforce Account ID
The integration first checks if the WeGive company donor already has asalesforce_account_id stored:
- If Salesforce Account ID exists: The integration will UPDATE the existing Account record in Salesforce using this ID
- If no Salesforce Account ID exists: The integration proceeds to Step 2
Step 2: Search by Company Name and Email
If there’s no Salesforce Account ID, the integration searches Salesforce for an existing Account with a matching company name:- If NO name match found: The integration creates a NEW Account in Salesforce
- If name match IS found: The integration proceeds to Step 3 to verify availability
email_1, the integration also searches for Accounts where a related Contact has that email address.
Step 3: Verify Account Availability
If a Salesforce Account is found by name (or email), the integration checks whether that Account is already connected to a different WeGive company donor:- If the Account is available (not connected to another WeGive company donor):
- The integration LINKS this WeGive company donor to the existing Salesforce Account
- Updates the Account with the company donor’s information
- Stores the Salesforce Account ID in WeGive for future syncs
- If the Account is already connected to another WeGive company donor:
- The integration creates a NEW Account in Salesforce to avoid conflicts
- This prevents two WeGive company donors from being mapped to the same Salesforce Account record
Special Behavior on Account Creation
When a new Account is created in Salesforce:- Primary Individual Linking: If the company donor has an associated user account (someone who has logged in), the integration will:
- Find the most recent individual donor login for that user
- Set that individual donor’s
salesforce_account_idto match the newly created Account - This links the primary contact to the organization
- Salesforce Account ID Retrieval: After the Account is created, Salesforce returns the
AccountIdto ensure proper linking
For Households
When WeGive exports a household to Salesforce, the integration uses the following logic:Step 1: Check for Existing Salesforce Household ID
The integration first checks if the WeGive household already has asalesforce_id stored:
- If Salesforce ID exists: The integration will UPDATE the existing Household Account record in Salesforce using this ID
- If no Salesforce ID exists: The integration creates a NEW Household Account in Salesforce
Step 2: Automatic Linking on Contact Import
When importing Contacts from Salesforce, if a Contact has anAccountId that links to a Household Record Type Account:
- WeGive checks if a Household with that
salesforce_idalready exists - If it exists, the Contact is added as a member to that Household
- If it doesn’t exist, a new Household is created in WeGive with that
salesforce_id
Why This Matters
This matching logic ensures:- For Companies:
- Each WeGive company donor maps to exactly one Salesforce Account
- Existing Salesforce Accounts are reused when appropriate (matching by name or email)
- Multiple WeGive company donors don’t accidentally share the same Salesforce Account record
- Primary contacts are automatically linked to their organizations
- For Households:
- Each WeGive household maps to exactly one Salesforce Household Account
- Household membership is properly maintained across both systems
- Primary household members are correctly identified
- Households created in Salesforce are automatically imported and linked to their members in WeGive