Skip to content

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 QuestionWhat They Are TestingHow to Answer
”Why Flow instead of Apex?”That you evaluated trade-offs, not just defaultedCite specific criteria: volume, maintainability, team skills, governor limits
”Why did you buy vs build?”TCO thinking, exit strategy awarenessWalk through the evaluation: native first, then AppExchange, then custom
”Why LWC over Aura?”Technology currency and pragmatismGreenfield = always LWC. Existing Aura = keep if stable, new features in LWC
”What are the risks?”Proactive risk identificationGovernor 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 TypeTriggerBest For
Before-Save Record-TriggeredDML (before commit)Field updates on triggering record — no DML cost
After-Save Record-TriggeredDML (after commit)Related record updates, platform events
Screen FlowUser clickGuided wizards, data entry
Schedule-TriggeredCronBatch reminders, cleanup jobs
Platform Event-TriggeredPlatform EventAsync, decoupled processing
AutolaunchedInvoked by code/processReusable logic modules
OrchestrationMulti-stepLong-running, multi-stage processes

Critical Governor Limits (Shared with Apex)

LimitValueCTA Gotcha
SOQL queries100/txnEach Flow “Get Records” counts
DML statements150/txnEach Flow “Create/Update/Delete” counts
CPU time10,000 msFormula-heavy flows eat CPU
Elements per txnNo 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

ScenarioWhy Apex
Complex data transformationsMaps, sets, conditional loops are cleaner in code
Volume > 50K recordsBatch Apex handles millions; Flow struggles
Multi-object transactionsExplicit savepoints and rollback
External calloutsRetry logic, circuit breakers, error handling
Custom REST/SOAP endpointsInbound integration
Performance-critical pathsCompiled 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

FeatureMaturityWhen to Recommend
LWCMatureAll new UI. Always.
Screen FlowsMatureGuided processes, wizards
OmniStudioMature (Industries)Industry templates, complex multi-step UI
Dynamic FormsMaturingComplex page layouts, multiple personas
External ServicesMatureSimple REST calls without Apex
AgentforceEarly GACustomer service AI — recommend with phased rollout
Einstein Prediction BuilderMatureWhen 6+ months historical data exists
Flow OrchestrationMaturingMulti-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

  1. Does Salesforce do this natively? —> Use platform native
  2. Is this core to competitive advantage? —> Build custom
  3. Is there a mature AppExchange package meeting 80%+ of requirements? —> Buy
  4. Is TCO favorable over 3-5 years? —> Validates buy decision

Vendor Scorecard — Top Criteria

CriterionWeightRed Flag
Feature completeness15%Meets < 80% of requirements
Performance impact10%Excessive governor limit consumption
Support quality10%No SLA, limited hours
Upgrade path10%Push upgrades with breaking changes history
Exit strategy10%Proprietary data format, no export
Security review5%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-PatternWhy It FailsFix
Multiple record-triggered flows per objectUnpredictable order, shared limitsOne master flow + subflows
DML inside flow loopsGovernor limit violationCollect, then bulk DML after loop
Apex for simple field updatesOver-engineeringBefore-save Flow
Hardcoded IDs in Flow/ApexBreaks across environmentsCustom Metadata Types
AppExchange without evaluationVendor lock-in, unknown limit impactUse vendor scorecard
No error handling in FlowsCryptic user errors, data inconsistencyFault paths on every Flow

Sources