Outbound message is used to send a message to external web services or an application when the record is created or updated in the Salesforce. Outbound messages can be triggered by using Workflow, Approval process, and Entitlement process.
Outbound message using PutsReq:
Here, I have taken the example scenarios for outbound messages from the workflow and took an external web services as PutsReq.
PutsReq allows to create a ‘Service Request’ and displays the request headers and body, and send Salesforce a successful acknowledgment.
Methods used in PutsReq:
- Update: While clicking ‘Update’ button, the response builder gets updated and its ready for the requests.
- Fork: While clicking ‘Fork’ button, the new URL gets a copy from the existing URL
- Clear History: While clicking ‘Clear History’ button, the selected URL history gets cleared.
Before Clearing the history,
After clearing the history,
- Destroy: While clicking ‘Destroy’ button, it will remove the entire URL and that URL no longer exists.
Configuration of Outbound messages in Salesforce using PutsReq:
Let’s see the steps in detail of configuring the outbound messages using PutsReq.
1.Use the URL as http://putsreq.com
2.Select ‘Create a PutsReq’.
3.Set up a SOAP Response.
In the response builder, SOAP response is added for a successful acknowledgement.
Usage of Response Builder:
Response builder is used to get the successful acknowledgement. This will be the response back to the Salesforce that the message was received successfully and no need to retry the message from Salesforce.
4.Select ‘Update’
5.PutReq URL should be specified in the Endpoint URL in the outbound message.
Outbound message URL:
Procedure to setup the workflow:
Setup the workflow rule to create an outbound message.
Path for creating workflow: Setup->Create->Workflow and Approvals->Workflow rules.
Set up the criteria in workflow and add an action as ‘Outbound messages’.
Navigation Path for creating outbound message: Add Workflow Action->New Outbound Message.
Specify the endpoint URL in outbound messages and select the field values that are to be included in the outbound message and save it.
Make the workflow as Active.
Triggering the workflow:
Create a Lead that meets the criteria and enter the fields which should be included in the oubound messages.
Request is updated to ‘1’ whenever the criteria is met.
The field values that are specified in the outbound message is triggered and also the first request time and last request time are monitored easily via PutsReq.
Modify the fields in the lead which are specified in the outbound messages.
Request is updated as ‘2’ after the record is created with specified criteria. Here, the update has been triggered because the workflow criteria is specified as ‘Created and Every time Edited’.
Here, the time difference between First Request and Last Request is displayed exactly with minutes and seconds. By clicking that, we can see the exact responses from each request.
Field values are changed as updated in the lead record
This is how the outbound messages can be validated by using PutsReq.
Usually we validate the outbound message by using debug log. It will not show the exact field that gets updated. It shows only true or false with the status. It was little difficult to understand and it was so clumsy to see.
By using PutsReq, we can see the exact fields that are updated and the outbound messages can be validated easily by using PutsReq and also it can be monitored easily.
Delivery status of outbound messages:
If any failure occurs while triggering the outbound messages, it can be monitored in the ‘Outbound Messaging Delivery Status’.
If PutsReq doesn’t return any acknowledgement back to Salesforce for the outbound message, Salesforce will keep resending of the outbound message for next 24 hours. So if the PutsReq window gets refreshing, the same message is landing again and again. To avoid this, we want to stop Salesforce from resending the message again and then delete the message from Outbound Message Queue in Salesforce.
Refer the link to verify the details about tracking the delivery of outbound message status: