The Short Answer
Good Salesforce architecture isn't measured by the number of components built, but by an organization's ability to add new business lines, products, or markets without breaking what's already working. The most common problem we encounter isn't poor technology choices, but a lack of documented decision-making layers: who owns each object, why Flow was chosen over Apex, and why there are five separate integrations instead of a single Middleware layer.
This article breaks down architecture into six layers that must be planned together, not in isolation: Data Model and Objects, Sharing and Permissions, Automation, Integrations, Org Strategy, and DevOps with Scalability. Extended background on handling integration errors is available in Salesforce Integration Error Handling.
Data Model and Objects: The Foundation Everything Rests Upon
A common mistake in many organizations: creating a new Custom Object for every business requirement, without checking if an existing object could utilize an additional field or a Record Type. The result after two to three years is an Org with 80-120 custom objects, some with duplicated meanings, and no documentation explaining why each was created.
The guiding principle is to ask before creating any object: who is the business owner, what is the source of truth (Salesforce or an external system), and what happens when a record is deleted or duplicated. Companies managing a complex product catalog, for example, often create a separate Object for each category instead of using Record Types on Product2 – leading to unnecessary maintenance overhead with every upgrade.
A useful table for checking data model maturity:
| Component | Assessment Question | Warning Sign |
|---|---|---|
| Custom Objects | Is there a similar existing Object that can be extended? | Two objects with essentially the same fields |
| Fields | Is the field used for more than one process? | More than 800 fields on a central object |
| Relationships | Was Master-Detail or Lookup intentionally chosen? | Master-Detail chosen "by default" |
| External ID | Does every synchronized object have a unique key? | Synchronization only by name or date |
Sharing and Permissions: The Layer That Breaks Silently
A lax permissions model isn't immediately apparent – it surfaces when someone sees data they shouldn't, or when a management report shows fewer rows than expected because a Sharing Rule is blocking access. The choice between Role Hierarchy, Organization-Wide Defaults, Sharing Rules, and Permission Sets should derive from the actual organizational structure, not the formal hierarchical structure in the organizational chart.
A common anti-pattern: granting "View All" or "Modify All" at the profile level to "solve" a permissions issue under time pressure, without later narrowing access. This works in the short term and creates broad data exposure in the long term – especially in regulated industries like finance or healthcare. Permission Set Groups allow building modular permissions that can be added and removed without touching the base profile, which is the safer way to handle a growing organization.
Criteria-Based Sharing Rules on objects with millions of records require load testing before Production – there are cases where a seemingly innocuous Sharing Rule causes a recalculation that takes hours and halts overnight processes.
Automation: Flow vs. Apex
The "Flow or Apex" question is not one of preference but of complexity, volume, and lifespan. Flow is more readable for an operational team, built and maintained quickly, and suitable for evolving business logic. Apex is required for bulk processing of thousands of records in a single transaction, when precise control over execution order relative to other Triggers is needed, or when automated testing (Test Coverage) is required for regulation or formal Change Management.
A common anti-pattern in growing organizations: chains of Flows that call each other (Flow triggering Flow triggering Flow), without a central map showing the execution order. When something breaks, no one knows which Flow ran first. A real-world example: an organization with 14 active Flows on Opportunity, three of them with the same status update logic, written at different times by different people without checking what already existed.
A practical rule of thumb: if there are more than 5-6 branching conditions in a single piece of business logic, or if an external call is required within a loop, Apex is preferable. Beyond that, Flow is better because it's accessible for maintenance even if the original developer has left the company.
Integrations: From Point-to-Point to a Managed Layer
An organization starting with two external connections (ERP and a payment system, for example) typically builds them directly, point-to-point, which is reasonable at that stage. The problem begins when a third, fourth, and fifth connection are added – each with its own retry logic, error handling, and field mapping, without a shared standard. At this point, any change in a source system breaks one or more connections without anyone knowing in advance.
The transition to a Middleware layer (MuleSoft, or a custom Integration Layer) doesn't have to be a huge project – you can start with the most fragile or most expensive-to-maintain connection and transition gradually. Principles to adopt in any new integration: Idempotency (duplicate calls don't create duplicate records), External ID for reliable identification, and a log that allows precisely reproducing what happened in each call. Further details on integration patterns appear in Connecting Salesforce to an ERP and Salesforce Integration Patterns.
Org Strategy: Single Org, Multi-Org, or Business Unit Segmentation
This is one of the most expensive decisions to change in retrospect. A Single Org with Business Unit Segmentation (using Record Types, Sharing, and Permission Sets for logical separation) suits most organizations because it maintains a single source of truth and unified reporting metrics. Multi-Org is appropriate when business units require fundamentally conflicting authorization models, when a merger or acquisition brings an existing Org, or when actual permissions load impacts performance.
The transition between models after the organization is already built is a heavy project – data merging, re-mapping permissions, and sometimes loss of history. Full details of the decision-making considerations are available in Salesforce Multi Org.
DevOps and Scalability: How to Maintain Agility
An organization that develops directly in Production, without a proper Sandbox and without CI/CD tools (like Copado, Gearset, or SFDX), quickly reaches a state where every change is risky. A healthy DevOps process includes at least a development Sandbox, a testing Sandbox, version control for Metadata, and an automated Deployment process with regression tests.
Table of key architectural decisions and their long-term implications:
| Decision | Immediate Benefit | Implication in 2-3 Years |
|---|---|---|
| Custom Object for every requirement | Quick solution for a specific need | Org with dozens of duplicated objects, difficult to maintain |
| "Temporary" View All permissions | Solves an issue in minutes | Broad data exposure that is hard to find and close |
| Flow calling Flow | Rapid development without code | Chains that are hard to trace and test |
| Additional Point-to-Point integration | Quick connection between two systems | A network of connections where every change breaks something else |
| Direct development in Production | Saves setup time | High risk for every change, difficulty in recovery |
| Single Org without logical separation | Unified reporting from day one | Difficulty adding a business unit with different needs |
Example Organizational Scenario
A distribution company with three business units operated on a single Org for four years, with each unit adding its own objects, Flows, and integrations as needed. When management decided to add a fourth unit, it became clear there was no single document explaining who owned each object, and three different integrations synchronized customers to the finance system with conflicting logic.
The architectural team performed a full mapping: they identified 23 objects with no clear owner, six overlapping Flow chains, and two integrations that created duplicate records due to a lack of consistent External ID. The solution wasn't a rebuild, but gradual documentation, consolidating Sharing logic under Permission Set Groups, and migrating critical integrations to a single Middleware layer. Within two quarters, the time to add a new business unit decreased from several months to about six weeks.
Common Anti-Patterns in Growing Organizations
- Custom Object for every request - Creating a new object without checking if a similar one already exists
- "Temporary" broad permissions - Granted under pressure and never revoked
- Flow-in-Flow without mapping - Automation chains without a central execution diagram
- Point-to-Point without Governance - Every new connection built separately without a shared standard
- Development in Production - Direct changes without Sandbox, testing, or Version Control
- Lack of External ID - Synchronization by name or email leading to duplicate records
Architectural Maturity Checklist
- ☐ Every custom object has a documented business owner
- ☐ The Sharing model has been tested under realistic data load
- ☐ A central map of all automation chains exists
- ☐ Every integration has an External ID, retry mechanism, and error log
- ☐ A structured Sandbox-to-Production process with regression tests is in place
- ☐ A deliberate decision between Single Org and Multi-Org has been made and documented
- ☐ Governor Limits are checked against a three-year growth projection
When Salesforce architecture requires professional guidance beyond an independent framework, this falls within the scope of CRM Architecture Services.
Professional Resources
- Salesforce Integration Patterns — https://architect.salesforce.com/docs/architect/fundamentals/guide/integration-patterns.html
- Salesforce Data Integration Decision Guide — https://architect.salesforce.com/docs/architect/decision-guides/guide/data-integration.html
- HPI Pro – CRM Architecture — https://hpi.pro/crm-architecture
- HPI Pro – Integrations and Data — https://hpi.pro/integrations-data
