Skip to main content

Salesforce Objects:

  • npsp__Partial_Soft_Credit__c (NPSP standard object - for Contacts)
  • npsp__Account_Soft_Credit__c (NPSP standard object - for Accounts)
WeGive Model: SoftCredit

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:
  1. Partial Soft Credits - For crediting individual Contacts
  2. Account Soft Credits - For crediting company Accounts
WeGive uses a single SoftCredit model that works with both types, automatically routing to the appropriate Salesforce object based on the donor type.

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
The export happens automatically after the create, update, or delete action 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 LastModifiedDate newer than the last successful sync are pulled into WeGive
  • Deleted Credits: The integration tracks deleted soft credits via IsDeleted = true queries
This means:
  • 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 LastModifiedDate field, 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):
  1. Queries npsp__Partial_Soft_Credit__c records based on last modified date
  2. Loads related transactions that match the Opportunity IDs
  3. Loads individual donors (contacts) that match the Contact IDs
  4. Creates or updates SoftCredit records in WeGive
Account Soft Credits (for Accounts):
  1. Queries npsp__Account_Soft_Credit__c records based on last modified date
  2. Loads related transactions that match the Opportunity IDs
  3. Loads company donors (accounts) that match the Account IDs
  4. Creates or updates SoftCredit records in WeGive
Deleted Soft Credits: The integration specifically queries for deleted soft credits from both objects: sql
SELECT Id, LastModifiedDate, IsDeleted 
FROM npsp__Partial_Soft_Credit__c 
WHERE IsDeleted = true
sql
SELECT Id, LastModifiedDate, IsDeleted 
FROM npsp__Account_Soft_Credit__c 
WHERE IsDeleted = true
These are then removed from WeGive to maintain sync.

Pushing Data to Salesforce

When a SoftCredit is created or updated in WeGive, the integration:
  1. Ensures Prerequisites Exist:
    • Donor must have a Salesforce ID (Contact or Account)
    • Transaction must have a salesforce_id
  2. 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
  3. 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_id and not deleted: CREATE a new record
The integration automatically pushes the donor and transaction first if they don’t have Salesforce IDs.

Complete Field Mapping - Partial Soft Credits (Contacts)

Salesforce FieldWeGive FieldWeGive API FieldDirectionTypeNotes
IdSalesforce IDsalesforce_idImport from SalesforceHard-codedSalesforce’s unique identifier for this soft credit
npsp__Opportunity__cTransaction Salesforce IDtransaction.salesforce_idBoth WaysHard-codedLinks to the Opportunity (transaction)
npsp__Contact__cDonor Salesforce IDdonor.salesforce_idBoth WaysHard-codedLinks to the Contact being credited
npsp__Amount__cAmountamountBoth WaysHard-codedCredit amount in dollars (WeGive stores in cents)
NameName(auto-generated)Import from SalesforceHard-codedDisplay name for the soft credit
LastModifiedDateLast Modified(tracking)Import from SalesforceHard-codedWhen the soft credit was last updated

Complete Field Mapping - Account Soft Credits (Accounts)

Salesforce FieldWeGive FieldWeGive API FieldDirectionTypeNotes
IdSalesforce IDsalesforce_idImport from SalesforceHard-codedSalesforce’s unique identifier for this soft credit
npsp__Opportunity__cTransaction Salesforce IDtransaction.salesforce_idBoth WaysHard-codedLinks to the Opportunity (transaction)
npsp__Account__cDonor Salesforce Account IDdonor.salesforce_account_idBoth WaysHard-codedLinks to the Account being credited
npsp__Amount__cAmountamountBoth WaysHard-codedCredit amount in dollars (WeGive stores in cents)
NameName(auto-generated)Import from SalesforceHard-codedDisplay name for the soft credit
LastModifiedDateLast Modified(tracking)Import from SalesforceHard-codedWhen 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
You don’t need to specify which object to use - the integration determines this based on the donor type.

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:
  1. If the donor doesn’t have a Salesforce ID, the donor is pushed first
  2. If the transaction doesn’t have a salesforce_id, the transaction is pushed first
  3. Then the soft credit is created
This cascading push ensures data integrity without manual intervention.

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
When a Soft Credit is deleted in Salesforce:
  • 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
  • Check if the transaction has a salesforce_id
    • If not, push the transaction first
Step 2: Determine Action
  • 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_id and not deleted:
    • CREATE a new soft credit in Salesforce
Step 3: Select Object Type
  • 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__c to salesforce_id
    • If not found, throw an exception
  • Find the donor in WeGive by matching npsp__Contact__c to salesforce_id (where type = ‘individual’)
    • If not found, throw an exception
Step 2: Find or Create Soft Credit
  • Search for existing soft credit by salesforce_id
  • If not found, create a new SoftCredit
Step 3: Update Soft Credit
  • Link to the donor
  • Link to the transaction
  • Set the amount (convert from dollars to cents)
  • Store the Salesforce ID
  • Save the record
For Account Soft Credits (Accounts): Step 1: Find Related Records
  • Find the transaction in WeGive by matching npsp__Opportunity__c to salesforce_id
    • If not found, throw an exception
  • Find the donor in WeGive by matching npsp__Account__c to salesforce_account_id (where type = ‘company’)
    • If not found, throw an exception
Step 2: Find or Create Soft Credit
  • Search for existing soft credit by salesforce_id
  • If not found, create a new SoftCredit
Step 3: Update Soft Credit
  • 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__c and npsp__Account_Soft_Credit__c where IsDeleted = 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)
For WeGive to Salesforce (Account Soft Credits):
  • npsp__Opportunity__c (Transaction Salesforce ID)
  • npsp__Account__c (Account Salesforce ID)
  • npsp__Amount__c (Amount in dollars)
For Salesforce to WeGive (Both Types):
  • 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

  1. Define clear policies for when to give soft credits
  2. Be consistent in soft credit application across your organization
  3. Document scenarios where soft credits should be used
  4. Don’t over-credit - not every donation needs multiple soft credits
  5. Credit amounts thoughtfully - they don’t have to equal the donation
  6. Use for recognition - soft credits shouldn’t replace proper donor attribution
  7. Train staff on soft credit policies and procedures
  8. Review regularly - audit soft credits to ensure policy compliance
  9. Sync early - ensure donors and transactions exist before adding soft credits
  10. 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
Amount doesn’t match:
  • WeGive stores amounts in cents, Salesforce in dollars
  • Verify the conversion is working correctly (divide by 100)
  • Check for rounding issues with decimal amounts
Wrong soft credit object used:
  • 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
Deleted soft credits reappearing:
  • 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
Missing prerequisites error:
  • 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
Duplicate soft credits:
  • 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