Salesforce Webhook Guide¶
To use the Real-time trigger provided by Connect iPaaS for Salesforce trigger, you need to set up the workflow rules in your Salesforce instance. The Salesforce workflow rules allow Salesforce to monitor objects for certain changes and send an outbound message immediately to a designated endpoint. This endpoint is the external service URL provided by Connect iPaaS
.
Steps to setup Salesforce Workflow Rules¶
Setting up workflow rules requires the 'Customize Application' permission enabled under the Administrative Permissions tab.
To set up real-time triggers, please follow the below steps:
- Select trigger Object Created or Object Created or Updated depending on your requirement. They are the triggers that support a "real-time" mechanism.
- Select the specific entity type which you want to monitor for real-time updates.
-
Copy the generated endpoint URL to clipboard as shown in the screenshot below for creating your Salesforce workflow rule.
Figure 1. Salesforce Webhook URL -
Login to your Salesforce dashboard.
-
Go to Setup -> Create ->Workflow & Approvals ->Workflow Rules and click on the New Rule button.
Figure 2. Salesforce Workflow RuleFigure 3. Salesforce New Rule -
In Step 1 of the setup wizard, after clicking on New Rule, select a specific object to monitor in Salesforce.
Figure 4. Setup Salesforce Workflow Object -
In Step 2 of the setup wizard, set the workflow rule to be evaluated every time a record is created. Here, we set the rule criteria to be Created Date not equal to null. This indicates no record will ever have a null date for the field Created Date, and ensures that the workflow rule will always be triggered when a record is created.
Figure 5. Salesforce Workflow Criteria -
In Step 3 of the setup wizard, add a workflow action "New Outbound Message". This enables Salesforce to immediately notify Connect iPaaS whenever an object is created or updated, via an outbound message call to that endpoint URL.
Figure 6. Salesforce New Outbound Message -
Set up the outbound message using the endpoint URL that was copied in Step 3.
Figure 7. Edit Salesforce Outbound MessageChoose all the available attributes of the selected entity in the Salesforce portal.
Figure 8. Select Salesforce Outbound Message Fields -
Save the workflow rule and activate it.
Figure 9. Save Salesforce Outbound Message -
Return to Connect iPaaS to the workflow setup page and deploy the workflow after selecting desired actions and filter conditions. While the workflow is running, it should monitor newly created or updated objects in Salesforce and send event messages to Connect iPaaS.