SfSkills Domains Docs GitHub

Home / integration / middleware-integration-patterns

middleware-integration-patterns

Use when selecting or comparing middleware / iPaaS tools (MuleSoft, Dell Boomi, Workato, Informatica) for Salesforce connectivity, or when determining whether a scenario requires middleware at all versus native Salesforce capabilities. Triggers: 'which iPaaS should I use', 'MuleSoft vs Boomi vs Workato', 'when do I need middleware for Salesforce'. NOT for MuleSoft Anypoint Salesforce Connector configuration — use integration/mulesoft-salesforce-connector. NOT for API-led connectivity layer design — use integration/api-led-connectivity.

Open the skill folder on GitHub


Middleware Integration Patterns

This skill activates when a practitioner needs to determine whether middleware is required for a Salesforce integration scenario, or when comparing iPaaS platforms (MuleSoft, Dell Boomi, Workato, Informatica) across vendor-agnostic selection criteria. It provides pattern-level guidance for multi-system orchestration, protocol conversion, message transformation, and transactional guarantees. It does not cover the internals of any single vendor's connector configuration.


Before Starting

Gather this context before working on anything in this domain:


Core Concepts

When Middleware Is Mandatory

According to Salesforce Architects integration guidance, middleware is the right choice when any of the following conditions apply:

  1. Cross-system orchestration: The integration must fan out to, or aggregate from, more than two backend systems in a single business transaction. Apex orchestration hitting governor limits (100 callouts per transaction, 120-second timeout) is a technical forcing function.
  2. Protocol conversion: Source or target systems communicate over protocols Salesforce cannot natively consume — AS2, MQ, JMS, SFTP, proprietary binary formats, SOAP with WS-Security, JDBC. Apex HTTP callouts reach only HTTP/HTTPS endpoints.
  3. Reliable message queuing: The integration must guarantee delivery even when either system is temporarily unavailable. Salesforce has no native durable queue for outbound messages to arbitrary systems. Platform Events provide replay up to 72 hours within Salesforce's event bus, but delivering to an external system that may be down still requires an intermediary queue.
  4. Transactional guarantees: The integration must coordinate a unit of work across two or more systems that each have their own transaction boundaries. Salesforce's SOAP Outbound Messages provide at-least-once delivery, but two-phase commit across external systems requires a middleware transaction coordinator.
  5. Complex message transformation: Source data requires structural transformation beyond field mapping — aggregation, splitting, enrichment from a third source, canonical data model normalization. Apex can handle simple transformations but is not designed for pipeline-style transformation orchestration.

iPaaS Vendor Comparison: Selection Criteria

All four major iPaaS vendors connect to Salesforce through certified connectors or APIs. Selection criteria that distinguish them for Salesforce integrations:

CriterionMuleSoft AnypointDell BoomiWorkatoInformatica IICS
Primary strengthAPI-led architecture, developer control, enterprise governanceRapid connector deployment, low-code process orchestrationBusiness-user automation, recipe-driven, speed to valueEnterprise data integration, data quality, MDM convergence
Salesforce connectorAnypoint Salesforce Connector (certified, deep API coverage including Streaming/Pub-Sub)Boomi Salesforce connector (SOAP/REST/Bulk, real-time listener)Salesforce trigger/action with real-time event subscriptionSalesforce connector with CDC support and data quality transforms
Orchestration modelJava-based Mule flows; complex CEP and routing via DataWeave and Mule runtimeBoomi Process canvas; low-code but extensible with scripting stepsRecipe-based, trigger-action model; conditional logic via conditional stepsPowerCenter/IICS mappings; strong for ETL-style batch and CDC
Protocol coverageBroadest: HTTP, JMS, AMQP, SFTP, AS2, JDBC, SAP, legacyBroad: HTTP, JMS, SFTP, EDI, SAP, legacy via Boomi AtomSphereNarrower: primarily HTTP/webhook; limited legacy protocol supportBroad for data: JDBC, flat-file, S3, SAP, HTTP; limited event streaming
Transformation languageDataWeave (purpose-built, expressive)Groovy scripting or Boomi map functionWorkato formulas (Ruby-based, limited)Mapplet / Expression Transformation (SQL-like)
Real-time event supportStreaming API, Pub/Sub gRPC, CDC via connectorReal-time via HTTP listener + Salesforce listener operationsSalesforce real-time trigger (polling every 5 minutes minimum)CDC-based via Informatica Intelligent Data Management
Governance and API managementAnypoint API Manager, Exchange; full API lifecycleLimited native API management; relies on external gatewaysMinimal API governance out-of-the-boxAxon governance for data assets; not API-lifecycle focused
Target buyerEnterprise IT / integration CoEMid-market and enterprise, business-technology teamsBusiness users, citizen integrators, SMB/mid-marketEnterprise data teams, data governance programs

