I have a production salesforce instance sending outbound message to production Endpoint URL. However, upon sandbox refresh, the outbound message will be copied to sandbox, which results in outbound message from sandbox sent to production Endpoint URL.
What's the best way to deal with this situation?
I have three ideas:
1. Let the server to distinguish production vs sandbox.
Server may determine where the message came from based on EnterpriseUrl
field. If this field starts with https://cs
, it is from sandbox. Likewise, if this field starts with https://na
, it is from production.
2. Take advantage of Custom Settings.
Try to set Outbound Message Endpoint URL with the URL defined in the Custom Settings. Unfortunately, it does not seem to work. Any ideas on this approach?
3. Change the Workflow Rule to only send Outbound Message from production.
In the workflow rule, specify a criteria, where the Org Id has to be the same as the production Org Id. Otherwise, don't send outbound message.
This idea is explained in the following blog:
http://simplysfdc.blogspot.sg/2013/08/salesforce-how-to-make-validation-rule.html
Any suggestions?