Salesforce Integration Patterns & Best Practices – with Video

When to use which integration patterns in Salesforce along with best practices. Video to show how to use Outbound message to integrate Salesforce without writing code

Integration Patterns in Salesforce

Recently I gave talk in one of most active webinar of Salesforce ecosystem today – Apex hours on topic Integration Patterns and Best Practices in Salesforce.

Response was more than expected and questions were high quality. Therefore, I thought to quickly write high level summary of presentation in this blog post along with Youtube video that you can find towards the end of this post.

Firewall, Proxy and Reverse Proxy

Before integrating anything with Salesforce, as per Architect, it is necessary which system components are important for security and may impact with integration pattern to be used.

Firewalls : It controls and protects Malicious Traffics. Firewall can be hardware or software based.

Proxy aka Forward Proxy : Proxy normally configured in your browser or systems like VsCode, data loader, eclipse to hide your actual identity. Every outgoing request transmits through proxy server to make sure external systems unaware about your true origin and identity

Reverse Proxy : Its used by Web Servers and sits before it. It can server any purpose like authentication or perform security related stuff. Best example is Mulesoft where we can configure API proxy which is used to apply throttling, avoiding DoS attacks or applying SLA as per licenses provided to customer

Factors affecting Integration Patterns

At high level, there are five types of integration patterns in Salesforce

  1. Request and Reply
  2. Fire and Forget
  3. Batch Data Synchronization
  4. Remote Call In
  5. Data Virtualization

1. Request and Reply

Few options available in request & reply integration patterns

  • External Services
  • LWC, Visual force calling external system
  • Callouts from Trigger
  • Batch Apex invoking external system

2. Fire & Forget

Fire & Forget – Platform event created by Apex / Code
Fire & Forget – Outbound Messages
Fire & Forget – Callout using Apex (Sub optimal Solution)

3. Batch Data Synchronization

Salesforce Integration Pattern – Batch Integration

4. Remote Call-in

Salesforce Integration Pattern – Using Standard SOAP or REST API to perform DML in Salesforce
Salesforce Integration Pattern – Using custom API built via Apex (Sub Optimal)

5. Data Virtualization

Youtube Video on Salesforce Integration Pattern

Apex hours video – Salesforce integration patterns and best practices

Reference

Related posts

8 thoughts on “Salesforce Integration Patterns & Best Practices – with Video”

  1. Which pattern to use for the scenario –

    Lets say we have a home grown quoting application and have to use it for quoting needs from Salesforce, so inorder to sync quotes between two systems, 1. we create a quote in Salesforce 2. invoke the home grown quoting app’s webservice with the quote details from Salesforcce (step 1 like quote id, opp id) to create the quote in home grown application 3. if the callout is successful, update the salesforce quote with the external id from the callout response. 4. If the callout is not successful, then delete the salesforce quote. This seems to be a simple requirement that’s seen in integrations, but in the approach we have taken, we face a lot of overhead and with the platform limitations have to put in workarounds. What is the best practice used in the industry to handle these kind of integration scenarios with other systems from Salesforce? 

    1. It seems you requirement is realtime but dont understand what is process around external Quote Id ? Another patter that you can think of – Build validation rules in SF similar to external process, Let user save quote in Salesforce with intermediate status like Draft. Let ESB run every x hour and pull quote from Salesforce and push to external system and write back Id. If sync fails, add error message in Salesforce that why sync fail and let user fix that error instead of deleting quote.

  2. Thank you. This is great session.
    Could you please help me out how we can send real time data to Salesforce from legacy system.

  3. If third party entered any record then same record should be enter in our Account record. How we can achieve this bidirectional Integration.

  4. I am enjoying viewing this session but I wonder why you don’t mention the Streaming API (PushTopic) as an integration pattern option? I Get that Platform Events can achieve the same thing. But Governor Limits on platform events, as in how many you can publish in a day, are far more restrictive, aren’t they? And with CDC you send ALL changes. But if all you want to do is to distribute changes to a subset of fields on a subset of records, are PushTopics the best option for that?

  5. Thank you for wonderful session.

    I am having multiple requirements and want to check feasibility of platform events.

    1. On Opportunity close I need to update multiple external applications Currently I am using multiple Batch APEX approach and running the batch in every 10 mins. While performing this API callouts need to generate JSON request with multiple fields on opportunity and opportunity child objects. In some of the cases external systems are updating my opportunity as callback using SF data API/composite API. Can I use platform event as Fire and forget to notify external systems and the call back will remains same as is?

    2. There are multiple future calls in opportunity process execution, Can I replace future calls with platform events?

    3. The current daily volume of cases is very huge around 75 K opportunities per day and I am using Enterprise edition org. Will platform event suitable for such high volume of cases per day.

  6. Thank you for wonderful session.

    I am having multiple requirements and want to check feasibility of platform events.

    1. On Opportunity close I need to update multiple external applications Currently I am using multiple Batch APEX approach and running the batch in every 10 mins. While performing this API callouts need to generate JSON request with multiple fields on opportunity and opportunity child objects. In some of the cases external systems are updating my opportunity as callback using SF data API/composite API. Can I use platform event as Fire and forget to notify external systems and the call back will remains same as is?

    2. There are multiple future calls in opportunity process execution, Can I replace future calls with platform events?

    3. The current daily volume of cases is very huge around 75 K opportunities per day and I am using Enterprise edition org. Will platform event suitable for such high volume of cases per day.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.