Salesforce: Fire Outbound SOAP Message Using Apex
I have an existing workflow rule that triggers or updates a specific object type (SOAP) Outbound message . This works great.
I want to expand it so that a similar outgoing message is also sent when objects are deleted.
As per this discussion , Workflow rules cannot be created for fire based object removal, so I need to write an Apex Trigger instead.
So the question is, how can I trigger an outbound SOAP message from Apex?
a source to share
I'm new to here, so I can't add a comment to weesilmania's post, but I wanted to point out something important. The outbound messaging feature in salesforce is pretty bearable and reliable. If the endpoint goes down for a while, or if the network connection between the merchant and your server is rough, salesforce will retry the outbound outbound message within 24 hours.
Doing the vertex alignment that happens on the trigger will work, but it gets fired and forgotten. Keep this in mind if you use this option.
a source to share
The real "Outbound message" (created as an object somewhere in the "Setup" application, with merge fields, etc.) - I don't know.
Your own HTTP request, in which you define your endpoint, as well as a payload that might be a valid SOAP envelope - take a look here and here to get started.
a source to share