Flow Name: Buyer Account - after create or update¶
Last Updated: 2025-08-03 Source Code: Buyer_Account_after_create_or_update.flow-meta.xml
API Name: Buyer_Account_after_create_or_update Status: Active Type: Custom Trigger: Record Update (BuyerAccount) - After Save
Business Purpose¶
This flow synchronizes buyer account status between the BuyerAccount object and the related Account record. It ensures that when a buyer account's active status changes, the corresponding Account record's buyer enablement field is updated to maintain data consistency across the system.
Process Flow¶
- Trigger Activation: Fires when a BuyerAccount record is updated
- Account Update: Updates the related Account record where:
- Account.Id equals the BuyerAccount.BuyerId
- Sets Account.Buyer_Account_Enabled__c = BuyerAccount.IsActive
📊 Click to view Process Flow Diagram
flowchart TD
Start([Start: BuyerAccount Update<br/>After Save Trigger]) --> Update[Update Related Account:<br/>Buyer_Account_Enabled__c<br/>= BuyerAccount.IsActive]
Update --> End([End])
style Start fill:#e1f5ff
style Update fill:#ffe1e1
style End fill:#e1f5ff
Key Business Rules¶
- Direct synchronization between BuyerAccount.IsActive and Account.Buyer_Account_Enabled__c
- Uses BuyerId field to establish the relationship between BuyerAccount and Account
- Executes after the BuyerAccount record is saved to ensure data integrity
Dependencies¶
- Objects:
- BuyerAccount (Salesforce Commerce Cloud object)
- Account (Standard Salesforce object)
- Fields:
- BuyerAccount.IsActive (Standard field)
- BuyerAccount.BuyerId (Standard field)
- Account.Buyer_Account_Enabled__c (Custom field)
- Relationships: BuyerAccount to Account via BuyerId field
Changes¶
No specific pull request references noted in the flow metadata.
⚠️ Pre-Go-Live Concerns¶
CRITICAL - Fix Before Go-Live¶
- No Error Handling: Flow lacks fault paths for failed account updates or invalid BuyerId references
- Relationship Validation: No validation that BuyerId actually corresponds to a valid Account record
HIGH - Address Soon After Go-Live¶
- Bulk Processing: No consideration for bulk updates - could cause performance issues with large data volumes
- Audit Trail: No logging of synchronization activities for troubleshooting
MEDIUM - Future Enhancement¶
- Field Mapping: Simple boolean mapping may not account for future business requirements
- Conditional Logic: No business rules around when synchronization should or shouldn't occur
LOW - Monitor¶
- Performance: Monitor for any delays in synchronization during high-volume commerce operations
- Data Consistency: Periodic validation that Account.Buyer_Account_Enabled__c matches BuyerAccount.IsActive
Maintenance Notes¶
This is a simple synchronization flow with minimal complexity. However, it's critical for commerce functionality, so any issues could impact buyer account management. Recommend quarterly validation of data consistency and monitoring of any error logs related to failed updates.