Salesforce Outbound Message Relay

In this post I’m gonna talk about how to relay the Salesforce outbound message to another environment. While trying to integrate Salesforce with another system, we usually use web service as method to communicate between the two. now the problem is that the outbound message can only send the message to publicly available servers.

This is not a good scenario because the publicly accessible servers is usually the production server, and doing development in production server is generally bad idea. A better approach would be if we have a message relayer that sits on the public server and then it forward any message to targeted environments, like for example the developer machine or our staging server.

Setting up the relayer

Before we go on, you should have some knowledge on the Salesforce Outbound Message itself, if not you really should read about it at|StartTopic=Content%2Fsforce_api_om_outboundmessaging_setting_up.htm|SkinName=webhelp.

Done reading that ?. cool, let’s move on

Below we got a simple example of Outbound Message Listener

It’s not really doing much at the moment, so let’s changed that

You might wonder where “account-dev” is coming from, it’s actually the endpoint name that i setup on my web.config that points to one of the dev machine. So it basically boils down to this steps

  1. Pass the endpoint to the generated NotificationBindingClient
  2. Copy the value that we want to pass in
  3. Return the response so the Salesforce outbound message doesn’t get timeout or bad response

Of course this post doesn’t talk about handling duplicate message in the outbound messages, and or how to build a queuing system to handle the outbound messages when under heavy load. There’s a good post already that you can find at

Leave a Reply

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