Skip to content

Best Practices & Anti-Patterns

System architecture best practices for the CTA exam are not academic ideals — they are patterns that consistently produce maintainable, scalable, and cost-effective solutions. Equally important is recognizing anti-patterns: common mistakes that seem reasonable but lead to architectural debt.

Platform-First Thinking

The most important principle for a Salesforce CTA: always start with what the platform provides before introducing external systems.

The Platform-First Decision Ladder

flowchart TD
    A[Requirement] --> B{Can it be solved<br/>with configuration?}
    B -->|Yes| C["Declarative Solution<br/>(Flows, Validation Rules,<br/>Formulas, Page Layouts)"]
    B -->|No| D{Can it be solved<br/>with standard Apex/LWC?}
    D -->|Yes| E["Custom Code<br/>(Apex, LWC, SOQL)"]
    D -->|No| F{Can async processing<br/>handle the constraint?}
    F -->|Yes| G["Async Apex<br/>(Batch, Queueable, Future)"]
    F -->|No| H{Can AppExchange<br/>solve it?}
    H -->|Yes| I["AppExchange Package<br/>(Evaluate carefully)"]
    H -->|No| J["Off-Platform Solution<br/>(Heroku, MuleSoft, Custom)"]

    style C fill:#2d6a4f,color:#fff
    style E fill:#457b9d,color:#fff
    style G fill:#457b9d,color:#fff
    style I fill:#e9c46a,color:#000
    style J fill:#9d0208,color:#fff

Why platform-first matters on the exam

CTA judges evaluate whether you leverage the platform appropriately. Going off-platform without justification signals a lack of platform knowledge. Going off-platform with clear justification (governor limits, processing requirements, user experience needs) signals mature architectural thinking.

Platform-First Does NOT Mean Platform-Only

Platform-first is a decision-making process, not a constraint. A good CTA knows when the platform is not the right tool:

ScenarioPlatform-First Response
Need to process 100M records nightlyBatch Apex or external ETL — evaluate both
Need a consumer-facing mobile app with ARMobile SDK or fully custom app — Salesforce Mobile cannot do AR
Need real-time data streaming from IoT sensorsPlatform Events have limits; consider Kafka or Kinesis
Need complex document rendering with dynamic chartsExternal document generation service — Salesforce PDF generation is limited

Well-Architected Framework Alignment

Salesforce’s Well-Architected Framework provides structured guidance across four pillars. CTA solutions should align with all four.

The Four Pillars

mindmap
    root((Well-Architected<br/>Framework))
        Trusted
            Security
            Compliance
            Reliability
            Performance
        Easy
            User Experience
            Accessibility
            Simplicity
            Self-Service
        Adaptable
            Scalability
            Extensibility
            Maintainability
            Evolution
        Connected
            Integration
            Data Flow
            API Strategy
            Ecosystem

Trusted

Principle: The solution must be secure, reliable, and compliant.

PracticeWhat It Means
Defense in depthMultiple security layers (object, field, record, network)
Least privilegeUsers get minimum access needed
Data classificationKnow what data is sensitive and protect it accordingly
MonitoringProactive monitoring, not reactive firefighting
Compliance by designBuild compliance into the architecture, not bolt it on

Easy

Principle: The solution must be intuitive and reduce friction.

PracticeWhat It Means
User-centered designStart with user workflows, not data models
Progressive disclosureShow users what they need when they need it
Minimize clicksEvery click is friction; reduce unnecessary steps
Consistent experienceSame patterns across the application
Self-serviceUsers can find answers without opening support tickets

Adaptable

Principle: The solution must evolve without major rework.

PracticeWhat It Means
Modular designLoosely coupled components that can change independently
Configuration over codePrefer declarative when possible for easier change
Extensibility pointsDesign for future requirements without over-engineering
Technical debt awarenessTrack and plan for refactoring
Upgrade-safeCustom code and config that survive Salesforce releases

Connected

Principle: The solution must integrate effectively with the broader ecosystem.

PracticeWhat It Means
API-firstDesign integrations around well-defined APIs
Event-drivenUse events for loose coupling between systems
Single source of truthEach data element has one authoritative system
Idempotent operationsIntegration operations can be safely retried
Error handlingEvery integration point has error handling and monitoring

System Architecture Best Practices

Design Principles

PrincipleApplication
Single source of truthEvery data element is owned by exactly one system
Separation of concernsUI, business logic, data access, and integration are separate layers
Fail gracefullySystem continues to function (degraded) when a component fails
Design for bulkEvery piece of code must handle 200+ records per transaction
Minimize technical debtDo not build temporary solutions that become permanent
Document decisionsRecord why you chose X over Y (ADRs)
Test at every levelUnit, integration, UAT, regression, performance
Monitor proactivelyKnow about problems before users report them

Data Architecture Best Practices

