Salesforce Objects:
npsp__Partial_Soft_Credit__c(NPSP standard object - for Contacts)npsp__Account_Soft_Credit__c(NPSP standard object - for Accounts)
Overview
This document describes how soft credit data syncs between WeGive and Salesforce. Soft Credits allow you to recognize individuals or organizations who influenced a donation without being the primary donor. Common use cases include crediting a spouse, board member, volunteer, or company for a donation made by someone else. In Salesforce NPSP, there are two types of soft credit objects:- Partial Soft Credits - For crediting individual Contacts
- Account Soft Credits - For crediting company Accounts
How Soft Credit 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
- Hard-coded - Built into the integration logic and cannot be changed
Sync Triggers
From WeGive to Salesforce (Export)
Soft Credit data is exported from WeGive to Salesforce when:- Soft Credit Created: A new soft credit is created in WeGive
- Soft Credit Updated: An existing soft credit is modified in WeGive (e.g., amount changed)
- Soft Credit Deleted: A soft credit is removed in WeGive
From Salesforce to WeGive (Import)
Soft Credit data is imported from Salesforce to WeGive based on:- Last Modified Date: WeGive periodically polls Salesforce for Soft Credits (both types) that have been modified since the last sync
- Sync Frequency: The integration checks for updated Soft Credits on a scheduled basis (frequency varies by integration configuration)
- Modified Field Tracking: Only Soft Credits with a
LastModifiedDatenewer than the last successful sync are pulled into WeGive - Deleted Credits: The integration tracks deleted soft credits via
IsDeleted = truequeries
- Creating a new Soft Credit in Salesforce will import it to WeGive on the next sync cycle
- Updating an existing Soft Credit in Salesforce will trigger an import to WeGive on the next sync cycle
- Deleting a Soft Credit in Salesforce will remove it from WeGive on the next sync cycle
- The sync is based on Salesforce’s
LastModifiedDatefield, not individual field changes
Sync Process Overview
Soft Credit-Level Synchronization
WeGive syncs soft credits at the individual credit level, maintaining the relationship between transactions, donors who should receive credit, and the credit amounts.Pulling Data from Salesforce
The integration queries both soft credit objects separately: Partial Soft Credits (for Contacts):- Queries
npsp__Partial_Soft_Credit__crecords based on last modified date - Loads related transactions that match the Opportunity IDs
- Loads individual donors (contacts) that match the Contact IDs
- Creates or updates SoftCredit records in WeGive
- Queries
npsp__Account_Soft_Credit__crecords based on last modified date - Loads related transactions that match the Opportunity IDs
- Loads company donors (accounts) that match the Account IDs
- Creates or updates SoftCredit records in WeGive
Pushing Data to Salesforce
When a SoftCredit is created or updated in WeGive, the integration:- Ensures Prerequisites Exist:
- Donor must have a Salesforce ID (Contact or Account)
- Transaction must have a
salesforce_id
- Determines Object Type:
- If donor type is ‘individual’: Use
npsp__Partial_Soft_Credit__c - If donor type is ‘company’: Use
npsp__Account_Soft_Credit__c
- If donor type is ‘individual’: Use
- Creates or Updates:
- If soft credit has a
salesforce_id: UPDATE the existing record - If soft credit is deleted: DELETE the record in Salesforce
- If no
salesforce_idand not deleted: CREATE a new record
- If soft credit has a
Complete Field Mapping - Partial Soft Credits (Contacts)
| 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 soft credit |
| npsp__Opportunity__c | Transaction Salesforce ID | transaction.salesforce_id | Both Ways | Hard-coded | Links to the Opportunity (transaction) |
| npsp__Contact__c | Donor Salesforce ID | donor.salesforce_id | Both Ways | Hard-coded | Links to the Contact being credited |
| npsp__Amount__c | Amount | amount | Both Ways | Hard-coded | Credit amount in dollars (WeGive stores in cents) |
| Name | Name | (auto-generated) | Import from Salesforce | Hard-coded | Display name for the soft credit |
| LastModifiedDate | Last Modified | (tracking) | Import from Salesforce | Hard-coded | When the soft credit was last updated |
Complete Field Mapping - Account Soft Credits (Accounts)
| 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 soft credit |
| npsp__Opportunity__c | Transaction Salesforce ID | transaction.salesforce_id | Both Ways | Hard-coded | Links to the Opportunity (transaction) |
| npsp__Account__c | Donor Salesforce Account ID | donor.salesforce_account_id | Both Ways | Hard-coded | Links to the Account being credited |
| npsp__Amount__c | Amount | amount | Both Ways | Hard-coded | Credit amount in dollars (WeGive stores in cents) |
| Name | Name | (auto-generated) | Import from Salesforce | Hard-coded | Display name for the soft credit |
| LastModifiedDate | Last Modified | (tracking) | Import from Salesforce | Hard-coded | When the soft credit was last updated |
Important Notes
Two Object Types
The integration automatically handles both types of soft credits:- Individual donors (type = ‘individual’) use
npsp__Partial_Soft_Credit__c - Company donors (type = ‘company’) use
npsp__Account_Soft_Credit__c
Amount Conversion
Soft credit amounts require conversion between systems:- WeGive: Stores amounts in cents as an integer (e.g., 5000 = $50.00)
- Salesforce: Stores amounts in dollars as a decimal (e.g., 50.00)
- On export: WeGive divides by 100 to convert cents to dollars
- On import: Salesforce value is multiplied by 100 to convert to cents
Automatic Prerequisite Push
When creating a soft credit, the integration automatically ensures prerequisites:- If the donor doesn’t have a Salesforce ID, the donor is pushed first
- If the transaction doesn’t have a
salesforce_id, the transaction is pushed first - Then the soft credit is created
Common Use Cases
Soft credits are typically used to recognize:- Spouses: Credit both spouses for a donation made by one
- Board Members: Recognize board members who secured donations
- Companies: Credit a company when an employee makes a personal donation
- Volunteers: Recognize volunteers who facilitated donations
- Matching Gifts: Credit the company providing the match
- Fundraisers: Credit peer-to-peer fundraisers for donations they influenced
Multiple Soft Credits
A single transaction can have multiple soft credits:- Each soft credit is a separate record
- The sum of soft credits can exceed, equal, or be less than the transaction amount
- There’s no validation that soft credit totals match the transaction amount
- This flexibility allows for various crediting scenarios
Deletion Handling
When a soft credit is deleted in WeGive:- The integration marks it for deletion
- On the next push, it deletes the Soft Credit in Salesforce
- The transaction and donor records remain - only the soft credit is deleted
- The integration detects it through the deleted records query
- The soft credit is removed from WeGive
- The transaction and donor records remain - only the soft credit is deleted
Soft Credit Matching & Create/Update Logic
When WeGive Exports a Soft Credit to Salesforce
Step 1: Ensure Prerequisites Exist- Check if the donor has a Salesforce ID:
- For individuals: Must have
salesforce_id(Contact ID) - For companies: Must have
salesforce_account_id(Account ID) - If not, push the donor first
- For individuals: Must have
- Check if the transaction has a
salesforce_id- If not, push the transaction first
- If the soft credit has a
salesforce_id:- If deleted: DELETE the soft credit in Salesforce
- If not deleted: UPDATE the existing soft credit
- If no
salesforce_idand not deleted:- CREATE a new soft credit in Salesforce
- If donor type is ‘individual’: Use
npsp__Partial_Soft_Credit__c - If donor type is ‘company’: Use
npsp__Account_Soft_Credit__c
When Salesforce Exports a Soft Credit to WeGive
For Partial Soft Credits (Contacts): Step 1: Find Related Records- Find the transaction in WeGive by matching
npsp__Opportunity__ctosalesforce_id- If not found, throw an exception
- Find the donor in WeGive by matching
npsp__Contact__ctosalesforce_id(where type = ‘individual’)- If not found, throw an exception
- Search for existing soft credit by
salesforce_id - If not found, create a new SoftCredit
- Link to the donor
- Link to the transaction
- Set the amount (convert from dollars to cents)
- Store the Salesforce ID
- Save the record
- Find the transaction in WeGive by matching
npsp__Opportunity__ctosalesforce_id- If not found, throw an exception
- Find the donor in WeGive by matching
npsp__Account__ctosalesforce_account_id(where type = ‘company’)- If not found, throw an exception
- Search for existing soft credit by
salesforce_id - If not found, create a new SoftCredit
- Link to the donor
- Link to the transaction
- Set the amount (convert from dollars to cents)
- Store the Salesforce ID
- Save the record
Deleted Soft Credits from Salesforce
The integration handles deleted soft credits through separate queries for both object types:- Queries both
npsp__Partial_Soft_Credit__candnpsp__Account_Soft_Credit__cwhereIsDeleted = true - Finds matching soft credits in WeGive by
salesforce_id - Deletes the WeGive soft credit
Why This Matters
This matching logic ensures:- Each WeGive soft credit maps to exactly one Salesforce soft credit record
- The correct Salesforce object is used based on donor type
- Prerequisites (donor and transaction) always exist before creating the soft credit
- Deletions are properly synced in both directions
- Both individual and company soft credits are handled seamlessly
Required Fields
For WeGive to Salesforce (Partial Soft Credits):- npsp__Opportunity__c (Transaction Salesforce ID)
- npsp__Contact__c (Donor Salesforce ID)
- npsp__Amount__c (Amount in dollars)
- npsp__Opportunity__c (Transaction Salesforce ID)
- npsp__Account__c (Account Salesforce ID)
- npsp__Amount__c (Amount in dollars)
- Id (Salesforce Soft Credit ID)
- npsp__Opportunity__c (Transaction Salesforce ID)
- npsp__Contact__c OR npsp__Account__c (Donor reference)
- npsp__Amount__c (Amount in dollars)
Usage in WeGive
Soft Credits in WeGive are used for:- Recognition: Acknowledge individuals or companies who influenced donations
- Reporting: Track total soft credit given to donors
- Donor Engagement: Recognize supporters even when they’re not the primary donor
- Major Gift Attribution: Credit fundraisers or board members for securing gifts
- Matching Gift Tracking: Credit companies providing matching gifts
- Household Giving: Credit both spouses for donations made by one
Usage in Salesforce NPSP
Soft Credits in Salesforce are used for:- Rollup Summaries: NPSP can roll up soft credit totals to Contacts/Accounts
- Reporting: Standard NPSP reports include soft credit metrics
- Acknowledgment Letters: Recognize soft credit recipients in communications
- Campaign Attribution: Track which supporters influenced campaign donations
- Donor Scoring: Include soft credits in donor engagement scoring
- Major Gift Pipeline: Track who’s facilitating major donations
Integration Rules
Currently, soft credit field mappings are entirely hard-coded. There are no configurable mapping rules for soft credits, as the data structure is standardized across NPSP implementations.Best Practices
- Define clear policies for when to give soft credits
- Be consistent in soft credit application across your organization
- Document scenarios where soft credits should be used
- Don’t over-credit - not every donation needs multiple soft credits
- Credit amounts thoughtfully - they don’t have to equal the donation
- Use for recognition - soft credits shouldn’t replace proper donor attribution
- Train staff on soft credit policies and procedures
- Review regularly - audit soft credits to ensure policy compliance
- Sync early - ensure donors and transactions exist before adding soft credits
- Communicate value - help soft credit recipients understand their recognition
Troubleshooting
Soft credit not syncing:- Verify the donor has a Salesforce ID (Contact or Account)
- Check that the transaction has a
salesforce_id - Ensure the integration has access to both soft credit objects
- Verify the donor type matches the expected Salesforce object type
- WeGive stores amounts in cents, Salesforce in dollars
- Verify the conversion is working correctly (divide by 100)
- Check for rounding issues with decimal amounts
- Verify the donor type in WeGive (individual vs. company)
- Individual donors should use Partial Soft Credits
- Company donors should use Account Soft Credits
- The integration automatically selects based on donor type
- Verify the deleted soft credits query is running for both object types
- Check that deletions are processing in both directions
- Ensure no competing process is recreating the soft credits
- The donor or transaction doesn’t exist in Salesforce
- Run a manual sync of donors and transactions first
- Check that the prerequisite records have valid Salesforce IDs
- Soft credits are only matched by Salesforce ID
- If duplicates exist, they may have been created outside the integration
- Delete duplicates in Salesforce, keeping the one with the correct WeGive relationship
Understanding Hard-coded Mappings
All soft credit field mappings are hard-coded because:- The NPSP soft credit object structures are standardized
- The relationships are simple: transaction + donor + amount
- Custom fields on soft credit objects are rarely used
- The integration needs to handle two object types automatically