Skip to content

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.


#PatternDirectionTimingInitiatorCommon Tech
1Remote Process Invocation - Request-ReplySF to ExternalReal-timeSalesforceREST/SOAP callout, Named Credentials
2Remote Process Invocation - Fire-and-ForgetSF to ExternalNear-real-timeSalesforcePlatform Events, Outbound Messages, Async Apex
3Batch Data SynchronizationBidirectionalBatchEitherBulk API, ETL tools, MuleSoft batch
4Remote Call-InExternal to SFReal-timeExternalREST/SOAP API, Composite API
5UI Update Based on Data ChangesExternal to SFReal-timeExternalStreaming API, Platform Events, Pub/Sub API
6Data VirtualizationSF to ExternalReal-timeSalesforceSalesforce 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.

Salesforce blocks on an HTTP callout to an external system, processes the response, and returns the result to the user.
Figure 1. The Request-Reply pattern blocks the Salesforce transaction until the external system responds. Use only when the business process cannot proceed without the external answer and the external system reliably responds within governor limit windows.
OptionBest ForGovernor Limit
Apex Callout (synchronous)Simple integrations, user-facingDefault 10s timeout per callout, configurable up to 120s; 120s cumulative per transaction
Flow HTTP CalloutDeclarative, admin-managedSame governor limits apply
External ServicesOpenAPI-based services, no codeAuto-generates Apex from spec
AdvantageDisadvantage
Immediate feedback to userBlocks the transaction - poor UX if slow
Simple to reason aboutSubject to governor limits (default 10s callout timeout, configurable up to 120s)
Transactional consistencyExternal system downtime = Salesforce failure
Easy error handlingCannot 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.

Salesforce publishes a message to a bus and immediately confirms to the user, while the external system processes asynchronously.
Figure 2. Fire-and-Forget decouples Salesforce from downstream latency by publishing to a message bus and returning control immediately. The external system processes on its own schedule, requiring idempotent consumers to handle at-least-once delivery.
OptionBest ForDelivery Guarantee
Platform EventsEvent-driven architecturesAt-least-once (with replay)
Outbound MessagesWorkflow-triggered SOAP callsAt-least-once (retries for 24h)
Queueable Apex with CalloutComplex logic before calloutNo built-in retry
Change Data CaptureData change notificationsAt-least-once (with replay)
AdvantageDisadvantage
Decouples systemsNo immediate confirmation of success
Salesforce transaction unaffected by external failuresRequires monitoring for failed deliveries
Better UX (no waiting)Eventual consistency - data may lag
Handles higher volumesMore complex error handling needed

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.

A scheduler triggers an ETL job to extract, transform, and load changed records into Salesforce using Bulk API 2.0 on a scheduled interval.
Figure 3. Batch Synchronization uses scheduled ETL jobs and Bulk API 2.0 to move high-volume data efficiently. Transformation outside Salesforce avoids governor limits, and delta extraction keeps job windows manageable as data grows.
OptionVolumeDirection
Bulk API 2.0Millions of recordsInbound to SF
Data Loader (CLI mode)Thousands to millionsBidirectional
MuleSoft Batch ModuleEnterprise-scaleBidirectional
Informatica CloudEnterprise-scaleBidirectional
Scheduled Apex + SOQLModerate volumesSF-initiated
VolumeRecommended Approach
< 2,000 recordsREST API (single requests or Composite)
2,000 - 50,000 recordsBulk API 2.0 (serial mode)
50,000 - 10M recordsBulk API 2.0 (parallel mode) with middleware
10M+ recordsBulk API 2.0 + partitioning + off-peak scheduling
AdvantageDisadvantage
Handles massive volumes efficientlyData is stale between sync windows
Predictable resource consumptionRequires scheduling and monitoring
Can run during off-peak hoursComplex error handling for partial failures
Well-understood patternChange detection logic needed (deltas vs full loads)

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.

