Before reading this article, make sure to check our documentation on using Zapier to set up transactional email surveys in Retently.
The main problem with the Salesforce app in Zapier is that all their triggers are mostly tracking new events that happen in Salesforce, such as New lead, new contact, new case etc.
A common use case Retently clients have is to track when something changes in an existing contact’s record, or existing lead, which isn’t offered by default in Zapier.
The great news is that you can accomplish this, but it will take a quick adjustment in your Salesforce account.
Start with creating a new Zap in Zapier, and choose Salesforce as your trigger app.
On the “Choose trigger” step, click on the “Show less common options” link and choose the “New outbound message” trigger.
Click Save and you will be asked to connect your Salesforce account. Once you’ve done that, you will be given a webhook link from Zapier. For now, just copy and save it for later.
The next thing you should do is create a custom Workflow rule in your Salesforce account.
In the Salesforce setup area, you will need to create a new Workflow Rule.
This rule will allow you to set the conditions that will trigger the outbound message to be sent out. This is what will trigger your Zap.
In the example below, this workflow will trigger when a contact’s tag is updated. In our example, we set to only track tags that contain the “retently” keyword in them:
Let’s dive into details about filling up all the input fields in the Workflow Rules builder so it satisfies our requirements:
1. Select “Contact” as the object to which this workflow applies:
2. On the next step, give your rule a name, for instance, “Contact update”. Then, select the “created, and every time it's edited” option as the evaluation criteria. And finally, for your rule criteria, choose:
Field: Contact tags
IMPORTANT: The object of the workflow and the rule criteria from the example were set up so that they fit our requirements. You are free to choose any other options available in your Salesforce account and that work best for you.
Make sure the workflow is active:
Once you have saved that workflow, on the new screen that appears under "Immediate Workflow Actions" use the "Add Workflow Action" drop-down, choose "New Outbound Message" like this:
Here you can choose the object and the fields from that object that you want to send to your Zap. You will also need to enter the Webhook URL from your Zap's Trigger options in the "Endpoint URL" field like this:
When you have done that you can come back and finish setting up your Zap. This workflow will send an Outbound Message when your workflow triggers, which will trigger your Zap.
Now, back in your Zap builder, click on the “Ok, I did this” button. Then Zapier will perform a test and will try to pull a sample of an Outbound Message:
If it takes too long for the sample to be displayed, then you might want to update your contact’s tag (or any other action you chose when creating the workflow) and then run this step again.
If everything works ok, then continue with setting up Retently as your action app.