Flow Name: [I2C] Deactivate PAC Subscriptions and Recurring Orders for Non-US Address¶
Last Updated: 2025-07-01 Source Code: I2C_Deactivate_PAC_Subscriptions_and_Recurring_Orders_for_Non_US_Address.flow-meta.xml
API Name: I2C_Deactivate_PAC_Subscriptions_and_Recurring_Orders_for_Non_US_Address Status: Active Type: Custom Trigger: Record-triggered flow on Account update (after save)
Business Purpose¶
Automatically deactivates PAC (Political Action Committee) contribution subscriptions and recurring orders when an account's address changes from US to non-US, or when membership expires, due to legal restrictions on foreign political contributions.
Process Flow¶
- Trigger Conditions: Fires when Account is updated with either:
- PersonMailingCountry changes from "United States" to non-US
- Membership_status__c changes to "Expired" from "Active" or "Within Grace period"
- Get PAC Products: Retrieves PAC contribution products by SKU:
- P-PAC-998, P-PAC-997, P-PAC-032
- Collect Product IDs: Transforms product records to collection of IDs
- Get Active PAC Subscriptions: Finds all Active subscriptions for the account with PAC products
- Loop Subscriptions: For each active subscription:
- Sets Status to "Expired"
- Adds to collection for bulk update
- Update Subscriptions: Bulk updates all PAC subscriptions to Expired status
- Get PAC Recurring Orders: Finds recurring ChargentOrders with:
- Monthly, Quarterly, or Annual frequency
- Recurring PAC flag set to true
- "Recurring" payment status
- Loop Recurring Orders: For each recurring order:
- Sets Payment Status to "Stopped"
- Adds to collection for bulk update
- Update Recurring Orders: Bulk updates all PAC recurring orders to Stopped status
- Error Handling: Shows specific errors for subscription or order update failures
📊 Click to view Process Flow Diagram
flowchart TD
Start([Start: Record-triggered flow on Account update (after save)]) --> Check{Entry Criteria<br/>Met?}
Check -->|No| End([End])
Check -->|Yes| Process[Execute Business Logic]
Process --> Update[Update Records]
Update --> End
style Start fill:#e1f5ff
style Check fill:#fff4e1
style Process fill:#e1ffe1
style Update fill:#ffe1e1
style End fill:#e1f5ff
Key Business Rules¶
- Only affects PAC contribution products (specific SKUs)
- Triggers on address change from US to non-US
- Also triggers on membership expiration
- Changes subscription status from "Active" to "Expired"
- Changes recurring order status from "Recurring" to "Stopped"
- Uses bulk operations for performance
- Processes both subscriptions and recurring orders
Dependencies¶
- Account.PersonMailingCountry and Membership_status__c fields
- Product2 records with PAC SKUs (P-PAC-998, P-PAC-997, P-PAC-032)
- Subscription__c object with Status__c field
- ChargentOrders__ChargentOrder__c with ChargentOrders_Recurring_Pac__c flag
- ChargentOrders__Payment_Status__c and ChargentOrders__Payment_Frequency__c fields
Changes¶
None explicitly noted in the flow
⚠️ Pre-Go-Live Concerns¶
CRITICAL - Fix Before Go-Live¶
- Legal compliance: Must ensure this flow prevents foreign political contributions - failure could result in legal violations
- Hardcoded SKUs: PAC product identification relies on hardcoded SKUs - missing products could bypass legal controls
- Address validation: Only checks mailing country - doesn't validate if address change is legitimate
HIGH - Address Soon After Go-Live¶
- No reversal logic: No mechanism to reactivate if address is corrected back to US
- No notification: Account holders aren't notified of PAC contribution cancellation
- Bulk operation failures: If bulk updates fail, some PAC contributions might continue
MEDIUM - Future Enhancement¶
- Limited address triggers: Only handles mailing address - doesn't check billing address
- No audit trail: Doesn't log who triggered the deactivation or reason
- Manual intervention: No process for exceptions or appeals
LOW - Monitor¶
- Performance: Multiple bulk operations could impact performance with large data volumes
- Edge cases: Doesn't handle scenarios like temporary international addresses
Maintenance Notes¶
Complexity: High - Critical for legal compliance with political contribution laws. Requires immediate attention if any failures occur. Review regularly to ensure all PAC products are properly identified and that legal requirements haven't changed. Test thoroughly when adding new PAC products or changing address handling logic.