Integration Decision Guides
CTA scenarios require rapid, defensible decisions about integration architecture. This page provides decision trees as Mermaid flowcharts for the most common integration choices. Use these to practice your decision-making process and to present clear reasoning at the review board.
How to use these guides
Each decision tree codifies the “first principles” reasoning. At the board, you will not have these charts — but having internalized the logic, you can walk judges through your reasoning step by step. Practice explaining WHY at each decision node, not just the final answer.
1. Synchronous vs Asynchronous
The foundational integration timing decision. Gets this wrong and the entire architecture suffers.
flowchart TD
A[Integration Need] --> B{Does the calling process<br/>need the response to continue?}
B -->|Yes| C{Can the external system<br/>respond within 10 seconds?}
C -->|Yes| D{Is the call volume<br/>manageable within<br/>API limits?}
D -->|Yes| E["Synchronous (Request-Reply)"]
D -->|No| F["Asynchronous with<br/>callback or polling"]
C -->|No| G{Can you redesign the UX<br/>to not require<br/>immediate response?}
G -->|Yes| H["Asynchronous<br/>(Fire-and-Forget + notification)"]
G -->|No| I["Data Virtualization<br/>or cache + background refresh"]
B -->|No| J{Is ordering important?}
J -->|Yes| K["Asynchronous with<br/>ordered queue (FIFO)"]
J -->|No| L["Asynchronous<br/>(Fire-and-Forget)"]
style E fill:#e8f5e9
style F fill:#fff3e0
style H fill:#fff3e0
style I fill:#e3f2fd
style K fill:#fff3e0
style L fill:#fff3e0
| Decision Factor | Synchronous | Asynchronous |
|---|---|---|
| User experience | Immediate feedback | Eventual notification |
| Coupling | Tight | Loose |
| Error handling | Direct | Complex (DLQ, monitoring) |
| Scalability | Limited by slowest system | Scales independently |
| Governor limits | 10s callout, 120s total | No callout timeout pressure |
| Data consistency | Immediate | Eventual |
2. Middleware vs Point-to-Point
When to invest in middleware versus keeping it simple with direct integration.
flowchart TD
A[New Integration] --> B{How many systems<br/>in the integration landscape?}
B -->|2 systems| C{Will the landscape<br/>grow in 12 months?}
C -->|No| D{Complex transformations<br/>needed?}
D -->|No| E[Point-to-Point]
D -->|Yes| F{Team has middleware<br/>expertise?}
F -->|No| E
F -->|Yes| G[Middleware]
C -->|Yes| G
B -->|3-5 systems| H{Centralized monitoring<br/>and governance needed?}
H -->|No| I{Shared data<br/>transformations?}
I -->|No| E
I -->|Yes| G
H -->|Yes| G
B -->|6+ systems| G
style E fill:#e8f5e9
style G fill:#fff3e0
Cost Comparison
| Factor | Point-to-Point | Middleware (MuleSoft) |
|---|---|---|
| Initial cost | Low | High (licensing + setup) |
| Per-integration cost | Linear growth | Decreasing (reusable assets) |
| Maintenance at 3 integrations | Low | Higher than needed |
| Maintenance at 10 integrations | High (spaghetti) | Lower (centralized) |
| Monitoring | Per-integration | Centralized |
| Break-even point | N/A | Typically 5-8 integrations |
3. REST vs SOAP
Protocol selection based on consumer needs and system constraints.
flowchart TD
A[API Protocol Decision] --> B{Consumer system<br/>constraint?}
B -->|Requires WSDL/SOAP| C[SOAP API]
B -->|No constraint| D{Need strong typing<br/>and contract-first?}
D -->|Yes, critical| C
D -->|No| E{Payload size<br/>concern?}
E -->|Yes - minimize payload| F{Query flexibility<br/>needed?}
F -->|Yes| G[GraphQL API]
F -->|No| H[REST API]
E -->|No| I{Need transaction<br/>support across<br/>multiple operations?}
I -->|Yes| J[Composite API<br/>REST-based]
I -->|No| H
style C fill:#fff3e0
style G fill:#e3f2fd
style H fill:#e8f5e9
style J fill:#e8f5e9
| Factor | REST | SOAP | GraphQL |
|---|---|---|---|
| Payload format | JSON (lightweight) | XML (verbose) | JSON (precise) |
| Contract | OpenAPI/Swagger (optional) | WSDL (strict) | Schema (strict) |
| Tooling | Universal | Mature but declining | Growing |
| Performance | Fast | Slower (XML parsing) | Optimized payloads |
| Mutations | Full CRUD | Full CRUD | Read-only (Salesforce) |
| Learning curve | Low | Moderate | Moderate |
| Salesforce fit | Primary recommendation | Legacy or metadata | Mobile-optimized queries |
4. ETL vs ELT vs Data Virtualization
How to move or access data across system boundaries.
flowchart TD
A[Data Integration Need] --> B{Does data need to<br/>exist in Salesforce?}
B -->|No - just display it| C{External system<br/>highly available?}
C -->|Yes| D[Data Virtualization<br/>Salesforce Connect]
C -->|No| E[Replicate with<br/>ETL or ELT]
B -->|Yes - for processing| F{Where should<br/>transformation happen?}
F -->|In middleware/staging| G[ETL<br/>Extract-Transform-Load]
F -->|In Salesforce| H[ELT<br/>Extract-Load-Transform]
F -->|Minimal transformation| I{Volume?}
I -->|High: 10K+| J[Bulk API 2.0<br/>with ETL tool]
I -->|Low: < 10K| K[REST/Composite API<br/>direct load]
style D fill:#e3f2fd
style G fill:#e8f5e9
style H fill:#fff3e0
style J fill:#e8f5e9
style K fill:#e8f5e9
| Approach | Transform Location | Best For | Salesforce Consideration |
|---|---|---|---|
| ETL | Middleware/staging area | Complex transformations, data cleansing | Preferred — avoids Apex governor limits |
| ELT | Target system (Salesforce) | Simple transforms, Salesforce-native logic | Limited by Apex processing limits |
| Virtualization | None (real-time query) | Display-only, highly volatile data | External Objects limitations apply |
5. Which Salesforce API to Use
The comprehensive API selection guide for any data operation.
flowchart TD
A[API Selection] --> B{What are you<br/>doing?}
B -->|CRUD operations| C{Volume per<br/>transaction?}
C -->|1-200 records| D{Multiple related<br/>operations?}
D -->|Yes| E[Composite API]
D -->|No| F[REST API]
C -->|200-2000| G{Related records?}
G -->|Yes| E
G -->|No| H{Need real-time?}
H -->|Yes| I[sObject Collections]
H -->|No| J[Bulk API 2.0]
C -->|2000+| J
B -->|React to changes| K{What kind<br/>of changes?}
K -->|Record data changes| L[Change Data Capture]
K -->|Custom business events| M[Platform Events]
K -->|External subscriber| N[Pub/Sub API]
B -->|Deploy metadata| O[Metadata API]
B -->|Developer tooling| P[Tooling API]
B -->|Flexible queries| Q[GraphQL API]
style E fill:#e8f5e9
style F fill:#e8f5e9
style I fill:#e8f5e9
style J fill:#fff3e0
style L fill:#e3f2fd
style M fill:#e3f2fd
style N fill:#e3f2fd
style O fill:#f3e5f5
style P fill:#f3e5f5
style Q fill:#e3f2fd
6. Real-Time vs Near-Real-Time vs Batch
Timing selection based on business requirements and technical constraints.
flowchart TD
A[Data Synchronization Need] --> B{How fresh must<br/>the data be?}
B -->|"Seconds (user is waiting)"| C{User blocked<br/>without response?}
C -->|Yes| D[Real-Time<br/>Synchronous]
C -->|No| E[Near-Real-Time<br/>Event-Driven]
B -->|"Minutes (operational)"| F{Volume per<br/>minute?}
F -->|Low: < 100| E
F -->|High: 100+| G{Can batch<br/>every 5-15 min?}
G -->|Yes| H[Micro-Batch<br/>Scheduled every N minutes]
G -->|No| E
B -->|"Hours (reporting/analytics)"| I{Volume?}
I -->|Any| J[Batch<br/>Scheduled nightly/hourly]
B -->|"Does not matter<br/>(on-demand)"| K[Data Virtualization<br/>Query on access]
style D fill:#ffcdd2
style E fill:#fff3e0
style H fill:#fff3e0
style J fill:#e8f5e9
style K fill:#e3f2fd
| Timing | Latency | Typical Technology | Cost | Complexity |
|---|---|---|---|---|
| Real-time sync | < 2s | REST callout, External Services | High | Medium |
| Near-real-time | 2s - 5min | Platform Events, CDC, Pub/Sub | Medium | Medium-High |
| Micro-batch | 5-15 min | Scheduled Apex, middleware schedule | Medium | Medium |
| Batch | 15min - 24h | Bulk API + ETL/middleware | Low | Low-Medium |
| On-demand | Variable | Salesforce Connect | Low | Low |
7. Error Handling Strategy Selection
Choosing the right error handling approach based on integration characteristics.
flowchart TD
A[Integration Error<br/>Strategy Selection] --> B{Integration<br/>pattern?}
B -->|Synchronous| C{User-facing?}
C -->|Yes| D["Graceful Degradation<br/>+ user notification<br/>+ circuit breaker"]
C -->|No| E["Retry with backoff<br/>+ circuit breaker<br/>+ DLQ"]
B -->|Asynchronous| F{Event-driven?}
F -->|Yes| G["At-least-once delivery<br/>+ idempotency keys<br/>+ replay from checkpoint"]
F -->|No| H["Retry with backoff<br/>+ DLQ<br/>+ monitoring alerts"]
B -->|Batch| I["Partial failure handling<br/>+ error records file<br/>+ reconciliation job"]
D --> J[Monitor: Response time,<br/>circuit breaker state]
E --> J
G --> K[Monitor: Subscriber lag,<br/>DLQ depth, event replay gaps]
H --> K
I --> L[Monitor: Success/fail ratios,<br/>error record counts]
style D fill:#e8f5e9
style E fill:#fff3e0
style G fill:#e3f2fd
style H fill:#fff3e0
style I fill:#f3e5f5
8. Platform Events vs Change Data Capture
A focused decision guide for the most commonly confused event technologies.
flowchart TD
A[Need event-driven<br/>integration] --> B{What triggers<br/>the event?}
B -->|Any record data change| C{Need field-level<br/>change tracking?}
C -->|Yes| D[Change Data Capture]
C -->|No| E{Custom semantics<br/>beyond CRUD?}
E -->|Yes| F[Platform Events]
E -->|No| D
B -->|Custom business event<br/>not tied to a record| F
B -->|External system<br/>publishes event| G{Into Salesforce?}
G -->|Yes| F
G -->|No| H[External event broker<br/>Kafka/RabbitMQ/SQS]
D --> I{Subscriber?}
F --> I
I -->|External, high throughput| J[Pub/Sub API]
I -->|External, moderate| K[CometD / REST]
I -->|Salesforce internal| L[Apex Trigger / Flow]
style D fill:#e3f2fd
style F fill:#e8f5e9
style H fill:#f3e5f5
style J fill:#fff3e0
style K fill:#fff3e0
style L fill:#e8f5e9
9. Authentication Flow Selection
Choosing the right OAuth flow for each integration type.
flowchart TD
A[Integration Authentication] --> B{Who initiates<br/>the connection?}
B -->|External system calls SF| C{Involves a<br/>user context?}
C -->|Yes, user-facing app| D[Web Server Flow<br/>Authorization Code]
C -->|No, server-to-server| E{Need user context<br/>for data access?}
E -->|Yes| F[JWT Bearer Flow<br/>with service user]
E -->|No| G[Client Credentials Flow<br/>no user context]
B -->|SF calls external system| H{Named Credentials<br/>available?}
H -->|Yes| I[Named Credentials<br/>with appropriate auth]
H -->|No| J[Custom Auth in Apex<br/>NOT recommended]
style D fill:#e8f5e9
style F fill:#e8f5e9
style G fill:#e3f2fd
style I fill:#e8f5e9
style J fill:#ffcdd2
Quick Reference: Decision Summary Table
| Decision | Default Answer | Override When |
|---|---|---|
| Sync vs Async | Async (safer, more scalable) | User is blocked without immediate response |
| Middleware vs P2P | P2P for < 4 systems | 4+ systems, complex transforms, governance needs |
| REST vs SOAP | REST | Legacy WSDL requirement or Partner WSDL needed |
| ETL vs ELT | ETL (transform outside SF) | Transformations are trivial or SF-native logic required |
| Which API | REST API | Volume > 2K (Bulk), events (Pub/Sub/CDC), multi-step (Composite) |
| Timing | Batch (cheapest, simplest) | Business requires fresher data |
| Error handling | Retry + DLQ + monitoring | Add circuit breaker for systemic failures |
| Auth flow | JWT Bearer for S2S, Web Server for users | No user context needed (Client Credentials) |
| Events | CDC for data changes, PE for business events | Custom semantics or external publishing needed |
Board presentation technique
When presenting decision rationale, use a simple three-part formula: “I chose [option] over [alternative] because [specific scenario reason]. The trade-off is [downside], which I mitigate by [mitigation].” This demonstrates you considered alternatives and understand consequences.
Related Content
- Solution Architecture Decision Guides — integration decisions are intertwined with build-vs-buy and declarative-vs-code choices
- External Data — Salesforce Connect and External Objects are an integration pattern that requires data architecture decisions
- System Architecture Decision Guides — org strategy and platform decisions upstream of integration choices
Sources
- Salesforce Integration Patterns and Practices
- Salesforce Architect Decision Guides
- Trailhead: Integration Architecture
- MuleSoft: Integration Best Practices
- CTA coaching community decision frameworks