Email as a Service as a Service

By now, you know that Mandrill provides tools for building out your email infrastructure. What you may not know, however, is that the tools can also be used to pass value down the chain to your own customers. Today we're going to examine how one of our customers has done just that with some of our more advanced email platform features.

In their own words:

"Mandrill's turnkey email platform allowed us to migrate from our internal postfix system to their ESP in a couple of days. That included development of our amazing new "Email History" feature which allows our customers to instantly see deliverability, opens, and clicks for every email handled by our system.

"Our new email infrastructure has improved deliverability, vastly increased customer confidence in our system, and reduced support load for both us and our customers." -Alan Pinstein, cofounder,

Read on to learn how they did it.

Scaling the Hard Stuff: Customer Support

Meet Tourbuzz, a service that handles real estate photography orders and virtual tour production. They've seen explosive growth in the past few years, yet kept the team small. These guys are crazy-smart technologists leveraging lots of service APIs and deploying to the cloud. But with all those accounts signing up, they've got something much harder than servers and services to scale: they've got passionate customers!

As a modern web service with significant complexity, Tourbuzz sends transactional email for a variety of purposes. They use Mandrill to make sure no emails are dropped along the process of order creation, progress, final delivery, and even periodic stats after the fact. And, with a bit of integration work, Mandrill does all of this just fine.

Unfortunately, where there's email, there's uncertainty...

Did You Get That Thing I Sent Ya?

Stop me if you've heard this one before:

Person A: "I never got that report you said you would send to me."

Person B: "ORLY? I sent it last week, swear!"

Person A: "What email address did you use?"

Person B: ", I think. Isn't that right?"

Person A: "Well, that's not my main email anymore, but I think it still works..."

Person B: "Did you check your spam folder?"

Person A: "Not sure..."

And on it goes. Deliverability can be so slippery! That's why Mandrill provides a nice search interface for administrators to audit these things and quickly determine that, indeed, Person A received an email from Person B on Date C with Subject Line D.

As they grew, the Tourbuzz team inevitably found themselves spending more and more of their precious time dealing with these kinds of requests. After switching to Mandrill, they found it easy enough to audit and respond to these requests occasionally, but it's just too manual to do multiple times a day (these are work interruptions, after all.) And who can blame customers for making these requests? They just want information about how their business is running. Heck, they've got their own customers to think about for that matter!

They quickly learned that Mandrill is a different kind of service than most. We have an internal goal set for ourselves stipulating that everything possible in our app must also be possible via our API. Tourbuzz took one look at our metadata search functions and envisioned a way to provide a personalized email audit trail interface to their own customers, right inside their own interface. It looks something like this:

Now when their customers have questions about what emails were sent to whom and when, they can simply click the "Email History" tab and get the answer. It's quicker, simpler, and more empowering than before. More importantly, it scales: the customers stay happy and the team stays small.

So how did they do it?

Metadata: Closing the Loop

Using Mandrill's custom metadata functionality (look for "metadata" options on the send API call), Tourbuzz started appending their own business knowledge to each message, like user ids, tour ids and order ids. We don't even know what any of it means, per se, but we do index it and let you search on it. This allows you to "close the loop" between your service and ours.

After a quick, manual search to confirm this was working, it was time to automate the process. Mandrill's search API exposes all the power of search in our app, including tag- and metadata-based search. This is critical for sorting out which emails belong to which user, and of course you must only show a user their own messages. But with all the data in its appropriate place, the process is easy to stitch together:

  1. User logs into the Tourbuzz admin panel and clicks the "Email History" tab
  2. The Tourbuzz server makes a "search" API request for messages with user_id matching the logged-in user's id
  3. Mandrill responds with a hunk of JSON clearly describing all email containing that metadata, including its delivery status
  4. Tourbuzz formats the response as HTML with (insert your favorite templating language here) and serves it up
  5. You put your feet up and read your favorite website the rest of the day (or... you know, go outside or something)

That's It!

This has been a quick overview of just one of the things you can do with our APIs, but the possibilities are endless. What about split testing and conversion tracking, or even re-engagement for your users who haven't been active over some period? I'm leaving those as exercises for the reader this week, but stay tuned!

Now I have to ask: what cool tricks would you do with your emails, if only you could close the loop?