PracticeDetail
Normalize the data modelAvoid redundant data unless denormalization is justified by performance
Plan for LDV from day oneIf a table might exceed 1M records, design for it now
Use indexed fields in queriesSOQL queries on non-indexed fields perform poorly at scale
Avoid SOQL in loopsBulkify all queries; query once, iterate on results
Use selective queriesWHERE clauses that filter out >90% of records
Archive old dataBig Objects, external storage, or data warehouses for historical data

Integration Best Practices

PracticeDetail
Idempotent operationsEnsure retrying an operation produces the same result
Circuit breaker patternStop calling a failing service; retry after backoff
Error queue and replayCapture failed messages for retry and investigation
Rate limiting awarenessRespect Salesforce API limits and external system rate limits
Async by defaultUse async integration unless real-time is a hard requirement
Contract-first APIsDefine the API contract before building the implementation

Security Best Practices

PracticeDetail
Least privilegeGrant minimum permissions needed for each user
Never hard-code credentialsUse Named Credentials for callout authentication
Encrypt sensitive dataUse Shield Platform Encryption for PII and regulated data
Audit accessEnable Event Monitoring for login and data access forensics
SSO everywhereUse SSO (SAML/OIDC) instead of Salesforce username/password
Regular reviewsPeriodic review of user access, sharing rules, and permissions

Anti-Patterns

Architecture Anti-Patterns

Anti-PatternProblemCorrect Approach
Everything customBuilding custom what the platform provides nativelyEvaluate standard features first
One giant orgCramming unrelated businesses into one orgEvaluate multi-org when business units share nothing
Premature multi-orgSplitting without justificationDefault to single-org; document multi-org rationale
Integration spaghettiPoint-to-point integrations without middlewareHub-and-spoke or API-led connectivity pattern
Monolithic ApexOne massive Apex class doing everythingSeparation of concerns (trigger handler, service, selector)
Click-to-codeStarting with code before evaluating declarativePlatform-first decision ladder
Gold platingOver-engineering for hypothetical future needsDesign for current requirements with clear extension points

Data Anti-Patterns

Anti-PatternProblemCorrect Approach
SOQL in loopsQueries inside for-loops hit governor limitsQuery once, use maps for lookups
Wide objectsObjects with 300+ fieldsSplit into related objects
Recursive triggersTriggers firing in infinite loopsStatic variable flags, trigger framework
Hard-coded IDsRecord type IDs, user IDs in codeUse Custom Metadata or Schema class
No data archivalTables growing without boundArchive strategy with Big Objects or external
Over-denormalizationCopying fields across objects to avoid queriesAccept the query cost; use formula fields

Integration Anti-Patterns

Anti-PatternProblemCorrect Approach
Synchronous callouts for batch dataBlocking user transactions on external callsAsync callouts, platform events, or batch processing
No error handlingIntegrations that fail silentlyComprehensive error handling with monitoring
Tight couplingExternal system changes break SalesforceMiddleware layer or adapter pattern
Polling for changesPeriodically querying for updatesCDC, Platform Events, or webhooks
Over-reliance on triggers for integrationComplex integration logic in trigger handlersDedicated integration layer

Licensing Anti-Patterns

Anti-PatternProblemCorrect Approach
Full CRM for everyoneMassive license overspendAudit and right-size; Platform licenses for non-CRM users
Community Plus for simple portalsPaying for sharing model that is not neededCustomer Community if no role hierarchy required
Ignoring login-based pricingOverpaying for infrequent external usersModel usage; switch to login-based below break-even
Edition upgrade for one featurePaying Premium price for one capabilityEvaluate add-on or PSL instead

Architectural Trade-Off Documentation

Every significant architectural decision should be documented with trade-offs explicitly stated. Use this template:

Decision Record Template

Decision: [What was decided]
Context: [Why this decision was needed]
Options Considered:
1. [Option A] — [Pros] / [Cons]
2. [Option B] — [Pros] / [Cons]
3. [Option C] — [Pros] / [Cons]
Decision: [Which option was chosen]
Rationale: [Why this option was chosen over others]
Trade-offs Accepted: [What was given up]
Reversibility: [How hard is it to change this decision later]

CTA exam application

On the CTA exam, judges specifically ask: “What alternatives did you consider?” and “What trade-offs did you accept?” Having a mental model for documenting decisions helps you answer these questions fluently. Practice articulating trade-offs for every major decision in your mock boards.

Scalability Checklist

Before finalizing a system architecture, validate against this checklist:

  • Data model handles 10x current volume without redesign
  • Integrations have error handling, retry logic, and monitoring
  • Governor limits are not exceeded under peak load
  • Reporting strategy scales with data volume growth
  • Mobile strategy handles poor connectivity gracefully
  • License model accommodates projected user growth
  • Security model does not require per-user manual configuration
  • Deployment strategy supports team growth (more developers)
  • Archival strategy prevents unbounded table growth
  • Monitoring enables proactive issue detection

Sources