How To Send Outbound Message From Flow in Salesforce

Here is a step-by-step guide on how to send Outbound Message from a Flow in Salesforce. Salesforce introduced the capability to send it from Flows in its Winter ’22 Release. Before this the only option to send outbound message was from Workflow Rules.

So, what is an Outbound Message in Salesforce?

Outbound Message is one of the declarative features of Salesforce that you can use to integrate Salesforce with other external systems. The concept is simple. Whenever a record gets created or updated in Salesforce, send a SOAP API message to an external system.

A common use case is to create/update Account records in backend systems like ERP, Order Management System or Logistics System, whenever a new Account gets created or an existing Account gets updated in Salesforce.

And the beauty of this feature is that it is a declarative configuration, that won’t take more than 10-15 minutes.

How to send Outbound Message?

Configuring Outbound Messages is a two-step process:

  1. In the first step, define the outbound message, where you will select the object, fields from the object and specify an endpoint URL.
  2. In the second step, define what will fire this outbound message. There are four features in Salesforce that allow you to run automations on record creation/updation.
    1. Workflow Rules
    2. Process Builder
    3. Salesforce Flow
    4. Apex Trigger

The first three features (i.e. Workflow Rules, Process Builder & Salesforce Flow) falls under the declarative capability of Salesforce and Apex Trigger requires writing code. And since Salesforce has already announced that Workflow Rules & Process Builder will be deprecated by 2023, the best choice is to use Salesforce Flow.

In this guide, we will take a look at how to send outbound messages from the Flow.

For the endpoint URL, we are going to use a service called RequestBin. RequestBin allows you to create public endpoint to receive and inspect HTTP requests from any source, and easily inspect the headers, payload and more.

Here is a picture from Salesforce’s SOAP API Developer Guide explaining the flow of Outbound Message (just for your reference)

Salesforce Outbound Message
Salesforce Outbound Message Flow (Source: SOAP API Developer Guide)

And here is the detailed step-by-step guide with screenshots.

Introducing Mastering Salesforce Flows Training Course

Liked this guide? We are now offering a complete self-paced, video-based training course on Mastering Salesforce Flows. The course comes with downloadable step-by-step PDF guides, unlimited access, free upgrades, area to ask questions, free preview & 100% money back guarantee. For more details, please click here.

Need Help with Flows?

Need advice on Flows? I also offer advisory & consulting services on Salesforce Flows. So, whether you want to create new Flows or migrate existing automations (Workflow Rules, Process Builder, Triggers) to Flows, I can help you analyze, design, plan & review. To initiate a discussion, please submit the contact form here stating your requirement or book a 30-minute free discovery call at this URL.

References & Useful URLs

8 thoughts on “How To Send Outbound Message From Flow in Salesforce”

  1. Hi Ashish,

    This is really a great post and very useful!

    Could you help me out how can I load these outbound messages into let say file in Azure Data Lake or AWS S3?

    Thanks,
    Abhay

    1. Hi Abhay, you will need a listener on the other end to receive these outbound messages and process it. I am not familiar with Azure Data Lake but Amazon S3 is just a file storage system, so it can’t receive outbound messages. But just wondering, why would you want to save the messages in S3?

  2. Hi Ashish, great post!!

    1) This is called real time integration right?
    However in real scenario in general we wont not have the open endpoint, so the question is how can we authenticate and send the data using flow/outbound?

    2) Is it a good practice to do the same using apex REST callout? Would we end-up hitting the limit doing so, the limit is 100 callout per transaction and here in one transaction (creating/updating) only 1 callout will be used.
    So would you suggest to go with apex, if we need some custom logic too?

    1. Thanks Vicky,

      Outbound Message is not really real time. There could be some delay in sending the message as Salesforce tries to batch multiple requests together. If you go by Salesforce terms, the pattern is called “Fire & Forget”.

      For authentication, you can use Two Way SSL (more information at this URL – https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_om_outboundmessaging_setting_up.htm )

      I will not recommend using Apex REST Callout over Outbound Message because of following reasons:
      1. Apex REST callout will require custom development. OBM is a declarative feature and takes just a few minutes to configure.
      2. Outbound Message will keep retrying for 24 hours, so there is some resiliency built in. With Apex Callout, you will have to build this yourself.
      3. There is no limit on Outbound Message. Salesforce can include 100 notifications per message, so the endpoint must be able to handle it. But there is no limit as such.

      Hope this helps.

      Regards,
      Ashish

  3. Thanks Ashish, this is very informative – using OBM in Flows.

    Quick question:
    Q1: How and where do we change the Acknowledgement Response XML in true destination system (not RequestBin) ?
    As per your use case, let’s says SAP / D365 ?

    Q2: And is this a Standard XML response format that can be used anywhere, as-is ?

    Thanks once again!

    1. You are welcome Shikhir. The answer is yes for both the questions.

      1. At the endpoint URL where OBM is sent, you will need to ensure that the response XML is sent in the format expected by Salesforce
      2. This is standard XML response format that can be used anywhere as-is for OBM messages. Towards the end of the blog post I have also included the link to the Salesforce help article, where the message format is specified.

      Cheers,
      Ashish

Leave a Comment

Your email address will not be published. Required fields are marked *

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

Scroll to Top

Don't Miss Out on New Step-by-Step How To Guides on Salesforce...

…Subscribe to Our Newsletter!