Integration is essential for every application nowadays. We need some kind of integration while developing any small or enterprise-level business application. While integrating we have to follow some kind of pattern so that our integration will comply with integration best practices. We have many types of integration patterns in Salesforce. This post will explain all Salesforce patterns.
Integration Categories
We can use integration for a different purposes. Integration in Salesforce can be divided in below three categories.
1. Data Integration
This type of integration is required when we have to synchronize data between two different systems. We have to take care of master data management (MDM), data governance, mastering, de-duplication, data flow design, and others.
2. Process Integration
This type of pattern is required when we need some action in an external system based on some logic in the current system. Once both system’s tasks are completed then only the transaction is counted as complete.
3. Virtual Integration
Virtual integration is required when we need to show real-time data from an external system but don’t need to store those data in Salesforce.
Integration Patterns
Based on the above categories we have below types of integration patterns.
Request and Reply
Salesforce invokes a process on an external system, waits for completion of that process, and then
update data in Salesforce based on the response from the external system. This pattern work in a synchronous way. Below are examples where this type of pattern is used.
- REST API where you need a response
- Salesforce Lightning components or pages initiating a SOAP or REST callout in a synchronous manner
- A custom Visualforce page or button that initiates an Apex HTTP callout in a synchronous manner
- A trigger invoked from Salesforce data changes that perform a SOAP or HTTP callout in a synchronous manner
- A batch Apex job that performs SOAP or HTTP callouts in a synchronous manner
This pattern falls under both data integration and process integration.
Fire and Forget
Salesforce invokes a process in an external system but doesn’t wait for the completion of the process.
The external system receives and acknowledges the request and then hands off control back to Salesforce. In this pattern, the immediate response is not expected by Salesforce. This pattern work in an asynchronous way. Example of fire and forget pattern
- Process-driven platform events
- Customization-driven platform events
- Workflow-driven outbound messaging
- Batch Apex job that performs an Apex SOAP or HTTP asynchronous callout
- Trigger that’s invoked from Salesforce data changes that perform a SOAP or HTTP asynchronous callout
- Custom Lightning component or Visualforce page that initiates an Apex SOAP or HTTP Asynchronous callout
This pattern falls under both data integration and process integration.
Batch Data Synchronization
Salesforce applications can easily integrate with any system. Organizations use a different system for different use cases but they want all data should be stored in a central storage location. This central storage should be always in sync. In this case, we can use batch data synchronization pattern. We can sync data bi-directional. We can create batch jobs and schedule them to run when the system is less utilized.
We can also use streaming events to sync data when records are changed in Salesforce. Example of fire and forget pattern
- Billing System Sync
- ERP System Sync
This pattern falls under both data integration and process integration.
Remote Call-In
When an external system wants to extract/update detail in the Salesforce system then this pattern is used. The external system can use Salesforce REST API, SOAP API, or Bulk API to sync data in the Salesforce system.
This pattern falls under both data integration and process integration.
UI Update Based on Data Changes
When we need some kind of update on the lightning component/page then we can use this kind of pattern. Like our product page is showing a number of available quantities, it should keep updating based on product availability without any refresh. We can use streaming API for this kind of pattern.
This pattern falls under both data integration and process integration.
Data Virtualization
Salesforce accesses external data in real-time. Data is not saved in Salesforce. Data reconciliation is done between Salesforce and the external system.
This pattern falls under virtual integration.
Explanation Video:
Reference:
Related Posts:
Salesforce Integration Interview Questions
AWS Signature 4 Signing in Salesforce
Salesforce Integration Architecture Certification Series
What is Monolithic Architecture?
What is Microservice Architecture?
2 comments
[…] Types Of Integration Patterns in Salesforce […]
[…] for Asynchronous ApexSalesforce Integration Interview QuestionsSalesforce Apex Interview QuestionTypes Of Integration Patterns in SalesforceDifference Between Custom Setting and Custom Metadata TypeWhat is PK Chunking?What is Data […]