Native Salesforce vs. Middleware Decision Boundary

Before selecting any middleware vendor, confirm that native capabilities cannot address the requirement:

RequirementNative Salesforce CapabilityMiddleware Required?
Push Salesforce record changes to external HTTP endpointFlow HTTP Callout Action or Apex calloutNo, if endpoint is HTTP and volume is within governor limits
Subscribe to Salesforce Platform Events from external systemPub/Sub API (gRPC streaming), CometDNo (external system consumes directly)
Ingest webhook events from external system into SalesforceSalesforce REST API from external callerNo
Nightly bulk load from ERP (100K+ records)External ETL tool or Salesforce Bulk APIMiddleware or ETL if transformation is required
Fanout: one Salesforce event triggers updates to 3+ backendsMiddleware requiredYes — governor limits and reliability
Transform SFTP flat-file from legacy system into Salesforce recordsApex cannot read SFTP; transformation complexYes — middleware handles SFTP, parse, transform, load
Guaranteed delivery when target system is offlineNo native durable external queueYes — middleware queue provides store-and-forward

Common Patterns

Pattern 1: Event-Driven Fanout via Middleware

When to use: A Salesforce record change must trigger coordinated updates to multiple external systems (ERP, data warehouse, email platform) as a logical unit.

How it works:

  1. Salesforce publishes a Platform Event or Pub/Sub API event on record change.
  2. Middleware subscribes to the event channel (Pub/Sub gRPC or CometD).
  3. Middleware routes the event to a fanout pattern: one copy per downstream system.
  4. Each downstream leg has independent error handling and retry logic; failures in one leg do not roll back others.
  5. A correlation ID (e.g., Salesforce record Id) is propagated to all legs for end-to-end traceability.

Why not Apex: Apex triggers hitting multiple callout endpoints face the 100-callout-per-transaction limit and the 10-second synchronous timeout. Failures in one callout leg can roll back the entire transaction if not carefully isolated. Middleware removes Salesforce from the synchronous path entirely.

Pattern 2: Protocol Conversion for Legacy System Integration

When to use: A legacy backend (mainframe, AS400, SAP RFC, EDI trading partner) communicates over a protocol Salesforce cannot natively speak.

How it works:

  1. Middleware exposes a protocol adapter for the legacy system (JMS, MQ, AS2, JDBC, RFC).
  2. Middleware transforms the legacy message format into a canonical JSON/XML model using DataWeave, Boomi Maps, or equivalent.
  3. The canonical model is loaded into Salesforce via REST API composite requests or Bulk API, depending on volume.
  4. Return data (e.g., ERP order confirmation) is mapped back from Salesforce to the legacy protocol format for acknowledgment.

Why not Apex: Apex has no JDBC, JMS, MQ, or SFTP connectivity. Any connectivity to these protocols from Salesforce requires an intermediary.

Pattern 3: Store-and-Forward for Resilient Delivery

When to use: The target system has planned maintenance windows or is frequently unavailable, and lost messages are unacceptable.

How it works:

  1. Middleware receives the Salesforce-originated event or record and places it on an internal durable queue (MuleSoft JMS, Boomi Atom Queue, Workato Job Queue).
  2. A downstream consumer reads from the queue and attempts delivery to the target.
  3. On failure, the message is retained and retried with exponential backoff.
  4. A dead-letter queue captures messages that exhaust retries, with alerting and manual reprocessing tooling.

Why not Platform Events: Salesforce Platform Events have a 72-hour replay window for Salesforce-internal consumers. External systems accessing the Pub/Sub API bear the responsibility for maintaining their own replay position. If the external system is offline for more than 72 hours, events are lost. Middleware's durable queue is not subject to Salesforce's retention window.


Decision Guidance

