Integration Patterns
| Synchronous | Asynchronous |
---|---|---|
Inbound | SOAP API Rest API Chatter / Connect API | Bulk API Salesforce to Salesforce Email Services |
Outbound | Mashup SOAP Callouts REST Callouts | Canvas Outbound Messaging Salesforce to Salesforce Outbound Email |
Information correct as at circa 2009.
Point-to-point
direct integration between each systems
Hard to scale
unmanageable with more nodes
Hub and Spoke
Central hub
Broker
reduces dependencies
Single point of failure
Not large transaction volumes
Eg Mulesoft?
Middleware
BUS
Eg ESB
Platform Events
Scales
Distributed adapters
Middleware
ETL, Data Cleansing, Process Management
Transactionality
Uses web services
Terms
Data Integration
synchronise data
simplest to implement
Master Data Management, Governance, Deduplication, Mastering, Data Flow Design are all factors
Process Integration
Two or more applications to complete a task
Orchestration and choreography
complex
long running transactions
dealing with state
Virtual Integration
you look into the other app.
State
Remote Process Invocation - Request and Reply
Salesforce invokes a process on a remote system, waits for completion of that process, and then tracks state based on the response from the remote system.
Process Integration
Data Integration
Synchronous
Types - Inbound
SOAP API
REST API
Web Services
Chatter API
Types - Outbound
Callouts - SOAP or REST
State
The remote system stores the Salesforce record ID or another external ID that is in both systems
The ID can be in both systems or only the master system
External Services fits this pattern (although there will not be any of that “new stuff” in the exam.
An example is credit card processing - you wait to see if the credit card has been approved, and charged.
Changes aren’t committed to Salesforce until the caller receives a successful response. For example, the order status isn’t updated in the database until a response that indicates success is received.
Apex web service or REST calls must be customized to send a unique message ID.
Operations that create records in the remote system must check for duplicates before inserting.
One-way SSL is enabled by default, but two-way SSL is supported with both self-signed and CA-signed certificates to maintain authenticity of both the client and server.
Small volume, real-time activities, due to the small timeout values and maximum size of the request or response for the Apex call solution.
Salesforce stores the remote system’s primary or unique surrogate key for the remote record.
The remote system stores the Salesforce unique record ID or some other unique surrogate key.
Remote Process Invocation - Fire and Forget
Salesforce invokes a process in a remote system but doesn’t wait for completion of the process. Instead, the remote process receives and acknowledges the request and then hands off control back to Salesforce.
Eg creating orders in an external system.
Process Integration
Asynchronous
Types
Canvas
Salesforce to Salesforce (OLD)
Outbound Email
State
Salesforce stores the unique key from the other system
Examples are
Platform Events (probably too new to be in the exam)
Outbound Messaging
Asynchronous Callout
For platform events the subscribing external system must be able to authenticate to the Salesforce Streaming API.
Platform events conform to the existing security model configured in the Salesforce org. To subscribe to an event, the user needs read access to the event entity. To publish an event, the user needs create permission on the event entity.
Use CometD to subscribe to platform events from an external client. Implement your own CometD client or use EMP Connector, an open-source, community-supported tool that implements all the details of connecting to CometD and listening on a channel. Salesforce sends platform events to CometD clients sequentially in the order they’re received. The order of event notifications is based on the replay ID of events.
Batch Data Synchronisation
Data stored in Lightning Platform (What is this doing in the official Salesforce documentation, I did not think it was called that in a long time) is created or refreshed to reflect updates from an external system, and when changes from Lightning Platform are sent to an external system. Updates in either direction are done in a batch manner.
Data Integration
Asynchronous
Inbound
Types
Bulk API (see Salesforce APIs )
Salesforce to Salesforce (OLD)
Email Services
Change Data Capture
Third Party ETL Tool
Use primary keys from both systems to match incoming data.
Use specific API methods to extract only updated data.
If importing child records in a master-detail or lookup relationship, group the imported data using its parent key at the source to avoid locking.
Remote Call-In
Data stored in Lightning Platform is created, retrieved, updated, or deleted by a remote system.
Process Integration
Sync or Async
Data Integration
Sync
Inbound
REST or SOAP APIs
Bulk API for large volumes
It’s also possible to make REST calls with a valid session ID that might have been obtained by other means (for example, retrieved by calling SOAP API or provided via an outbound message).
UI Update based on Data Changes
The Salesforce user interface must be automatically updated as a result of changes to Salesforce data.
Canvas
Streaming API
Data Virtualisation
Salesforce accesses external data in real time. This removes the need to persist data in Salesforce and then reconcile the data between Salesforce and the external system.
Salesforce Connect