An external system authenticates via OAuth 2.0 and calls Salesforce APIs to create, update, or read records, triggering Salesforce business logic.
Figure 4. Remote Call-In places the external system in control of timing and frequency. API limit governance and Connected App OAuth configuration are the primary architectural concerns when multiple external systems call into the same org.
OptionBest ForConsideration
REST APIModern integrations, JSON payloadsMost common choice
SOAP APILegacy systems, WSDL-based clientsHigher overhead, full metadata access
Composite APIMulti-step operations, reducing round tripsUp to 25 subrequests
GraphQL APIFlexible queries and mutations, mobile-friendlyNewer; mutations GA in API v66.0 (Spring ‘26)
Apex REST/SOAP ServicesCustom business logic endpointsFull control, governor limits apply
AdvantageDisadvantage
External system controls timing and logicSalesforce API limits apply (daily and concurrent)
Full access to Salesforce data modelAuthentication complexity (OAuth flows)
Can use Salesforce business logicGovernor limits on custom Apex endpoints
Standard API protocolsExternal 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.

A record change in Salesforce publishes to the event bus, which pushes a notification to UI or external subscribers without polling.
Figure 5. The UI Update pattern eliminates polling by pushing change events directly to subscribers. CDC and Platform Events share the same event bus infrastructure, with retention windows of 3 days and 72 hours respectively.
OptionBest ForRetention
Change Data Capture (CDC)Any standard/custom object changes3 days
Platform EventsCustom business events72 hours (high-volume)
Pub/Sub API (gRPC)High-throughput external subscribersDepends on event type
Streaming API (legacy)LWC Emp API subscriptionsBeing replaced by Pub/Sub
AdvantageDisadvantage
Near-real-time updates24-72 hour event retention limit
No polling (saves API calls)Subscriber must handle reconnection
Push-based, event-drivenAt-least-once delivery (duplicates possible)
Scalable to many subscribersReplay window is finite

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.

Salesforce queries an external object, which calls the remote system via OData or a custom adapter and returns live data without storing it.
Figure 6. Data Virtualization queries the external system on demand through Salesforce Connect, eliminating data duplication and storage costs. External Objects cannot participate in Apex triggers, approval processes, or most Flow operations.
AdapterProtocolBest For
OData 2.0 / 4.0ODataSAP, SharePoint, any OData-compliant system
Cross-org AdapterSalesforce org-to-orgMulti-org architectures
Custom Adapter (Apex)AnyProprietary APIs, complex auth
AdvantageDisadvantage
No data duplicationSlower than native objects (network latency per query)
Always current dataLimited Salesforce functionality (no triggers, limited reports)
No storage costsCannot use in all SOQL contexts
Regulatory complianceExternal system must be highly available
Quick to implementNo 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.

Routes an integration need through user-feedback, response-time, volume, and change-driven criteria to real-time, near-real-time, or batch timing.
Figure 7. Timing selection starts with whether the user is blocked waiting for a result, then evaluates response-time feasibility, volume thresholds, and whether the trigger is a data change. Each branch maps to a specific pattern and technology stack.
TimingLatencyVolumeUse Case
Real-time< 2 secondsSingle recordsAddress validation, credit check
Near-real-time2 seconds - 5 minutesLow-moderateOrder status updates, notifications
BatchMinutes to hoursHigh (thousands+)Data warehouse sync, reporting

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
TouchpointPatternTimingTechnologyError Strategy
Address ValidationRequest-ReplyReal-timeREST calloutGraceful degradation
Order to ERPFire-and-ForgetNear-RTPlatform Events + MuleSoftDLQ + retry
Data WarehouseBatch SyncNightlyBulk API 2.0 + InformaticaPartial failure handling
ERP Invoice SyncRemote Call-InReal-timeREST APIIdempotency keys
Portal NotificationsUI UpdateNear-RTCDC + Pub/Sub APIReplay from checkpoint
Legacy CatalogVirtualizationOn-demandSalesforce Connect ODataFallback cache

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.

Shows all six integration patterns operating simultaneously across Salesforce, MuleSoft middleware, and seven external systems in a typical enterprise.
Figure 8. A realistic enterprise uses all six patterns simultaneously. Simple two-system integrations (address validation, portal CDC) connect directly; complex multi-system flows route through MuleSoft API-led layers. The event bus decouples Salesforce from downstream processing.
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.


  • 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)

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.