Integration Patterns
5 patterns · Real code, real architecture diagrams
Integration Architecture Philosophy
Every integration pattern I use is chosen for reliability and maintainability. Named Credentials for secret-free callouts. Platform Events for decoupled, event-driven sync. Connected Apps for proper OAuth flows — no username/password in config. The goal: integrations that stay green at 3am without anyone touching them.
Salesforce calls an external REST API using Named Credentials for secure, credential-free callouts. Ideal for real-time data enrichment or pushing records to external systems.
Use Case
Enriching Account records with data from a 3rd-party data provider on save.
Key Components
Decoupled, asynchronous communication using Salesforce Platform Events. Publishers fire events; subscribers react independently. Enables real-time integration without tight coupling.
Use Case
Syncing Salesforce Order status changes to an ERP system in real-time without blocking the UI.
Key Components
External applications authenticate into Salesforce using OAuth 2.0 flows via Connected Apps. Supports JWT Bearer (server-to-server), Web Server flow (user-context), and Device flow.
Use Case
A React web app accesses Salesforce data on behalf of logged-in users using the Web Server OAuth flow.
Key Components
Salesforce automatically publishes change events whenever records are created, updated, deleted, or undeleted. External systems subscribe via the Pub/Sub API for a reliable, ordered stream of changes.
Use Case
Keeping a data warehouse in sync with Salesforce Contact record changes in near-real-time.
Key Components
Custom Apex classes exposed as REST endpoints, allowing external systems to interact with Salesforce using bespoke business logic. Far more flexible than standard CRUD APIs — can orchestrate complex operations in a single call.
Use Case
A mobile app creates a case with related line items and sends a confirmation email in one atomic API call.
Key Components