Integration Patterns in Salesforce

Salesforce Integration Patterns & Best Practices – with Video

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

Posted

in

by


Related Posts

Comments

15 responses to “Salesforce Integration Patterns & Best Practices – with Video”

  1. mayank Avatar

    Beautifully explained the whole process. But if i need some custom features than how it would work?

  2. Naresh Avatar
    Naresh

    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. Jitendra Avatar

      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.

      1. Saikat Avatar
        Saikat

        Thanks Jitendra, this makes a lot of sense even for my current requirement.

        One follow up question for this scenario. If the validation rules themselves are mastered in another system & the draft quote details are validated from a real-time call to another system (to check everchanging LATEST UPDATED validation rules), does it make sense to create same validation rules in Salesforce side also, so that if sync fails due to bad quote data, user can fix that data & wait for resync, or flag that quote & move on?

  3. Rajeev Kumar Singh Avatar
    Rajeev Kumar Singh

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

  4. Rajeev Kumar Singh Avatar
    Rajeev Kumar Singh

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

  5. Dave Pattison Avatar
    Dave Pattison

    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?

  6. Vaishali Patil Avatar
    Vaishali Patil

    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.

  7. Vaishali Patil Avatar

    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.

  8. David Rabinak Avatar
    David Rabinak

    Hi Jitendraa, great blog and explanation as always! I am wondering about the scalability of the Platform events / CDC though. Especially with regards to syncing data out of the platform.
    I understand from Salesforce docs that there is currently platform event / change data capture a daily limit of delivered events to CometD clients – 50k per day.

    How I read that limit:
    If I used e.g. Mulesoft to subscribe to a Salesforce platform event / CDC then this 50k per day (24hours) would apply. But this 50k daily limit is also shared with CometD clients inside Salesforce e.g. EmpAPI component.

    Streaming API docs mention that the limit of delivered PushTopics is actually 1M per day (24 hours).

    Comparing 50k vs 1M seems a bit (I mean a lot) sad.

    Another comparison – Outbound messages do not seem to have allocations and limits around delivered messages (on the other hand there is the issues with potentially not delivering the messages in order)

    Almost as if the main use case was to use platform events / CDC for event driven architecture “inside” the Salesforce platform (potentially also allowing outside systems to publish on the event bus and subscribing inside Salesforce) but not to communicate outside?

    Am I misunderstanding the limits? Apart from this I am a fan of Platform events 🙂

  9. Rajashekhar Avatar
    Rajashekhar

    Thank you for the session.

    I am working on building integration framework document that helps to follow standard path to connect between systems. As we do have multiple integration patterns to connect systems, It would be tough to stick with single framework. Could you please share some ideas on building this.

  10. Happisales Avatar

    Thank you for the wonderful session.
    It really helped me to know the sales force integration pattern best practices.

  11. Abhishek Mathur Avatar

    Gone through the blog post and I must, I am very impressed by the details mentioned in here. Salesforce integration is a complex process and I think this post will prove very helpful for those who are looking for Salesforce integration services.

  12. Anamika Avatar

    Good article on Salesforce Integration.

  13. Preludesys Salesforce Integration Avatar

    Thanks for the blog. Salesforce Integration offers streamlined data flow to improve your decision making with critical insights on customer data.

Leave a Reply to HappisalesCancel reply

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

Discover more from Jitendra Zaa

Subscribe now to keep reading and get access to the full archive.

Continue Reading