Flow Name: PAC Contribution Auto-Renewal Failure Notification¶
Last Updated: 2025-07-31 Source Code: PAC_Contribution_Auto_Renewal_Failure_Notification.flow-meta.xml
API Name: PAC_Contribution_Auto_Renewal_Failure_Notification Status: Active Type: Custom Trigger: ChargentOrders__Transaction__c record with Response_Status__c = "Error"
Business Purpose¶
This flow automatically sends email notifications when PAC (Political Action Committee) contribution auto-renewal transactions fail. It identifies failed recurring PAC transactions and triggers appropriate error notifications to notify stakeholders of payment processing failures.
Process Flow¶
- Transaction Error Detection: Triggers when a Chargent transaction record is created or updated with Response_Status__c = "Error"
- Related Order Lookup: Retrieves the associated ChargentOrder record to access the recurring PAC flag
- PAC Order Validation: Checks if the failed transaction is related to a recurring PAC contribution order (ChargentOrders_Recurring_Pac__c = true)
- Email Notification: If validation passes, sends email alert "Transaction_Error_on_PAC_Auto_Renewing" using the transaction record as context
📊 Click to view Process Flow Diagram
flowchart TD
Start([Start: ChargentOrders__Transaction__c record with Response_Status__c = "Error"]) --> Lookup[Lookup Related Data]
Lookup --> Found{Data<br/>Found?}
Found -->|No| End([End])
Found -->|Yes| Calculate[Calculate/Determine Values]
Calculate --> Update[Update Records]
Update --> End
style Start fill:#e1f5ff
style Lookup fill:#f0e1ff
style Found fill:#fff4e1
style Calculate fill:#e1ffe1
style Update fill:#ffe1e1
style End fill:#e1f5ff
Key Business Rules¶
- Only processes transactions with Response_Status__c = "Error"
- Only triggers notifications for recurring PAC contribution orders (ChargentOrders_Recurring_Pac__c = true)
- Uses email alert template "Transaction_Error_on_PAC_Auto_Renewing"
- Passes the transaction record ID as context to the email template
- Requires record to have changed to meet criteria (prevents duplicate notifications on same error)
Dependencies¶
- ChargentOrders__Transaction__c object with ChargentOrders__Response_Status__c field
- ChargentOrders__ChargentOrder__c object with ChargentOrders_Recurring_Pac__c field
- Email alert template "Transaction_Error_on_PAC_Auto_Renewing" configured on ChargentOrders__Transaction__c
- Lookup relationship between Transaction and ChargentOrder (ChargentOrders__Order__c field)
Changes¶
[No specific PR or change notes documented in the flow]
⚠️ Pre-Go-Live Concerns¶
CRITICAL - Fix Before Go-Live¶
- Email alert template "Transaction_Error_on_PAC_Auto_Renewing" existence not validated - flow will fail if template doesn't exist
- No error handling if ChargentOrder lookup fails or returns null
- Missing validation that transaction actually belongs to a PAC contribution product
HIGH - Address Soon After Go-Live¶
- No rate limiting or deduplication - multiple failed attempts could spam notifications
- Email recipients not clearly defined - could send to wrong stakeholders
- No logging or audit trail of sent notifications for troubleshooting
MEDIUM - Future Enhancement¶
- Could enhance to include transaction failure details in email context
- No differentiation between different types of PAC contribution failures
- Consider adding retry logic or escalation for persistent failures
LOW - Monitor¶
- Flow label "Notify user that" appears incomplete in interview label
- Simple flow structure could be enhanced with additional context gathering
- Consider consolidating with other payment failure notification flows
Maintenance Notes¶
This is a straightforward notification flow with minimal complexity. The primary maintenance concern is ensuring the email alert template remains configured and functional. Monitor email delivery rates and recipient feedback to ensure notifications are reaching appropriate stakeholders. Review quarterly to ensure PAC contribution failure handling aligns with business requirements.