Outbound messages nowadays is a rather out-dated technique and belongs more to the dinosaurs of Click-Integrations. However, there are still some unique scenarios where they might be more applicable than e.g. Platform Events. While both send data without really requiring a follow-up, Outbound messages do require an Acknowledgement.

That part is exactly what this article is about. When Salesforce doesn’t receive the exact Acknowledgement message, it will continue to send the Outbound message, following a retry-mechanism. And that is exactly something Platform Events do not provide out-of-the-box.

To mitigate receiving the same outbound message several times, it is crucial to send the Acknowledge when the message is received. Such Acknowledgement is send in SOAP-XML structure, as below:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <notificationsResponse xmlns="http://soap.sforce.com/2005/09/outbound">

Duplicating requests

Next, it is important to know, Salesforce is not very keen on tightening their end. Documentation specifies it might occur that one message is send multiple times, even when Acknowledgement was received, or not send at all within 24 hours. Therefore, it is highly recommended to keep track of e.g. the NotificationIDs retrieved in the last 60 minutes on the listening party. This will prevent duplicated processing.

The NotificationID can be found in the Outbound Message Request as can be found below (e.g. 04l0800002nrC5BAAU).

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <notifications xmlns="http://soap.sforce.com/2005/09/outbound">
      <SessionId xsi:nil="true"/>
        <sObject xsi:type="sf:Opportunity" xmlns:sf="urn:sobject.enterprise.soap.sforce.com">
          <sf:Name>GenePoint Lab Generators</sf:Name>
          <sf:StageName>Id. Decision Makers</sf:StageName>
          <sf:Type>Existing Customer - Upgrade</sf:Type>

How useful was this post?

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a comment

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