Quick Reference: Solution Architecture (D4)
Fast-track refresher for Domain 4. Covers the appropriate combination of declarative and programmatic functionality, and evaluating external applications. Read this, then review the decision flowcharts before your mock board.
What the Board Wants to Hear
| Board Question | What They Are Testing | How to Answer |
|---|---|---|
| ”Why Flow instead of Apex?” | That you evaluated trade-offs, not just defaulted | Cite specific criteria: volume, maintainability, team skills, governor limits |
| ”Why did you buy vs build?” | TCO thinking, exit strategy awareness | Walk through the evaluation: native first, then AppExchange, then custom |
| ”Why LWC over Aura?” | Technology currency and pragmatism | Greenfield = always LWC. Existing Aura = keep if stable, new features in LWC |
| ”What are the risks?” | Proactive risk identification | Governor limits, vendor lock-in, team skills gap, upgrade impact |
The Declarative-First Spectrum
This is NOT binary. Five positions exist:
flowchart LR
A["Platform Native\n(OOB features)"] --> B["Configure\n(Custom objects, flows)"]
B --> C["AppExchange\n(Managed packages)"]
C --> D["Custom Build\n(Apex, LWC)"]
D --> E["External System\n(Integrated product)"]
style A fill:#2d6a4f,stroke:#1b4332,color:#fff
style B fill:#4ecdc4,stroke:#3ab5ad,color:#000
style C fill:#f4a261,stroke:#d4823e,color:#000
style D fill:#e76f51,stroke:#c45a3f,color:#fff
style E fill:#9d0208,stroke:#6a040f,color:#fff
Flow Builder Quick Reference
Flow Types at a Glance
| Flow Type | Trigger | Best For |
|---|---|---|
| Before-Save Record-Triggered | DML (before commit) | Field updates on triggering record — no DML cost |
| After-Save Record-Triggered | DML (after commit) | Related record updates, platform events |
| Screen Flow | User click | Guided wizards, data entry |
| Schedule-Triggered | Cron | Batch reminders, cleanup jobs |
| Platform Event-Triggered | Platform Event | Async, decoupled processing |
| Autolaunched | Invoked by code/process | Reusable logic modules |
| Orchestration | Multi-step | Long-running, multi-stage processes |
Critical Governor Limits (Shared with Apex)
| Limit | Value | CTA Gotcha |
|---|---|---|
| SOQL queries | 100/txn | Each Flow “Get Records” counts |
| DML statements | 150/txn | Each Flow “Create/Update/Delete” counts |
| CPU time | 10,000 ms | Formula-heavy flows eat CPU |
| Elements per txn | No hard cap (removed in API v57.0+) | Constrained by CPU time limits |
Before-Save vs After-Save
Before-save flows modify the triggering record in memory — zero DML cost. After-save flows require DML for related records. Always use before-save when you only need the triggering record. This is a frequent board question.
Apex: When Code Wins
| Scenario | Why Apex |
|---|---|
| Complex data transformations | Maps, sets, conditional loops are cleaner in code |
| Volume > 50K records | Batch Apex handles millions; Flow struggles |
| Multi-object transactions | Explicit savepoints and rollback |
| External callouts | Retry logic, circuit breakers, error handling |
| Custom REST/SOAP endpoints | Inbound integration |
| Performance-critical paths | Compiled vs interpreted |
The Bridge Pattern: Invocable Actions
@InvocableMethod = best of both worlds. Complex logic in testable Apex, callable from admin-friendly Flow. Always mention this at the board when explaining hybrid approaches.
Modern Platform Features Cheat Sheet
| Feature | Maturity | When to Recommend |
|---|---|---|
| LWC | Mature | All new UI. Always. |
| Screen Flows | Mature | Guided processes, wizards |
| OmniStudio | Mature (Industries) | Industry templates, complex multi-step UI |
| Dynamic Forms | Maturing | Complex page layouts, multiple personas |
| External Services | Mature | Simple REST calls without Apex |
| Agentforce | Early GA | Customer service AI — recommend with phased rollout |
| Einstein Prediction Builder | Mature | When 6+ months historical data exists |
| Flow Orchestration | Maturing | Multi-step, long-running processes |
OmniStudio vs Screen Flow — The Quick Test
Industry-specific process + Industry Cloud license + templates exist = OmniStudio. Everything else = Screen Flow (add custom LWC if UI needs exceed standard components).
Build vs Buy Decision — Condensed
The 4-Question Filter
- Does Salesforce do this natively? —> Use platform native
- Is this core to competitive advantage? —> Build custom
- Is there a mature AppExchange package meeting 80%+ of requirements? —> Buy
- Is TCO favorable over 3-5 years? —> Validates buy decision
Vendor Scorecard — Top Criteria
| Criterion | Weight | Red Flag |
|---|---|---|
| Feature completeness | 15% | Meets < 80% of requirements |
| Performance impact | 10% | Excessive governor limit consumption |
| Support quality | 10% | No SLA, limited hours |
| Upgrade path | 10% | Push upgrades with breaking changes history |
| Exit strategy | 10% | Proprietary data format, no export |
| Security review | 5% | Not passed or expired |
Vendor Lock-In Red Flags
Proprietary data formats. Replaces standard SF objects. Bypasses sharing model. No API access to stored data. Requires exclusive admin access.
Reverse-Engineered Use Cases
Scenario 1: Insurance Company — Claims Processing
Situation: 200-person insurance company needs guided claims intake with document collection, multi-step approval, and ERP sync.
What you’d do: OmniStudio (OmniScript for guided intake with industry templates, DataRaptor for data transformation) + Apex for ERP callout with retry logic. Screen Flow alone would require too many custom LWC embeds for the complex UI requirements. OmniStudio is justified because they already have Industry Cloud licensing and insurance-specific templates exist.
Trade-off: Higher skill requirement for OmniStudio maintenance. Mitigated by vendor training and documented runbooks.
Scenario 2: Retail Company — Order Management
Situation: E-commerce retailer wants real-time inventory checks during order creation, with 500K orders/month.
What you’d do: Apex trigger for order creation (volume demands it) + Platform Event to decouple inventory callout (async, separate transaction) + Before-save Flow for simple field defaults on Order. Do NOT use Flow for the inventory callout — External Services cannot handle the retry logic and error handling needed at this volume.
Trade-off: Developer dependency for Apex maintenance. Mitigated by Invocable Action bridge so admins can adjust routing rules in Flow while Apex handles heavy lifting.
Scenario 3: Financial Services — Document Generation
Situation: Wealth management firm needs client-facing portfolio reports with compliance disclaimers, generated on demand and quarterly.
What you’d do: Buy Conga Composer (or equivalent). Document generation is not competitive advantage. AppExchange package meets 90%+ of requirements. TCO over 3 years is lower than custom build. Exit strategy: templates are Word-based (portable), data stays in Salesforce.
Trade-off: Per-user license cost, vendor dependency. Mitigated by contractual review, alternative vendors identified (Nintex DocGen), and data portability confirmed.
Key Anti-Patterns (Board Red Flags)
| Anti-Pattern | Why It Fails | Fix |
|---|---|---|
| Multiple record-triggered flows per object | Unpredictable order, shared limits | One master flow + subflows |
| DML inside flow loops | Governor limit violation | Collect, then bulk DML after loop |
| Apex for simple field updates | Over-engineering | Before-save Flow |
| Hardcoded IDs in Flow/Apex | Breaks across environments | Custom Metadata Types |
| AppExchange without evaluation | Vendor lock-in, unknown limit impact | Use vendor scorecard |
| No error handling in Flows | Cryptic user errors, data inconsistency | Fault paths on every Flow |
Deep Dive Links
- Declarative vs Programmatic — Full Flow vs Apex analysis
- Build vs Buy — Complete evaluation framework and TCO
- Modern Platform Features — OmniStudio, Agentforce, Dynamic Forms detail
- Decision Guides — All decision flowcharts
- Trade-Offs — Detailed trade-off matrices
- Best Practices — Patterns and anti-patterns
- Flow vs Apex Quick Reference — Decision matrix and build vs buy scenarios