Flow Name: [I2C] Chargent Transaction: Auto-Relate to Standard Order¶
Last Updated: 2025-05-23 Source Code: I2C_Chargent_Transaction_Auto_Relate_to_Standard_Order.flow-meta.xml
API Name: I2C_Chargent_Transaction_Auto_Relate_to_Standard_Order Status: Active Type: Custom Trigger: ChargentTransaction creation (before save) when Standard Order exists and amount > 0
Business Purpose¶
Automatically establishes the relationship between ChargentTransactions and Standard Orders when a ChargentOrder is connected to a Standard Order, ensuring proper payment tracking across both systems.
Process Flow¶
- Validation: Checks that ChargentOrder has a related Standard Order and transaction amount is greater than 0
- Relationship Assignment: Sets the Transaction's Order__c field to the ChargentOrder's Standard_Order__c value
- Single-step Process: Simple direct assignment with no complex logic
📊 Click to view Process Flow Diagram
flowchart TD
Start([Start: ChargentTransaction creation (before save) when Standard Order exists and amount > 0]) --> 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 processes transactions with amount greater than 0
- Requires ChargentOrder to have a Standard Order relationship
- Uses formula-based filtering for efficiency
- Before-save trigger for immediate relationship establishment
Dependencies¶
- ChargentOrders__Transaction__c with Order__c field for Standard Order relationship
- ChargentOrders__ChargentOrder__c with Standard_Order__c lookup field
- Standard Order object (Order)
- Proper relationship structure: Transaction → ChargentOrder → Standard Order
Changes¶
Flow description indicates this handles auto-relating transactions to standard orders when the relationship exists.
⚠️ Pre-Go-Live Concerns¶
CRITICAL - Fix Before Go-Live¶
- No critical issues identified
HIGH - Address Soon After Go-Live¶
- No error handling for relationship assignment failures
- Missing validation that Standard Order exists and is accessible
MEDIUM - Future Enhancement¶
- Add error handling for failed Order relationship assignments
- Consider adding logging for relationship establishment
- Add validation of Order accessibility and status
LOW - Monitor¶
- Monitor for failed Order relationship assignments
- Validate relationship accuracy between systems
- Track transaction-to-order linking success rates
Maintenance Notes¶
Simple, focused flow with clear business purpose. Very low complexity and maintenance overhead. Essential for proper payment tracking integration between Chargent and Standard Order systems. Consider adding basic error handling for production robustness.