Salesforce integrations fail in predictable ways. The pattern you choose determines which failures you get and how easily you recover from them.

The four patterns

PatternUse whenMain risk
Salesforce calls out, synchronouslyA user is waiting for a responseExternal slowness blocks the user; callout limits
Salesforce calls out, asynchronouslyNotify another system of a changeSilent failure if unmonitored
External system calls SalesforceExternal system owns the triggerAPI limits; needs authentication management
Scheduled batch both waysBulk sync, tolerant of delayData stale between runs

Synchronous callouts from triggers are the pattern that causes most production incidents. A trigger that calls an external API blocks the transaction until it responds, consumes callout limits per record, and fails the entire save if the external system is slow. Almost always, the right answer is to queue the work asynchronously.

Choosing between them

  1. Does a user need the answer now? If not, do not make it synchronous.
  2. Which system knows when something changed? That system should initiate.
  3. What volume? High volume argues for batch; low volume tolerates event-driven.
  4. What delay is acceptable? Most businesses tolerate minutes comfortably.
  5. What happens if it fails? Design the recovery before the happy path.

Design the failure path first. Every integration will experience an outage on the other side; the ones that survive it are the ones that treated that as the normal case rather than the exception.

Salesforce-specific constraints to plan around

  • Callout limits per transaction — a small number, which per-record callouts exhaust immediately.
  • No callouts after DML in the same transaction without going asynchronous.
  • Daily API request limits for inbound calls, tied to your edition and licences.
  • Timeout ceilings on outbound calls.
  • Governor limits apply to integration code exactly as they do to everything else.

What every integration needs regardless of pattern

ComponentWhy
IdempotencyRetries and duplicate events happen
Retry with backoffTransient failures are the common case
Dead-letter handlingSomething must catch persistent failures
Structured loggingDiagnosis without it is guesswork
Alerting to a personLogs nobody reads are not monitoring
ReconciliationProving the two systems agree
Credential rotation planTokens expire, usually at a bad moment

Platform Events are underused for outbound integration. Publishing an event from a trigger and processing it asynchronously decouples the save from the external call entirely — the user's save succeeds regardless of what the other system is doing, and the event can be retried independently.

Build, connector, or middleware

OptionSuitsBreaks down when
Off-the-shelf connectorStandard systems, standard mappingRequirements diverge from the standard
Direct custom integrationOne or two connections, specific logicCount grows; logic duplicates
Middleware platformSeveral integrations, central monitoringCost and a platform to learn

Start with a connector if one plausibly fits. Move to custom when it does not. Adopt middleware when the number of integrations makes central management worth its cost — not before, and not as an architectural principle.

Warning signs in an existing integration

  • Callouts inside triggers, synchronously.
  • No visibility into whether it ran successfully today.
  • Failures discovered by users.
  • No way to replay a failed message.
  • Credentials stored somewhere other than named credentials or a secret store.
  • Nobody can produce a reconciliation between the two systems.

Planning an integration, or repairing one that fails quietly? Tell us the systems and the volumes. See our Salesforce service, governor limits, and integration strategy.

Frequently asked questions

Not for one or two integrations — direct connections are simpler and cheaper. Middleware earns its cost around the point where you have several integrations sharing transformation logic, or where you need central monitoring and retry across all of them.
Try it first. Connectors handle standard cases well and cost far less than building. They become a poor fit when your requirements diverge from the standard mapping — at which point fighting the connector costs more than a custom build would have.
Scheduled is more reliable and cheaper. Choose real-time only where the business genuinely needs it — a user waiting for a response, or a time-critical process. "It would be nice to see it immediately" does not usually justify the complexity.