SituationRecommended ApproachReason
Simple Salesforce-to-external-HTTP callout, low volumeApex callout or Flow HTTP Callout — no middlewareNative capability is sufficient; middleware adds operational overhead
Complex orchestration across 3+ systemsMiddleware required; MuleSoft preferred for enterprise governance needsGovernor limits and reliability make Apex inadequate; MuleSoft for API-led governance
Business-user automation, SMB context, Salesforce + SaaS appsWorkatoLow-code recipe model reduces IT dependency; strong SaaS connector library
ETL-style bulk data sync with data quality and MDM requirementsInformatica IICSBest-in-class data transformation, profiling, and master data management
Mid-market process automation, moderate complexityDell BoomiLow-code, fast deployment, competitive total cost vs MuleSoft at mid-market scale
Enterprise API governance + multi-consumer integration + AgentforceMuleSoft AnypointAPI-led architecture, Anypoint Exchange catalog, Agent Fabric for Agentforce integration
Legacy protocol conversion (AS2, MQ, JMS, SFTP, RFC)MuleSoft or BoomiBoth have broad protocol support; Workato and Informatica weaker here
Team with no iPaaS and wanting speed-to-valueWorkato or BoomiLower learning curve than MuleSoft; functional in days, not weeks

Step-by-step instructions for an AI agent or practitioner working on middleware selection for Salesforce:

  1. Confirm that middleware is genuinely required. Map the integration requirements against the native capability table above. If Platform Events, Pub/Sub API, Flow HTTP Callout, or Apex callouts satisfy the requirement within governor limits, document that decision and stop here.
  2. Identify the integration drivers. Determine which specific requirements mandate middleware: protocol conversion, orchestration fanout, message queuing, transactional guarantees, or complex transformation. Each driver points toward different vendor strengths.
  3. Audit existing platform investments. Check whether the organization already holds an active MuleSoft, Boomi, Workato, or Informatica license. Introducing a second iPaaS is almost never justified; optimize the existing platform first.
  4. Score vendors against the selection criteria. Use the comparison table (protocol coverage, transformation capability, real-time event support, governance, buyer profile) to score the top two candidate platforms against the specific integration requirements.
  5. Validate Salesforce connector coverage. For the selected vendor, confirm the Salesforce connector supports the required API (Bulk, Streaming/Pub-Sub, REST, SOAP) and the Salesforce org edition. Workato's real-time polling interval (5-minute minimum) is a disqualifying constraint for sub-minute latency requirements.
  6. Design error handling and observability. Define the dead-letter queue strategy, retry policy, and alerting thresholds before implementation. Per Salesforce Architects guidance, every middleware integration must have a documented error handling strategy and a path for failed-message recovery.
  7. Review against the checklist before committing. Confirm all architecture decisions are documented, error handling is designed, and the middleware necessity decision is recorded.

Review Checklist

Run through these before marking work in this area complete:


Salesforce-Specific Gotchas

Non-obvious platform behaviors that cause real production problems:

  1. Platform Events 72-hour replay window is not middleware-level durability — Salesforce Platform Events support replay for up to 72 hours for Pub/Sub API consumers. Teams that use Platform Events as the integration backbone without a middleware durable queue discover that external subscribers offline for more than 72 hours permanently lose events with no error or notification. Middleware with a persistent queue removes this exposure.
  2. Workato's Salesforce real-time trigger is polling, not push — Despite being labeled "real-time," Workato's Salesforce trigger polls for new/changed records at a minimum interval of 5 minutes. Integrations requiring sub-5-minute latency for record changes cannot use Workato's standard trigger; a separate Pub/Sub API listener flow must be designed.
  3. Governor limits do not pause — they fail hard — When an Apex callout integration approaches the 100-callout-per-transaction or 10-second synchronous limit, the transaction is not queued or paused; it fails with an unhandled exception. Teams that incrementally add integration logic to Apex triggers hit this cliff unexpectedly. Plan for middleware before the limit is reached, not after it is first hit in production.

Output Artifacts

ArtifactDescription
Middleware necessity decision recordDocumented yes/no decision on whether middleware is required, with rationale citing specific requirements
iPaaS vendor selection scorecardScored comparison of candidate vendors against integration-specific criteria
Integration pattern recommendationSelected pattern (event-driven fanout, protocol conversion, store-and-forward, etc.) with justification
Error handling designDead-letter queue strategy, retry policy, alerting thresholds, and recovery runbook outline

Dependencies

Package files