Build vs. Buy Behavioral Email Platform for API Product Companies

Build vs. Buy Behavioral Email Platform for API Product Companies

Behavioral email is automated and targeted messages sent to customers based on their actions or behavior. By triggering on how your customers interact with your website or product, you’re able to send email whose content is actually aligned with...

Behavioral email is automated and targeted messages sent to customers based on their actions or behavior. By triggering on how your customers interact with your website or product, you’re able to send email whose content is actually aligned with what they’re doing, and will therefore be far more likely to resonate.

API companies are uniquely positioned to take advantage of behavioral emails; If monitoring and analytics is done right, then insights into what’s going on deep within the platform can be surfaced; And insightful, or even prescient, communiqués can be made.

Common capabilities of behavioral email in API platform companies include helping developers speed API integration & try out new product features, and keeping customers informed on subscription & platform issues.

Off-the-shelf behavioral email solutions can provide all of the functionality as outlined in this article. But in this post we’re going to break down what it would take, technically, to build your own behavioral email solution.

What’s required to build your own behavioral email solution?

A behavioral email product consists of at least three parts:

1. A methodology to get monitoring data from an API

2. A way to define rules and validate the monitoring data

3. A process to send specific emails to users when a rule is met

Acquisition of monitoring data from an API

Depending on how confident you feel, you could build a whole monitoring solution from scratch, or you could employ an off-the-shelf open-source system such as Prometheus.

Prometheus is a monitoring solution for microservices. By including a Prometheus client in your application, it can be called when you want to record a metric. The Prometheus server will then poll the data source at regular intervals and persist the result. The Prometheus docs have a setup guide to help with installation.

Prometheus clients come with default metrics configured out-of-the-box, so you don’t have to manually set up basic stuff like CPU or memory monitoring.

For a Node.js/Express.js based API, you can install the Node.js client for Prometheus via NPM and configuration only takes a few lines of code:


const prometheus = require('prom-client');

const register = new prometheus.Registry();

prometheus.collectDefaultMetrics({ register });

The default metrics are fundamental and not API related, so you would have to set up more complex metrics yourself.

The code for a very simple API metric might look like:


const activeRequests = new client.Gauge({

 name: 'activeRequests'

});

registry.registerMetric(activeRequests);

api.use((req, res, next) => {

 activeRequests.inc();

 res.on('close', () => activeRequests.dec());

 next();

});

Prometheus only covers three out of the top 15 most important API metrics you should be tracking, the rest have to be defined with custom code.

api email marketing api integration analytics platforms api monitoring monitoring and alerting api providers email api email solution user behavior analytics

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How to Monitor Third Party API Integrations

How to best monitor your external and third party API integrations and hold partners accountable to SLAs

How to Properly Leverage Elasticsearch and User Behavior Analytics for API Security

How to set up Elasticsearch and Kibana for User Behavior Analytics (UBA) in API Security Monitoring — Accurately identify API security vulnerabilities. Let's learn How to Properly Leverage Elasticsearch and User Behavior Analytics for API Security

API Integration Practices and Patterns

From on-prem-to-cloud integrations to custom application-to-cloud integrations, the questions are the same: What is the integration experience you need to offer and who will own it?

Top 10 API Security Threats Every API Team Should Know

Learn what are the most important API security threats engineering leaders should be aware of and steps you can take to prevent them

Public ASX100 APIs: The Essential List

The method used for this initial research was to obtain a list of the ASX100 (as of 18 September 2020). Then work through each company looking at the following