Quantcast
Channel: Dyspatch Blog – Dyspatch
Viewing all articles
Browse latest Browse all 259

How to Send Email like Uber

$
0
0

Uber is a company built around the customer experience; from the slick app to professional drivers, every step is designed to convey a professional brand and experience.  One of my favorite parts of the Uber customer experience is the receipt email you get after taking a ride. Why? Aside from being an email buff, Uber does an exceptional job of including Dynamic Content in the subject line of every ride receipt.

Take a look at a snapshot from my inbox:

Dynamic Content in Uber ride receipts

Dynamic Content in Uber ride receipts

With every receipt you receive from Uber, the subject line dynamically includes the a simplified version of the time of day. Instead of, “Your Sunday 8:15AM PST trip with Uber“, Uber simplifies it to just “Your Sunday Morning trip with Uber“. This is a simple example of how important Uber views the customer experience, and a great example of Dynamic Content.

What’s Dynamic Content?

Dynamic Content is content that changes for each individual recipient. In the Uber example, a calculation is performed on the time of day and instead of the date and time being shown, a simple string like “Monday afternoon” is replaced. Each time Uber sends a receipt email, a template engine renders the email with dynamic content.

You can think of it as variable replacement (or “merge tags”) on steroids. Another great example of dynamic content would be changing an image in every email depending on what city your recipient is based in.

Why does Dynamic Content matter?

Email, especially transactional email, is a direct extension of your product and so functions as a reflection of how much you care about your user experience. An email triggered by taking an action on your site should feel like a reward for their engagement, and using dynamic content in your emails is a great way to move in that direction.

youvegotpuppy

In short, you’ve gone to great lengths to make sure every other facet of your online presence has some life to it, it’s time to stop overlooking email in that chain.

I’m sold, how do I send email like Uber?

It’s really easy… if you’re using a template engine like Sendwithus. There are definitely ways to get this working with other systems, but the following code you can drop into a Sendwithus template and have it working right away.

First up, let’s talk about how we’re going to break down the day. This might change in different countries (and Sendwithus’ internationalization support could handle it!), but this breakdown will cover most of North America:

Time of Day Simplified Form
5am to 12p Morning
12p to 5pm Afternoon
5pm to 8pm Evening
8pm to midnight Night
midnight to 4am Late Night

In your Sendwithus, we’re going to assume you’re sending a transactional email with a unix timestamp variable called “event_time”. Open up the template you want to add dynamic content to, and drag open the subject line box (see below):

drag here

Copy and paste the following code into the subject line box:

{% set hour = int(event_time|timestamp_to_time|datetimeformat("%H")) %}
{% set day = event_time|timestamp_to_time|datetimeformat("%A") %}
{% if hour >= 5 and hour < 12 %}
{% set daytext = "Morning" %}
{% elif hour >= 12 and hour < 17 %}
{% set daytext = "Afternoon" %}
{% elif hour >= 17 and hour < 20 %}
{% set daytext = "Evening" %}
{% elif hour >= 20 and hour < 24 %}
{% set daytext = "Night" %}
{% else %}
{% set daytext = "Late Night" %}
{% endif %}
{{ day }} {{ daytext }}

Go ahead and save your template and you’re ready to go! To get an idea of what this will look like in production, send a test email directly from your app, or use the built in previews in Sendwithus. Open up the preview pane and add a value for the “event_time” (in this example I’m using 1424197820)

add variable

Add event_time and Show in Browser

 

Here’s an example of what one of my tests looked like:

Example "Tuesday Late Night" dynamic content

Example “Tuesday Late Night” dynamic content

Wrapping up

This is just one example of how dynamic content can be used to make transactional email really great. We can already see many breakout companies like Uber and AirBnB put a real emphasize on the email experience, and this trend is definitely here to stay. There are many other creative ways to use dynamic content, but this in particular is a fairly easy way to make things just a little more personal.

If you’ve seen any amazing uses of dynamic content, or want to know if something else is possible, hit us up either in the comments below or on twitter.


Viewing all articles
Browse latest Browse all 259

Trending Articles