Set up Salesforce transactional email surveys
The transactional email campaign gives you the possibility to survey your customers based on events triggered in your Salesforce workspace.
Some of the most common scenarios are:
To survey a customer after their case is marked as closed and won, in order to understand what they liked most about your products or services;
To survey a customer after their case is marked as closed and lost, which will help you collect more details about the things that went wrong and resulted in your customer’s churn;
To survey a customer after a specific profile update. Let’s say that you’re a SaaS company, running on a subscription model, and you offer your clients a free trial before they have to commit to a paid subscription. If you store their subscription type in a property, then you can send a survey after that property is updated as the customer switches from “free trial” to “active” or “cancelled”.
There are endless possibilities for your Salesforce triggers, but you can definitely set up one or more that will fit your business goals.
Follow the step by step tutorial to learn how to configure a transactional email campaign in Retently, and how to connect it to Salesforce events using a webhook link.
Set up a transactional email campaign in Retently
To create a new campaign, go to the Campaigns page, choose a survey metric (NPS, CSAT, CES, 5-STAR), next select email as your survey channel, and from the dropdown list with campaign types, select the Transactional option.
Assign a survey template
In the campaign editor, start with choosing the survey template that your customers, who match this campaign, will receive in their Inbox. You can select an existing email template, or create and customize a new one.
Make sure the survey template has your company’s logo, otherwise you will not be able to select and use it.
When everything looks ok, hit the Assign button to add it as the main survey template in your campaign.
Filter your audience
As a rule, your campaign audience will be defined by the Salesforce event and only the customers that trigger the event will be surveyed in this campaign.
However, you can apply an additional layer of filters to narrow down your audience.
Let’s assume that you have a Salesforce event that tracks all customers with a closed case, and you are also storing the country of your customers as a tag. This would allow you to add some extra filters in Retently and survey only customers that live in a particular country.
Your audience filters would look as in the example below:
In most cases, there is no need to adjust the audience filters at all. But, if you have to, we recommend checking our article to learn more about audience segmentation in campaigns or you can request assistance from our support team.
Edit the survey schedule
The first thing to do in the Schedule section is to specify how your surveys will be triggered. Since we are configuring this campaign for Salesforce, choose this service from the drop-down menu.
NOTE: It’s important to select the needed service because the content on the Setup page will adjust based on your choice. For our goal, we will need a webhook link that will be automatically generated and available for you to copy in the Setup section.
Next, you have three options that will help you configure how and when your surveys will be sent to your campaign’s audience:
Sample audience: Choose what percentage of triggered events will be surveyed. When switched off, all triggered events will result in a survey.
Delay survey: Send the survey at a later date from the triggered event. When switched off, the survey will be sent immediately.
Throttle survey: Throttle helps avoid over-surveying customers if they have been surveyed recently in this campaign. When switched off, customers will be surveyed in this campaign every time they trigger an event. This option won’t affect the schedule in other campaigns.
Reminders will help increase your survey response rate. For instance, if a customer didn't respond to your survey within three days after opening it, our system will send them a reminder email survey. This way, you will be reaching your customers once more when they might be more likely to answer the survey.
Moreover, you can choose a different survey template for your reminders, with different wording or style, that might be more appealing to your survey respondents. You can create a new email survey template in the Templates section of your campaign, or on the Templates page.
In the Alerts section, you can create custom notifications and keep track of your progress.
When creating a new notification you will be asked to choose one or more event types you want to be notified about, the notification frequency (immediately, daily, or weekly digest), and the channel (email or Slack).
Don't forget to save your alerts and make sure they are enabled.
In this section, you can create a set of email auto-responders meant to engage with contacts who did not leave any text feedback, left a Detractor score, or simply ask Promoters to leave their reviews on specific platforms and spread word-of-mouth. Autoresponders will be sent to respondents with a random delay between 5 and 60 minutes from the moment they've answered the survey.
Use webhooks to send requests to web applications every time an event occurs. Webhooks allow you to send HTTP requests to another web application every time an event is triggered, be it new feedback, a bounced survey, or an unsubscribed contact. Don't forget to save each created webhook and make sure they're enabled.
In the Setup section, you will find a unique webhook link that will be used to receive customer data from Salesforce and trigger the transactional survey. Make sure to keep this link handy because you will need it soon when configuring the Salesforce event.
NOTE: If the webhook link is not displayed, then go back to the Schedule section and make sure that Salesforce is selected in your services drop-down menu.
Activating your campaign
The final step is to activate the transactional email campaign by switching the toggle button ON.
No surveys will be sent just yet because we haven’t connected the campaign to a Salesforce event. We will do this next!
Set up Salesforce events for your survey campaign
Create a Salesforce Outbound Message
Outbound Messages are Salesforce actions that you can assign to Salesforce Flows events. In an Outbound Message, you can select what Salesforce fields you need to export, and you will have to pass a webhook link (e.g., Retently's webhook link) where those fields will be sent.
To get started, log into your Salesforce account, access the Setup area, and type "Outbound Messages" in the search field.
On the Outbound Messages page, click the "New Outbound Message" button.
On the next step, choose "Contact" as the message's object.
In the Outbound Message edit page, the most important part here is to include the Retently webhook link that was generated in your campaign’s Setup section. Include the link in the “Endpoint URL” input field.
Next, choose the properties that you want to send to Retently along with your customer record when the survey will be triggered. Learn more about importing contact properties from Salesforce to Retently.
NOTE: The only mandatory property is the email address of your contact.
Finally, save your Outbound message. You will need to assign it later to a Salesforce Flow.
Create a Salesforce Flow
Now we can start creating our Salesforce event that will trigger the survey. The event is composed of a Flow connected to an Outbound Message.
To get started, access the Setup area and type "Flows" in the search field.
Next, click the "New flow" button.
When creating the new flow choose the "Record-Triggered Flow" option.
Next, you will have to configure your flow's event, which is represented by a set of rules that will eventually trigger the survey in your transactional campaign in Retently.
Select “Contact” as the object to which this workflow applies:
Next, choose an option that will trigger your flow:
A record is created
A record is updated
A record is created or updated (recommended)
A record is deleted
For the entry conditions of your flow, choose an option that works best for you. For example, if your flow will have multiple conditions, choose whether all conditions should be met, or at least one condition, or you can create a custom logic.
Afterward, you can configure the rules that will trigger your flow and will subsequently send the survey in Retently.
And on the next step is an important configuration asking you when exactly should the flow run if a contact is updated:
Every time the contact is updated and meets the conditions: This means that no matter what is updated in the contacts record, as long as the contact matches your conditions, the flow will be triggered. If this option is selected, this might result in multiple surveys sent to the same person.
When the contact is updated TO MEET the condition: This means that the flow will be triggered only if the contact started to meet your conditions after an update. This is the recommended option.
Once you've configured the flow, you will be redirected to the flow's visual builder. The next step is to add an action by clicking the + icon.
From the "Interaction" menu, choose the Action option.
In the Action popup, type in the name of the Outbound Message that you have just created.
And give the Outbound Message a specific label and API name. You may not need the name and the label further on, but since these are required, make sure to type something meaningful, that would describe what you're trying to accomplish with that Outbound Message.
After you've assigned the Outbound Message as an action, click "Save".
You can run a quick test and see if your flow works ok. To do this, click the "Run" button, and after a few seconds, check your Outbox page in Retently to see if a survey was sent to a contact that has matched your flow's trigger rules.
If everything looks ok, then you can activate your flow by clicking the "Activate" button, and from that moment on, every time a contact will match your flow's trigger rules, the contact's data (selected in the Outbound Message) will be sent to your Retently account, where a new contact record will be created (or updated, if you already have a contact with that email address) and a transactional email survey will be sent to the contact.