Skip to content

Flow Name: [I2C] Chargent Order: Save Checkout Payment Method

Last Updated: 2025-07-24 Source Code: I2C_Chargent_Order_Save_Checkout_Payment_Method.flow-meta.xml

API Name: I2C_Chargent_Order_Save_Checkout_Payment_Method Status: Active Type: Custom Trigger: ChargentOrder creation/update (after save) when payment method is saved for auto-renewals

Business Purpose

Ensures that when customers save their payment method for auto-renewals at checkout, the payment method is propagated to their Account record, enabling it to be used for other existing auto-renewal orders.

Process Flow

  1. Triggers when ChargentOrder is created/updated with Saved_Method_At_Checkout__c = true
  2. Verifies a payment method exists (ChargentOrders__Payment_Method_Default__c is not null)
  3. Updates the related Account's Auto_Renewal_Payment_Method__c field with the payment method from the ChargentOrder
  4. Single-step process with no complex decision trees
📊 Click to view Process Flow Diagram
flowchart TD
    Start([Start: ChargentOrder creation/update (after save) when payment method is saved for auto-renewals]) --> 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 orders where customer explicitly chose to save payment method at checkout
  • Requires valid payment method to be present on the ChargentOrder
  • Updates Account-level payment method for use across all customer's auto-renewal orders
  • Uses record change detection to prevent unnecessary processing

Dependencies

  • ChargentOrders__ChargentOrder__c object with Saved_Method_At_Checkout__c and ChargentOrders__Payment_Method_Default__c fields
  • Account object with Auto_Renewal_Payment_Method__c field
  • Proper relationship between ChargentOrder and Account (ChargentOrders__Account__r)

Changes

No specific PR references noted in flow description.

⚠️ Pre-Go-Live Concerns

CRITICAL - Fix Before Go-Live

  • No error handling for Account update failures
  • Missing validation that Account relationship exists

HIGH - Address Soon After Go-Live

  • No logging or audit trail for payment method changes
  • Could override existing payment methods without user awareness

MEDIUM - Future Enhancement

  • Add user notification when payment method is updated
  • Consider adding rollback mechanism for failed updates

LOW - Monitor

  • Performance impact on high-volume checkout processing
  • Payment method synchronization accuracy

Maintenance Notes

Simple, focused flow with minimal complexity. Low maintenance overhead. Monitor for payment method synchronization issues and consider adding error handling before production deployment.