The transactional email campaign gives you the possibility to connect your Retently account with Segment, and survey your contacts based on events triggered in other apps that you are using.

You can send the survey based on any type of events that you are tracking:

  • when the customer visits a specific page;
  • when the customer places an order;
  • if the customer performed a specific action in their account;
  • if the customer matches a specific set of rules;

And the list can go on.

Follow the step by step tutorial to learn how to configure a transactional email campaign in Retently, and how to connect it to Segment events.

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 contacts, 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 Segment event and only the contacts 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 Segment event that is fired when the customer places an order in your online store. You can pass customer properties to Retently, and in the Audience section you further filter your customers based on a particular property, such as "Country is USA", for instance.

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 Segment, 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 the campaign ID 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 the triggered events will result in a survey being sent. 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 a customer has been surveyed recently in this campaign, then any new triggered surveys will be discarded until a specific number of days have passed since the last survey was received. 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 contact 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 contacts 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.

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

Setup

In the Setup section, you will find the campaign ID, that you will need to add in your Retently destination in Segment.

NOTE: If the campaign ID is not displayed, then go back to the Schedule section and make sure that Segment is selected in your services drop-down menu.

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 an event from Segment. We will do this next!

Connect Retently campaigns with Segment events

In your Segment account, go to the Sources category, and access a source service that will trigger the transactional surveys in Retently.

In the source's "Overview" section, click the "Add destination" button and find Retently destination in the catalog.

NOTE: Not all sources support integrations, as some of them will only allow you to send data to warehouses. Make sure that the source you would like to trigger transactional surveys supports integrations.

In Retently's destination settings, you will have to configure the API key and map at least one transactional campaign with Segment events.

Configure API key

In the API key section, you will be asked to insert an API token generated in Retently.

To generate a token, access the “API Tokens” page. If you don’t have an API key generated yet, you will be asked to create a new one. Give the new key a name, and click the Generate API token button.

However, if you already have one or more keys, then you can either use one of the existing ones or simply generate a new one by clicking the Generate New API Token link.

After you have generated the token, add it in the API section of the Retently destination in Segment and save the changes.

Map campaigns with events

Next, access the "Map Retently campaigns with Segment events" section.

Here you will see two input fields. In the first field, you have to include the ID of the transactional campaign that you want to survey your customers in. You can copy the campaign ID from the Setup section of your transactional campaign.

Next to the campaign ID field, list the name of one or more track events that will trigger the survey in the specified campaign. Write the name of the event exactly as it's written in the `analytics.track` method (check more details in the chapter below). You can enter multiple track events, by separating them with a comma symbol (e.g., Place order, visit Dashboard).

If you want to survey your customers in different campaigns, based on different events, then feel free to add more rows and fill up the input fields accordingly.

Finally, save all the changes and make sure that your Retently destination is active.

From now on, every time a Segment event will be triggered, the contact will be added to Retently and a transactional email survey will be sent immediately or according to your campaign’s schedule.

Segment's track event

When a track event is triggered, Retently will perform the next actions:

  1. Identify the event name and try to match it with the campaign ID from the Retently destination settings in Segment. If no campaign ID has this track event name listed, then the event will be dismissed by Retently.
  2. If the track event name matches with a campaign ID, then Retently will look for the "properties" object passed with the track event and will create a new customer record in Retently using the properties listed in the object.

The only property that is required by Retently is "email". Any other property can be assigned optionally as customer properties in Retently. To learn how to manage customer properties via Segment track events read the next chapter in this tutorial.

If you aren't familiar with the Segment Spec, take a look at the track method documentation to learn about what it does.

An example call would look like:

analytics.track('Subscription Activate Button Clicked', {
email: "john.doe@example.com",
firstName: "John",
lastName: "Doe",
companyName: "ACME",
tags: "foo, bar, baz",
subscription_name: "Professional",
signup_date: "01/30/2020"
})

Segment sends Track calls to Retently as a `track` event.

Manage customer properties via Segment

Using the Segment integration you can assign and update customer properties every time a track event is triggered.


Create a customer property in Retently

In order to assign a property to the contacts that will be imported to Retently, you will have to create that property in Retently first.

You can create a customer property in your Retently account, in the "Props & Tags" category. To create a new one, click the "Create property" button.


A popup will ask you to write the name of the new property and choose the type of value that will be stored in the new property.

IMPORTANT: Your property name should not include any spaces or capital letters. Your property name should be identical to the property name that you are already passing to Segment from the source, in the track event. For instance, if you want to assign the date of when a user has been created, and the source service passes this property as "createdDate" then you should name your Retently property "createdDate".

Retently supports the following four data types:

  • Text: The value will be stored as regular text.
  • Number: This property can store only numbers (this data type also supports numbers with decimals).
  • Date: You can store dates in the MM/DD/YYYY format, or the standard ISO 8601 and RFC 2822 formats.
  • Collection: You can store an array of keywords (ex: "item 1, item 2, item 2").

Assign a property to a customer

After you have created the property in Retently, every time a Segment track event will be triggered, the contact will be added to your Retently account, along with the properties that are passed in the event's "property" object, and that match the ones that you have created in Retently.


Update the value of an assigned customer property

The values in a property that is already assigned to a customer will be updated automatically the next time a Segment event will be triggered and the contacts will receive another survey.


Unassign customer property

Every time an event is triggered, the contact's properties will be updated with the new values that will be sent via Segment to Retently. However, if no value is sent in a property for a particular contact, then the property will be unassigned from the customer's record in Retently.

Did this answer your question?