Skip to content

Best Practices & Anti-Patterns

These are not academic ideals. They are patterns that consistently produce maintainable, scalable, and cost-effective solutions. Recognizing anti-patterns matters just as much: common mistakes that seem reasonable but create architectural debt.

Platform-First Thinking

Always start with what the platform provides before introducing external systems. This is the single most important principle for a Salesforce CTA.

The Platform-First Decision Ladder

Escalating decision path from declarative configuration through custom Apex, async processing, AppExchange packages, and finally off-platform solutions when each prior tier cannot satisfy the requirement.
Figure 1. The platform-first decision ladder forces each requirement through five tiers before reaching an off-platform recommendation. CTA judges look for this escalation logic. Skipping directly to custom code or external systems without exhausting declarative and async options signals weak platform knowledge.

Why platform-first matters on the exam

CTA judges evaluate whether you use 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 also knows when the platform is the wrong 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 organizes guidance into three pillars. CTA solutions should align with all three.

The Three Pillars

Figure 2. The Salesforce Well-Architected Framework organizes solution quality into three pillars: Trusted (secure, compliant, reliable), Easy (intentional, automated, engaging), and Adaptable (resilient, composable). CTA solutions are evaluated against all three pillars simultaneously.

Trusted

Principle: The solution must be secure, compliant, and reliable. Secure solutions control access and protect data. Compliant solutions follow legal and ethical guidelines. Reliable solutions operate efficiently and dependably.

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 intentional, automated, and engaging. Intentional solutions deliver business value right away and over time. Automated solutions let the business get work done faster and at scale. Engaging solutions drive adoption.

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 be resilient and composable. Resilient solutions handle change well. Composable solutions adjust quickly and with greater stability.

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

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 silentlyFull 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 stated explicitly. 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

Judges specifically ask: “What alternatives did you consider?” and “What trade-offs did you accept?” A mental model for documenting decisions helps answer these questions under pressure. Practice articulating trade-offs for every major decision in mock boards.

Scalability Checklist

Before finalizing any system architecture, run through 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

Personal study notes for the Salesforce CTA exam. Content compiled from VJ's study notes, official Salesforce documentation, community sources, and online publicly available content, then organized and presented with AI assistance. Not affiliated with Salesforce. © 2025–2026 VJ Srivastava.