Here’s a comprehensive framework for deciding between LWC quick actions, Screen Flows, and hybrid solutions for opportunity management, addressing all three focus areas.
For LWC quick actions for custom UI, use them when:
- The interaction requires real-time calculations or data updates visible to the user (like quote total updating as products are added)
- You need sophisticated UI controls not available in Screen Flows (drag-and-drop, complex data grids, interactive charts)
- The action is used frequently by reps (multiple times daily) where UX polish significantly impacts productivity
- Mobile experience is critical and you need precise control over responsive layouts
- The business logic is stable and unlikely to change frequently
Examples perfect for LWC:
- Custom quote builder with product configuration and real-time pricing
- Interactive competitor comparison tool with dynamic scoring
- Visual deal timeline with drag-and-drop milestone management
For Screen Flows for admin updates, use them when:
- The workflow is primarily data collection with straightforward logic
- Business rules and field requirements change frequently
- You need rapid iteration based on sales feedback
- Admin team needs to maintain the process without developer dependencies
- The interaction is periodic rather than high-frequency (weekly/monthly rather than multiple times daily)
Examples perfect for Screen Flows:
- Discount approval requests (collect justification, set approval criteria, route to managers)
- Win/loss analysis capture (structured questions about why deal closed)
- Deal risk assessment (checklist-style evaluation with scoring)
- Quarterly business review preparation (gather forecast data and analysis)
Implement these Screen Flow UX best practices to maximize user satisfaction:
- Use two-column layouts to reduce scrolling and group related fields
- Implement progressive disclosure - show fields conditionally based on previous answers
- Add progress indicators for multi-step flows so users know how far they’ve progressed
- Use dynamic picklists that filter based on context (only show relevant competitors, products, or reasons)
- Pre-populate fields with default values from the opportunity record
- Include help text and examples inline to guide users
- Add confirmation screens that summarize what will happen before final submission
- Use validation rules with clear error messages to catch issues before submission
For hybrid LWC + Flow solutions, this pattern works well for:
- Workflows that need both polished UI and admin-maintainable business logic
- Situations where the presentation layer is stable but process rules change
- Complex guided selling scenarios that combine custom visualization with data collection
Implement the hybrid pattern:
- Create a minimal LWC component that provides branded chrome (header, footer, styling)
- Use lightning-flow component within the LWC to embed a Screen Flow
- Pass context data (opportunity ID, user info) from LWC to Flow as input variables
- Handle Flow completion events in the LWC to show success messages or navigate to records
- The LWC handles presentation and navigation, the Flow handles business logic
Example hybrid implementation for discount approval:
// LWC provides branded wrapper
<template>
<lightning-card title="Request Discount Approval">
<lightning-flow
flow-api-name="Discount_Approval_Request"
flow-input-variables={inputVariables}
onstatuschange={handleFlowStatus}>
</lightning-flow>
</lightning-card>
</template>
The embedded Screen Flow contains all the approval logic, field collection, and routing rules that admins can maintain. The LWC just provides the container and handles navigation after completion.
For your specific opportunity management use cases:
Discount Approval Request: Screen Flow
- Primarily data collection (discount amount, justification, customer situation)
- Business rules change (approval thresholds, required fields, routing logic)
- Used occasionally (few times per week per rep)
- Admin team needs to adjust approval criteria based on company policies
Competitive Win/Loss Analysis: Screen Flow
- Structured questionnaire format works well in Screen Flow
- Questions and response options evolve as you learn more about competitors
- Periodic activity (once per closed deal)
- Sales ops needs to refine questions based on analysis needs
Deal Risk Assessment: Hybrid LWC + Flow
- Present a visual risk dashboard in LWC showing key risk indicators
- Embed Screen Flow for guided risk evaluation questionnaire
- LWC shows real-time risk score updating as questions are answered
- Flow contains the scoring logic and risk factor definitions that admins maintain
Custom Quote Generation: LWC Quick Action
- Requires real-time product configuration and pricing calculations
- Interactive product selection with dynamic filtering and recommendations
- Used frequently (multiple times per day for active reps)
- Complex UI with product grids, pricing tiers, and discount application
- Business logic is relatively stable (pricing rules in Apex that change infrequently)
Implement configuration-driven LWC components to balance custom UI with some admin flexibility:
- Use Custom Metadata Types to store business rules that LWC reads at runtime
- Expose design attributes in App Builder so admins can configure component behavior
- Store validation rules and calculation formulas in Custom Settings that admins can update
- Build generic, reusable LWC components (like a configurable form builder) rather than highly specific ones
For admin vs developer maintenance boundaries:
- Admins maintain: Screen Flow logic, field requirements, validation rules, approval routing, help text, picklist values
- Developers maintain: LWC UI components, complex calculations in Apex, external integrations, custom Lightning resources
- Shared maintenance: Custom Metadata and Custom Settings that define business rules read by LWC components
The key is matching the solution to the specific use case rather than adopting a one-size-fits-all approach. High-frequency actions with complex UI needs justify LWC investment. Frequently changing business processes with straightforward interactions work better as Screen Flows. Complex scenarios that need both polished UI and maintainable logic benefit from hybrid patterns.
Start by auditing your opportunity management workflows and categorizing them by frequency, UI complexity, and change frequency. This will naturally reveal which patterns fit each scenario and create a clear framework for future decisions.