Accounting Subledger (ASL): Payment Allocation Fix
Currently, the C4SF and C4NPSP Packages correctly map Classy Program Designations to existing General Accounting Units (GAUs) in Salesforce. Due to NPSP trigger order of operations and logic, the Payment Allocation object, tied to an Opportunity Payment Object, and thereby the Ledger Entry, are not attributing to the expected GAU for Classy Opportunities.
Setting up the flow
If you currently map Classy Program Designations to Salesforce GAUs, you must remove the GAU from the Campaigns in question. This is a related object and can be added in the Page Layout for campaign if not already there. Simply view the Campaign level allocation and delete it.
This guide will not go into the nuances of Salesforce automation but simply provide the basic building blocks to allow you to update the Payment Allocation object (and thereby influence the Ledger Entries) to expected values with Classy Donations.
- Triggers on creation of Payment object linked to opportunity (
npe01__OppPayment__c) - Waits one minute after Payment object is created to allow NPSP Triggers and jobs to run to completion
- ⚠️ It is imperative you add wait logic, to allow time for the NPSP processes to run, otherwise this update will not work and the flow will fail.
- Determines if the payment is related to Classy opportunity
- Gets the Payment Opportunity ID
- Gets the Correct GAU attributed to the Opportunity
- Sets the Payment Allocation GAU to match the one on the Opportunity
- Saves the Payment object.
Flow view:

Start:

Wait Criteria:

Is Classy Opportunity?:

Get Opportunity ID tied to Payment Object and Save to Variable:

Get Correct GAU tied to Opportunity ID and Save to Variable:

Update the Payment Allocation tied to the Payment with the Correct GAU:
