Apex and LWC Boundaries
Primary controller, service, and component ownership by feature area
CRM
CRM LWCs include lead conversion, duplicate detector, duplicate merge wizard, ownership transfer, opportunity creator, quote creator, quote approval submit/review, quote approval dashboard/list/metrics/timeline, quote PDF preview, account/contact summaries, and record owner cards.
Key Apex domains include quote approval, quote automation, duplicate handling, ownership transfer, account metrics, opportunity services, and quote PDFs.
Orders and 3PL
Orders LWCs include line item editor, Sales Order summary, payments workspace, shipping workspace, PDF preview, record email actions, tracking actions, fulfillment sync controls, 3PL runtime settings, 3PL warehouse manager, 3PL fulfillment manager, fulfillment monitor, and item rules hub.
Key Apex domains include Sales Order trigger handlers, fulfillment update services, 3PL runtime services, provider adapters, item rule services, payment terms, PDFs, email services, and order notification services.
Payments
Payment LWCs include payment console, payment method entry, payment order creator, payment gateway connections, payment operations settings, payment vault inventory, recurring plan editor, recurring plan lifecycle actions, dispute action, billing address section, amount input, and card/bank helper modules.
Key Apex domains include gateway lifecycle, tokenization, token coverage, transaction execution, payment order creation, recurring payment execution, settlement sync, account updater, and gateway health monitoring.
Purchasing and Inventory
Purchasing LWCs include item manager, item creation wizard, item creator tools, item group manager, inventory manager, BOM editor, purchase order pipeline, receipt modal, PO status panels, cost intelligence, stock lookup, product selector, and location selector.
Key Apex domains include item management, variant families, inventory services, purchase order services, BOMs, bundles, cost intelligence, and lookup helpers.
Shared Patterns
Use controller methods for UI DTOs and commands. Keep cross-record business rules in service classes. Do not duplicate lifecycle rules in LWC only; Apex must own server-side enforcement for quote approval, payment, fulfillment, warehouse handoff, and financial audit behavior.
Last updated on