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 the 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

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 a 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.

Notifications

In the Notifications 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 notifications and make sure they are enabled. 

Autoresponders

In this section, you can create a set of email auto-responders meant to engage with customers who did not leave any text feedback, left a Detractor score or simply to 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.

Webhooks

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 customer. Don't forget to save each created webhook and make sure they're enabled. 

Setup

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 Workflow Rule and Outbound Message

Now we can start creating our Salesforce event that will trigger the survey. The event is composed of a Workflow Rule connected to an Outbound Message.

Log into your Salesforce account, and access the Setup area, where you will need to create a new Workflow Rule. 

This rule will allow you to set the conditions that will eventually trigger the survey in your transactional campaign in Retently.

For this tutorial, our scenario is to track when a contact’s case is marked as closed. 

Let’s dive into the details about filling up all the input fields in the Workflow Rule’s builder so that it satisfies our requirements.

Select “Case” as the object to which this workflow applies:

On the next step, give your rule a name, for instance, “Case closed”. Then, select the “created, and every time it's edited” option as the evaluation criteria. Finally, for your rule criteria, choose:

  • Field: Case status
  • Operator: equals
  • Value: Closed

You can read more about creating workflows in Salesforce here.

Once you have saved the workflow, on the new screen that appears, under "Immediate Workflow Actions" use the "Add Workflow Action" drop-down, and choose "New Outbound Message" like this:

You can read more about creating new outbound messages in Salesforce here.

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 and make sure that your Workflow Rule is active.

From now on, every time a contact will match your workflow rule criteria, the outbound message will pass the data through the Retently webhook link and the contact will be created (or updated) in Retently, and the survey will be sent based on your schedule settings.

Check our tutorial on how to set up custom fields in Salesforce that will store your contacts' last score and feedback.

Did this answer your question?