Skip to content

Flow Name: OMS Manual Payment Processing

Last Updated: 2025-10-22 Source Code: OMS_Manual_Payment_Processing.flow-meta.xml

API Name: OMS_Manual_Payment_Processing Status: Active Type: Custom Trigger: Screen Flow (Manual Launch from Order Record)

Business Purpose

This flow enables staff to process manual payments for orders that cannot be processed through the standard automated payment system, such as check payments, wire transfers, or credit memos, ensuring proper financial tracking and order fulfillment.

Process Flow

  1. Order Validation: Checks if order is marked as Manual Order
  2. OrderSummary Check: Verifies OrderSummary exists with "Pending Payment" status
  3. Payment Entry Screen: Collects payment details including amount, date, method, and method-specific fields
  4. Payment Creation: Creates Payment record with all entered details
  5. Order Payment Summary: Links payment to OrderSummary using Connect API
  6. Status Updates: Updates OrderSummary to "Paid" and Order to "Activated"
  7. Fulfillment Date: Sets order fulfillment date to payment date
📊 Click to view Process Flow Diagram
flowchart TD
    Start([Start: Launch from Order]) --> GetOrder[Get Order Record]
    GetOrder --> CheckManual{Is Manual Order?}

    CheckManual -->|No| ErrorManual[Show Error: Manual Only]
    CheckManual -->|Yes| GetSummary[Get OrderSummary]

    GetSummary --> CheckSummary{Summary Found?}
    CheckSummary -->|No| ErrorSummary[Show Error: No Summary]
    CheckSummary -->|Yes| Screen[Payment Entry Screen]

    Screen --> CheckMethod{Payment Method?}
    CheckMethod -->|Check| ShowCheckFields[Show Check Fields]
    CheckMethod -->|Credit Memo| ShowMemoFields[Show Memo Fields]
    CheckMethod -->|Other| StandardFields[Standard Fields Only]

    ShowCheckFields --> Submit[User Submits]
    ShowMemoFields --> Submit
    StandardFields --> Submit

    Submit --> CreatePayment[Create Payment Record]
    CreatePayment --> PaymentSuccess{Payment Created?}

    PaymentSuccess -->|No| ErrorPayment[Show Payment Error]
    PaymentSuccess -->|Yes| CreateSummary[Create Order Payment Summary]

    CreateSummary --> SummarySuccess{Summary Created?}
    SummarySuccess -->|No| ErrorOPS[Show OPS Error]
    SummarySuccess -->|Yes| UpdateSummary[Update OrderSummary to Paid]

    UpdateSummary --> GetPayment[Retrieve Payment Details]
    GetPayment --> UpdateOrder[Update Order: Activated & Fulfillment Date]
    UpdateOrder --> End([End])

    ErrorManual --> End
    ErrorSummary --> End
    ErrorPayment --> End
    ErrorOPS --> End

    style Start fill:#e1f5ff
    style CheckManual fill:#fff4e1
    style CheckSummary fill:#fff4e1
    style CheckMethod fill:#fff4e1
    style PaymentSuccess fill:#fff4e1
    style SummarySuccess fill:#fff4e1
    style CreatePayment fill:#ffe1e1
    style UpdateOrder fill:#ffe1e1
    style End fill:#e1f5ff

Key Business Rules

  • Manual Order Only: Flow only works with orders marked Manual_Order__c = true
  • OrderSummary Required: Must have OrderSummary in "Pending Payment" status
  • Amount Validation: Payment amount must be >= 0 and >= OrderSummary.GrandTotalAmount
  • Processing Mode: All payments set to "External" processing mode
  • Payment Type: All payments set to "Capture" type
  • Conditional Fields:
  • Check payments show: Check Number (required), Institution Number, Account Number, Transit Number, Designation Number
  • Credit Memo payments show: Memo Number (required)
  • Automatic Activation: Order status changes to "Activated" upon successful payment processing
  • Fulfillment Date: Set to payment date for downstream processing

Dependencies

  • Standard Objects: Order, OrderSummary, Payment
  • Connect API: createOrderPaymentSummary action
  • Payment Fields: Payment_Method_Type__c picklist, custom check/memo fields
  • Order Fields: Manual_Order__c, Fulfillment_Date__c

Changes

  • PR-33182: Changed default amount to order summary vs. order
  • PR-33051: Added check/credit memo fields
  • PR-33052: Accounting for new check fields

Pre-Go-Live Concerns

CRITICAL - Fix Before Go-Live

  • None identified

HIGH - Address Soon After Go-Live

  • No Reversal Process: No way to undo a manually processed payment within the flow
  • Single Payment Only: Cannot handle partial or multiple payments in one session

MEDIUM - Future Enhancement

  • Amount Defaulting: Defaults to full OrderSummary amount; could support partial payments
  • Field Validation: Limited validation on check fields (account numbers, transit numbers)
  • Audit Trail: No automatic notes or comments added about manual processing
  • Status Choices: Fixed dropdown for status; doesn't reflect actual Payment object picklist values dynamically

LOW - Monitor

  • Error Screens: User can't go back from error screens; must cancel and restart
  • Account/Order Defaults: Pre-populated but editable; could lead to mismatched relationships

Maintenance Notes

Complexity: Medium - Screen flow with conditional visibility and multiple record operations

Review Schedule: Bi-annual review recommended due to financial implications

Testing Requirements: - Test with manual orders only - Test with non-manual orders (should show error) - Test with missing OrderSummary (should show error) - Test check payment with all fields - Test credit memo payment - Test other payment methods - Verify amount validation works correctly - Verify OrderSummary and Order status updates - Test error scenarios (payment creation failure, OPS creation failure) - Verify fulfillment date is set correctly