The Graph Theory Behind Visual Automations

Jon Lunsford
Work in Public by ConvertKit
3 min readNov 2, 2017

The engineering team at ConvertKit has spent the last few months building, iterating, and refining Visual Automations to give content creators even more powerful tools to grow their business.

While many aspects of this feature greatly changed over time, sometimes near full re-writes took place, there is this core philosophy that allowed us to build upon a solid foundation. It’s called the Graph Theory.

The tl;dr of Graph Theory

A Visual Automation at it’s core is just a graph. A graph in CS (computer science) is made up of vertices, nodes, or points (we’ll call them nodes) connected by edges, arcs, or lines (we’ll call them edges). Another key concept here, is we build directed graphs, meaning they can only be traversed in one direction– downward.

Or more eloquently put:

In mathematics, graph theory is the study of graphs, which are mathematical structures used to model pairwise relations between objects.

For good measure, here’s a visualization of a simple Visual Automation in ConvertKit from our concepting stages:

A Visual Automation Graph in ConvertKit

Our Application of the Graph Theory

With all the terminology out of the way, we can dive into how we leveraged this core, proven concept to build an incredibly powerful automation tool.

In our case, each node in a graph is where complex logic is applied to each subscriber who encounters them. The outcome of that logic determines where they move to next. Let’s talk a little bit about the makeup of a node.

Example of Visual Automations in ConvertKit

You can think of a node in Visual Automations as a generic container, it doesn’t actually know anything about what actions or events will be applied to a subscriber, it just knows to call on it’s underlying step (a step is polymorphic relation belonging to each node), and that step contains the specifics of the action or event to apply.

For example a node can have a step that adds a tag, adds subscribers to a sequence, or adds a delay until the next step is applied. Basically, we can use a generic node and plug in the details as we need to move the subscriber along in your funnel.

To recap, at it’s core Visual Automations uses this tried-and-true concept called Graph Theory to hold everything together. On top of that foundation we’ve built out these powerful nodes that, when connected together, allow you to construct incredible Visual Automations.

Want to see Visual Automations in action?

Curious to see what we worked so hard to release? Click the link below and sign up for demo of ConvertKit. Our team is excited to talk about what we’ve been up to and show you how Visual Automations is the level-up you’ve been looking for.

Request a demo of ConvertKit

--

--

Jon Lunsford
Work in Public by ConvertKit

Engineer @convertkit, programming enthusiast, father, and musician