Integration Patterns
Salesforce defines six canonical integration patterns. Every CTA scenario requires selecting and justifying the right pattern for each integration touchpoint. All six are covered here with sequence diagrams, selection criteria, and the trade-offs that matter at the review board.
The Six Patterns at a Glance
Section titled “The Six Patterns at a Glance”| # | Pattern | Direction | Timing | Initiator | Common Tech |
|---|---|---|---|---|---|
| 1 | Remote Process Invocation - Request-Reply | SF to External | Real-time | Salesforce | REST/SOAP callout, Named Credentials |
| 2 | Remote Process Invocation - Fire-and-Forget | SF to External | Near-real-time | Salesforce | Platform Events, Outbound Messages, Async Apex |
| 3 | Batch Data Synchronization | Bidirectional | Batch | Either | Bulk API, ETL tools, MuleSoft batch |
| 4 | Remote Call-In | External to SF | Real-time | External | REST/SOAP API, Composite API |
| 5 | UI Update Based on Data Changes | External to SF | Real-time | External | Streaming API, Platform Events, Pub/Sub API |
| 6 | Data Virtualization | SF to External | Real-time | Salesforce | Salesforce Connect, External Objects |
Pattern 1: Remote Process Invocation - Request-Reply
Section titled “Pattern 1: Remote Process Invocation - Request-Reply”Use Request-Reply when a user action cannot proceed without an external system’s answer: credit checks, address validation, real-time pricing. The calling process blocks until the reply arrives. This pattern only works when latency is acceptable (the external system must respond within governor limits) and the transaction depends on the result before committing.
Sequence Diagram
Section titled “Sequence Diagram”Implementation Options
Section titled “Implementation Options”| Option | Best For | Governor Limit |
|---|---|---|
| Apex Callout (synchronous) | Simple integrations, user-facing | Default 10s timeout per callout, configurable up to 120s; 120s cumulative per transaction |
| Flow HTTP Callout | Declarative, admin-managed | Same governor limits apply |
| External Services | OpenAPI-based services, no code | Auto-generates Apex from spec |
Trade-offs
Section titled “Trade-offs”| Advantage | Disadvantage |
|---|---|
| Immediate feedback to user | Blocks the transaction - poor UX if slow |
| Simple to reason about | Subject to governor limits (default 10s callout timeout, configurable up to 120s) |
| Transactional consistency | External system downtime = Salesforce failure |
| Easy error handling | Cannot handle high-volume scenarios |
Pattern 2: Remote Process Invocation - Fire-and-Forget
Section titled “Pattern 2: Remote Process Invocation - Fire-and-Forget”Use Fire-and-Forget when the business process does not need an immediate answer: order fulfillment handoffs, notification dispatches, audit logging to external systems. Salesforce publishes a message and moves on. The user is never blocked by downstream latency or outages. Prefer this over Request-Reply when volume or latency makes synchronous calls impractical.
Sequence Diagram
Section titled “Sequence Diagram”Implementation Options
Section titled “Implementation Options”| Option | Best For | Delivery Guarantee |
|---|---|---|
| Platform Events | Event-driven architectures | At-least-once (with replay) |
| Outbound Messages | Workflow-triggered SOAP calls | At-least-once (retries for 24h) |
| Queueable Apex with Callout | Complex logic before callout | No built-in retry |
| Change Data Capture | Data change notifications | At-least-once (with replay) |
Trade-offs
Section titled “Trade-offs”| Advantage | Disadvantage |
|---|---|
| Decouples systems | No immediate confirmation of success |
| Salesforce transaction unaffected by external failures | Requires monitoring for failed deliveries |
| Better UX (no waiting) | Eventual consistency - data may lag |
| Handles higher volumes | More complex error handling needed |
Pattern 3: Batch Data Synchronization
Section titled “Pattern 3: Batch Data Synchronization”Use Batch Sync when data staleness of minutes to hours is acceptable and volume exceeds what real-time APIs handle efficiently. This is the workhorse for data warehousing, reporting sync, initial data loads, and cross-system reconciliation. If the business requires data current to the second, this is the wrong pattern. Use event-driven (Pattern 5) or Request-Reply (Pattern 1) instead.
Sequence Diagram
Section titled “Sequence Diagram”Implementation Options
Section titled “Implementation Options”| Option | Volume | Direction |
|---|---|---|
| Bulk API 2.0 | Millions of records | Inbound to SF |
| Data Loader (CLI mode) | Thousands to millions | Bidirectional |
| MuleSoft Batch Module | Enterprise-scale | Bidirectional |
| Informatica Cloud | Enterprise-scale | Bidirectional |
| Scheduled Apex + SOQL | Moderate volumes | SF-initiated |
Volume Thresholds
Section titled “Volume Thresholds”| Volume | Recommended Approach |
|---|---|
| < 2,000 records | REST API (single requests or Composite) |
| 2,000 - 50,000 records | Bulk API 2.0 (serial mode) |
| 50,000 - 10M records | Bulk API 2.0 (parallel mode) with middleware |
| 10M+ records | Bulk API 2.0 + partitioning + off-peak scheduling |
Trade-offs
Section titled “Trade-offs”| Advantage | Disadvantage |
|---|---|
| Handles massive volumes efficiently | Data is stale between sync windows |
| Predictable resource consumption | Requires scheduling and monitoring |
| Can run during off-peak hours | Complex error handling for partial failures |
| Well-understood pattern | Change detection logic needed (deltas vs full loads) |
Pattern 4: Remote Call-In
Section titled “Pattern 4: Remote Call-In”Use Remote Call-In when the external system owns the process and needs to create, update, or read Salesforce data on its own schedule. The ERP pushes invoice updates. The web portal reads customer records. The external scoring engine invokes Salesforce business logic. In each case, Salesforce is the target, not the initiator. This is the default pattern when Salesforce should not poll for changes.
Sequence Diagram
Section titled “Sequence Diagram”Implementation Options
Section titled “Implementation Options”| Option | Best For | Consideration |
|---|---|---|
| REST API | Modern integrations, JSON payloads | Most common choice |
| SOAP API | Legacy systems, WSDL-based clients | Higher overhead, full metadata access |
| Composite API | Multi-step operations, reducing round trips | Up to 25 subrequests |
| GraphQL API | Flexible queries and mutations, mobile-friendly | Newer; mutations GA in API v66.0 (Spring ‘26) |
| Apex REST/SOAP Services | Custom business logic endpoints | Full control, governor limits apply |
Trade-offs
Section titled “Trade-offs”| Advantage | Disadvantage |
|---|---|
| External system controls timing and logic | Salesforce API limits apply (daily and concurrent) |
| Full access to Salesforce data model | Authentication complexity (OAuth flows) |
| Can use Salesforce business logic | Governor limits on custom Apex endpoints |
| Standard API protocols | External system must handle retries |
Pattern 5: UI Update Based on Data Changes
Section titled “Pattern 5: UI Update Based on Data Changes”Use this pattern when an external system or Salesforce UI must react to data changes within seconds, without polling. Polling wastes API limits and adds latency; push-based delivery solves both problems. The right fit when dashboards must reflect changes as they happen, external systems must react to Salesforce record changes in near-real-time, or consumers subscribe to change streams.
Sequence Diagram
Section titled “Sequence Diagram”Implementation Options
Section titled “Implementation Options”| Option | Best For | Retention |
|---|---|---|
| Change Data Capture (CDC) | Any standard/custom object changes | 3 days |
| Platform Events | Custom business events | 72 hours (high-volume) |
| Pub/Sub API (gRPC) | High-throughput external subscribers | Depends on event type |
| Streaming API (legacy) | LWC Emp API subscriptions | Being replaced by Pub/Sub |
Trade-offs
Section titled “Trade-offs”| Advantage | Disadvantage |
|---|---|
| Near-real-time updates | 24-72 hour event retention limit |
| No polling (saves API calls) | Subscriber must handle reconnection |
| Push-based, event-driven | At-least-once delivery (duplicates possible) |
| Scalable to many subscribers | Replay window is finite |
Pattern 6: Data Virtualization
Section titled “Pattern 6: Data Virtualization”Use Data Virtualization when copying data into Salesforce is impractical or prohibited: the dataset is too large (LDV concerns), changes too frequently to keep copies in sync, or regulatory/compliance rules prevent data duplication. Salesforce Connect and External Objects query the data on-demand without storing it. Also the right fit when the external system is the authoritative system of record and you only need to display its data in Salesforce UI.
Sequence Diagram
Section titled “Sequence Diagram”Implementation Options
Section titled “Implementation Options”| Adapter | Protocol | Best For |
|---|---|---|
| OData 2.0 / 4.0 | OData | SAP, SharePoint, any OData-compliant system |
| Cross-org Adapter | Salesforce org-to-org | Multi-org architectures |
| Custom Adapter (Apex) | Any | Proprietary APIs, complex auth |
Trade-offs
Section titled “Trade-offs”| Advantage | Disadvantage |
|---|---|
| No data duplication | Slower than native objects (network latency per query) |
| Always current data | Limited Salesforce functionality (no triggers, limited reports) |
| No storage costs | Cannot use in all SOQL contexts |
| Regulatory compliance | External system must be highly available |
| Quick to implement | No offline access |
Timing: Real-Time vs Near-Real-Time vs Batch
Section titled “Timing: Real-Time vs Near-Real-Time vs Batch”Timing is a critical CTA decision. The choice depends on business requirements, data volume, and acceptable staleness.
| Timing | Latency | Volume | Use Case |
|---|---|---|---|
| Real-time | < 2 seconds | Single records | Address validation, credit check |
| Near-real-time | 2 seconds - 5 minutes | Low-moderate | Order status updates, notifications |
| Batch | Minutes to hours | High (thousands+) | Data warehouse sync, reporting |
Combining Patterns in CTA Scenarios
Section titled “Combining Patterns in CTA Scenarios”Real CTA scenarios always need multiple patterns. A typical enterprise integration setup might use:
- Request-Reply for real-time address validation at point of sale
- Fire-and-Forget for order fulfillment notifications to the warehouse
- Batch Sync for nightly data warehouse updates
- Remote Call-In for the ERP pushing invoice updates into Salesforce
- CDC/Events for the customer portal reacting to case status changes
- Data Virtualization for displaying legacy product catalog without migration
| Touchpoint | Pattern | Timing | Technology | Error Strategy |
|---|---|---|---|---|
| Address Validation | Request-Reply | Real-time | REST callout | Graceful degradation |
| Order to ERP | Fire-and-Forget | Near-RT | Platform Events + MuleSoft | DLQ + retry |
| Data Warehouse | Batch Sync | Nightly | Bulk API 2.0 + Informatica | Partial failure handling |
| ERP Invoice Sync | Remote Call-In | Real-time | REST API | Idempotency keys |
| Portal Notifications | UI Update | Near-RT | CDC + Pub/Sub API | Replay from checkpoint |
| Legacy Catalog | Virtualization | On-demand | Salesforce Connect OData | Fallback cache |
Enterprise Integration Landscape
Section titled “Enterprise Integration Landscape”A real CTA scenario never involves a single integration. The diagram below shows how multiple patterns coexist in a typical enterprise: Salesforce at the center, coordinating real-time, near-real-time, and batch data flows through a mix of direct and middleware-mediated connections.
Detailed walkthrough
Not every integration in this diagram crosses the middleware band, and that asymmetry is the central lesson.
The P1 arrow runs directly from Salesforce Core to the Address Service, bypassing MuleSoft. Address validation is synchronous with one consumer: the callout blocks until the response arrives and the result is needed before the record saves. Routing it through middleware adds a hop and a failure point with no gain. The failure mode is the external system going down mid-transaction: the Apex callout times out (up to 120 seconds) and the transaction fails. A circuit breaker or graceful degradation to cached postal data is the correct board answer.
The P2 arrow leaves from the Event Bus, not Salesforce Core directly. When an order record is saved, a Platform Event fires into the internal event bus. MuleSoft subscribes via the System API tier, transforms the payload into SAP’s format, and routes it to the ERP. The user gets a confirmation immediately; ERP processing happens asynchronously. If MuleSoft is down during the event retention window, messages are at risk. The answer is replay from checkpoint using the event’s replay ID, plus a dead-letter queue for messages that exhaust retries.
The P3 arrow connects the Process API tier to the Data Warehouse via Bulk API 2.0 on a nightly schedule. The batch runs through the middle tier because the same Process API can serve other analytics consumers without additional Salesforce callouts.
The P4 path runs in reverse: Billing Platform calls MuleSoft’s System API, which calls Salesforce Core via Composite API to upsert invoices. Three or more consumers sharing a single integration point is the threshold where middleware governance pays off.
The P5 arrow goes directly from the Event Bus to the Customer Portal via CDC and Pub/Sub API. The portal is a single subscriber and the near-real-time requirement is met without middleware. CDC’s 3-day retention window gives the subscriber a meaningful replay buffer if it loses connectivity.
The P6 dotted arrow signals that no data physically moves. Salesforce queries the mainframe on demand through an OData adapter. No ETL, no duplication, no storage cost, but also no Apex triggers on the external object, limited flow support, and no full SOQL join semantics with native objects.
Pattern selection is per touchpoint, not per platform. Mandating that everything goes through MuleSoft fails because it ignores the Address Service and Portal CDC cases where middleware is pure overhead.
Related Topics
Section titled “Related Topics”- Data Migration: batch data sync and migration patterns often drive integration pattern selection
- Identity & SSO: authentication for integration endpoints (Named Credentials, OAuth flows)
- CI/CD & Deployment: deploying integration configs (connected apps, Named Credentials, remote site settings)
Sources
Section titled “Sources”- Salesforce Integration Patterns and Practices (Official)
- Salesforce Architects: Integration Patterns
- Salesforce Architects: System Landscape Reference Architecture
- Trailhead: Integration Architecture
- Trailhead: Application Integration Patterns
- Andrew Fawcett, “Salesforce Platform Enterprise Architecture” (Packt)
- CTA Study Group community notes on integration pattern selection
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.