What is an Integration Pattern? — Salesforce Interview Answer

Understanding Integration Patterns

An integration pattern is a repeatable solution to a common problem encountered when connecting two or more systems. In the Salesforce ecosystem, integration patterns describe proven approaches for exchanging data, invoking processes, and synchronizing state between Salesforce and external applications — while addressing non-functional requirements such as latency, reliability, security, and scalability.

Why integration patterns matter

Interviewers expect candidates to not only name patterns but also explain when to use them and the trade-offs involved. Knowing integration patterns demonstrates architectural thinking: choosing synchronous vs asynchronous approaches, handling errors and retries, managing data volume, and staying within Salesforce governor limits.

Common Salesforce integration patterns (summary)

Below are concise descriptions of frequently used patterns and when to choose them:

1. Remote Process Invocation — Request and Reply (Synchronous)

Use when an immediate response is required. Salesforce calls an external service (REST/SOAP) and waits for a reply. Best for low-latency needs but limited by callout timeout and governor limits.

2. Remote Process Invocation — Fire and Forget (Asynchronous)

Salesforce invokes an external process but does not wait for the response. Useful for non-blocking operations where response can be handled later (e.g., via callbacks, webhooks, or platform events).

3. Batch Data Synchronization

Large data volumes are synchronized in bulk (ETL/ELT). Use scheduled jobs or middleware to move data between systems (e.g., nightly sync). Good for reporting and back-office reconciliation.

4. Publish/Subscribe (Event-Driven)

Systems publish events and interested subscribers consume them. Salesforce supports Platform Events, Change Data Capture (CDC), and Streaming API. Ideal for decoupled, scalable integrations and near-real-time updates.

5. Remote Call-In (Inbound)

External systems call Salesforce APIs (REST, SOAP, Bulk API) to create/read/update/delete records. Useful when external systems are the source of truth or need to push updates into Salesforce.

6. Data Replication

Maintain a copy of data outside Salesforce (or vice versa) for performance, reporting, or integration with legacy systems. Requires careful planning for synchronization and conflict resolution.

7. Middleware / Integration Hub

Introduce a middleware (MuleSoft, Dell Boomi, Informatica) to centralize transformations, routing, security, and monitoring. Middleware simplifies complex enterprise integrations and provides orchestration.

8. Hybrid and Composite Patterns

Many real-world solutions combine patterns. For example, use synchronous calls for user-driven actions and event-driven flows for background processing.

Key trade-offs and considerations

  • Synchronous vs Asynchronous: Choose sync for immediate UX feedback; async for scalability and resiliency.
  • Latency and SLAs: Understand acceptable response times and design accordingly.
  • Error Handling & Retries: Implement idempotency, dead-letter queues, and retry strategies.
  • Security: Use OAuth, named credentials, certificate-based authentication, and encrypt sensitive payloads.
  • Data Volume & Limits: Design around Salesforce governor limits (API limits, callout limits, transaction size).
  • Monitoring & Observability: Ensure logs, metrics, and alerts are in place (middleware or platform event monitoring).

Quick Apex example — Remote Process Invocation (REST callout)

HttpRequest req = new HttpRequest();
req.setEndpoint('https://api.example.com/validate');
req.setMethod('POST');
req.setHeader('Content-Type', 'application/json');
req.setBody('{"accountId":"001xx000003DGbY"}');

Http http = new Http();
HTTPResponse res = http.send(req);
if (res.getStatusCode() == 200) {
// handle success
} else {
// handle error / retry strategy
}

How to answer this in an interview (structure)

1) Give a concise definition. 2) List 3–5 common patterns. 3) Explain a real-world scenario and recommend one pattern with trade-offs. 4) Mention security, monitoring, and limits.

Sample interview answer (short)

An integration pattern is a repeatable architectural approach for connecting systems. In Salesforce, common patterns include synchronous request-reply for user-driven actions, asynchronous event-driven integrations (Platform Events/CDC) for decoupling, batch synchronization for large data volumes, and middleware orchestration for complex flows. Choose the pattern based on latency, reliability, data volume, and security needs.

Further reading

Refer to Salesforce’s Integration Patterns and Practices guide and material on Platform Events, Change Data Capture, Named Credentials, and Bulk API when preparing deep-dive answers.