Software Engineer, builder of webapps

A NodeJS Module for Delighted

Recently at work, we decided to integrate with a cool little service called Delighted to start getting feedback from our users after they have made a purchase from us.

Delighted is the easiest and most beautiful way to measure customer happiness. Are your customers delighted?

Delighted does one thing and does it really well - they provide a service for automating the sending of NPS emails to customers. For those that don't know, NPS, or "Net Promoter Score" is a system designed to gauge loyalty of a company's customers. Ever got one of those emails or popups on a site that asks you "how likely are you to recommend our product to someone" ? That's exactly what Delighted does, but in a little more elegant way.

They send a simple and straightforward email asking you to provide a rating from 0 to 10. After picking a number, they will also give you the chance to provide a comment if you so choose.

Automation and Implementation

At ThirdLove, we needed a way to automate this. Lucky for us, Delighted provides a RESTful API. They provide endpoints for sending emails, fetching responses and even metrics. The thing we found to most useful so far is the ability to schedule emails to be sent to customers in the future. This way, when a customer makes a purchase, our backend will make a call to Delighted, telling it to send an email to the customer n many days in the future.

When I started looking at the API docs, I noticed that they didnt have a Node module - just a Ruby gem and raw curl examples. With that being the case, and our backend being written using Node, I decided to create a module that wraps their API to make it easy to interact with.

The source can be found here on Github.

The module is very very simple and basically wraps the API calls, forwarding on the JSON payloads that Delighted's API returns. This module also uses the Q promise library rather than traditional callbacks. Included in the repository are a few examples and a pretty detailed README that explains all of the methods and the parameters they take (nearly identical to the Delighted API docs).