Heroku - 19 Messages Outbound Introduction

This lesson covers the second way to integrate Salesforce with Heroku: Outbound Messages. The mechanism is different from Heroku Connect, but because it has virtually no data volume limit and adds no extra cost, it may be the right fit for your use case. An Outbound Message is essentially a message that Salesforce sends to an external application — for example a Heroku app — typically when a record in a Salesforce object is created or updated.

What you need to set up an Outbound Message

Three pieces are required:

  • An object — a Salesforce table on which an Outbound Message is configured. A change in the table's fields will trigger the message.
  • A rule — a workflow rule that decides whether the message should actually be sent for a given record. You normally do not want every change to trigger a message; the rule filters which ones do.
  • An external application — for example a Heroku application that receives the message, processes it, and may, for instance, store the data in a database for later use.

Concrete example: imagine an app that manages employees in a company. The Salesforce Account object tracks employees with the fields Name, Company, Type and Phone. A rule says: only Accounts of type "employee" trigger the message. If we update the phone number on an Account of type "employee", the new value triggers an Outbound Message and the rule validates it, so Salesforce sends the message to the external app. If we update the phone number on an Account whose type is "customer" instead, the same update happens, but the rule rejects it and no Outbound Message is sent.

Receiving messages: XML payload and ACK/NACK

On the receiving side, the first thing to know is that Outbound Messages are sent as XML. XML is a slightly outdated format compared to today's JSON, which can make parsing cumbersome — in some languages, you will need a dedicated XML parser to turn the payload into structures you can manipulate easily.

Once the external app has processed the message, it must reply to Salesforce. There are two possible answers:

  • ACK (acknowledge) — signals success. You typically send ACK after the data has been processed and stored in the database.
  • NACK (not acknowledged) — or no answer at all. Salesforce interprets this as a failure and will keep retrying for up to 24 hours. After 24 hours without an ACK, Salesforce gives up on that request.

Limitations

The biggest limitation is that Outbound Messages are one-way: Salesforce can send them to Heroku, but Heroku cannot reply by pushing data back through the same mechanism. That makes Outbound Messages unsuitable when you need true two-way interaction. Another important limitation is that deletes do not trigger Outbound Messages: if you delete a row or remove data in Salesforce, you cannot configure an Outbound Message to notify the external system of that deletion. In short, Outbound Messages let you push a record to an external application every time a configured change happens, with practically no data limit, which makes it a great option for integration — but its one-way nature means it is not always the first choice. See you in the next lesson.

Summary

Salesforce Outbound Messages enable seamless integration with external applications like Heroku by automatically sending data whenever a field change occurs in Salesforce. This lesson introduces the core concepts: how Outbound Messages are triggered by field updates, the three essential components needed (a Salesforce object, a rule/filter, and an external application), and how to handle inbound responses using ACK (success) or NACK (failure) acknowledgments. Unlike other integration methods, Outbound Messages come with no additional cost and minimal data limitations, making them an attractive option for unidirectional data synchronization.

Key points

  • Outbound Messages are Salesforce-generated payloads sent to external applications (e.g., Heroku) when a field update occurs on a tracked Salesforce object
  • Three required components: (1) a Salesforce object with an associated workflow rule, (2) a workflow rule that filters when messages are sent, and (3) an external application to receive and process the messages
  • Outbound Messages are generated in XML format and require parsing by the receiving application; ACK/NACK responses indicate success or failure (NACK triggers 24-hour retry attempts)
  • Outbound Messages are unidirectional (Salesforce → external app only) and cannot be triggered by data deletion, making them unsuitable for bidirectional integrations
  • No additional cost and virtually no data limitations compared to other integration methods (e.g., APIs)

FAQ

What triggers an Outbound Message to be sent from Salesforce?

An Outbound Message is sent when a field is updated on a Salesforce object that has an associated workflow rule configured to trigger it. For example, changing an Account's phone number can trigger a message if a rule for that object is active.

What should an external application do after receiving an Outbound Message?

The application must parse the XML payload, process the data (e.g., store it in a database), and send back either an ACK (acknowledgment of success) or NACK (negative acknowledgment indicating failure). If NACK is sent, Salesforce will retry sending the message for up to 24 hours.

What are the main limitations of Outbound Messages?

Outbound Messages are unidirectional (only Salesforce sends data to the external application) and do not trigger on data deletion. This makes them unsuitable for bidirectional integrations or scenarios requiring delete event notifications.