Architecture

Salesforce Architecture Decision Framework — A Practical Guide

Published 9 June 2026 · 15 min read · Advanced

Architecture decisions in Salesforce are often made under time pressure, with incomplete information, by people who may not be in the same role when the consequences manifest. A systematic approach to decision-making — one that is explicit about context, alternatives and trade-offs — produces better outcomes than intuition alone.

The decision-making principles

Reversibility matters more than optimality. In a rapidly evolving platform like Salesforce, the best architecture is often not the theoretically optimal one but the one that is easiest to change when requirements change. Favour flexible patterns over clever ones.

Constraints are inputs, not obstacles. Governor limits, object model constraints and platform behaviours are information about how Salesforce is designed to work. When a design fights the platform, the design is probably wrong.

Document the decision, not just the outcome. Future team members will see what was built. They will not see why unless you document it. Architecture Decision Records (ADRs) create institutional memory.

The build vs configure framework

For every new requirement, ask three questions in order.

First: can this be met by a standard Salesforce feature without any customisation? Standard objects, standard fields, standard automation, standard reports. This is always the first choice.

Second: can this be met declaratively with configuration? Custom objects, custom fields, Flow, validation rules, formula fields. Declarative solutions are maintainable by a wider team and do not require Apex test coverage.

Third: does this require Apex or other programmatic solutions? Choose code only when declarative tools genuinely cannot meet the requirement, or when the declarative solution is so complex that it would be harder to maintain than equivalent code.

Data model design principles

The data model is the hardest thing to change in a Salesforce org. Every other layer — automation, UI, integration — depends on the data model. Errors in the data model compound over time as every feature built on a flawed foundation inherits the flaw.

Object design questions

Before creating a new custom object, ask: does this data belong to an existing object as a field? Could this be a child of an existing object? Is this a new entity in the domain, or a specialisation of an existing one?

Relationship design questions

Before creating a new relationship: what is the cardinality? (One-to-one, one-to-many, many-to-many?) What is the cascade behaviour? (Should deleting the parent delete the children?) Is the child record meaningful without the parent? (Master-detail if not; lookup if yes.)

The External ID strategy

Every custom object that will participate in data loading or integration should have an External ID field from day one. Retrofitting External IDs onto objects with millions of existing records is painful. Adding them at design time costs nothing.

Summer ‘26 architectural considerations

Agentforce changes the automation calculus. For processes that involve natural language understanding, ambiguous inputs or adaptive decision-making, Agentforce agents are now a genuine architectural option. Evaluate Agentforce alongside Flow and Apex for new process automation requirements.

Flow Orchestration is now viable at scale. The removal of usage-based limits makes Flow Orchestration a practical choice for complex multi-step processes in Enterprise and above editions. Re-evaluate any decision previously made to use Queueable Apex chains for process orchestration.

Security defaults changed in API v67.0. Any architecture that relies on Apex’s old without-sharing default behaviour must be reviewed before upgrading to v67.0. Build explicit sharing declarations into your coding standards.

The governance model

Good Salesforce architecture is maintained, not just designed. Establish:

A naming convention standard that is documented and enforced. Inconsistent naming is the first symptom of governance breakdown.

An Architecture Review Board that reviews significant changes before development begins — not after deployment.

A technical debt register that makes accumulated shortcuts visible and manageable.

Regular architecture health checks — at least annually — that assess whether the current architecture still serves the organisation’s needs.

Test your knowledge — Architecture

10 questions · Basic to Advanced

0 / 10 correct

Frequently asked questions

What is the 'clicks before code' principle in Salesforce?

Clicks before code means preferring declarative tools — Flow, validation rules, formula fields, OWD — over Apex code when they can fully meet the requirement. Declarative solutions are modifiable by admins without a deployment cycle and do not require Apex test coverage.

When should I use a master-detail relationship instead of a lookup?

Use master-detail when the child record is meaningless without the parent (the parent field is required and cannot be changed), you need roll-up summary fields on the parent, and cascade deletion of children on parent delete is the correct business behaviour. If any of these conditions do not apply, a lookup is more appropriate.

What is the N+1 query problem in Salesforce?

The N+1 problem is running a SOQL query inside a loop, executing one query per record instead of a single query retrieving all related records at once. It is the most common cause of governor limit violations in Apex. The fix is to move the query outside the loop, store results in a Map, and reference the Map inside the loop.

What is an Architecture Decision Record (ADR) and why should Salesforce teams use them?

An ADR is a short document that captures the context, the options considered, and the reasoning behind a specific architecture decision. Future team members can see not just what was built but why, preventing decisions from being inadvertently reversed without understanding the original trade-offs.

What is object model bloat in Salesforce?

Object model bloat is the accumulation of excessive custom objects, fields, and relationships over time, making the data model harder to query, report on, and understand. It is prevented through architecture governance — requiring review before new objects and fields are created.

How did Summer '26 change the Salesforce architecture decision calculus?

Three changes affect key decisions in Summer '26: Agentforce agents are now a genuine option alongside Flow and Apex for process automation; Flow Orchestration is included without usage limits in Enterprise and above editions; and the API v67.0 security default change means any architecture relying on the old without-sharing Apex default must be reviewed before upgrading.