How The Clerk.io Platform Works

An overview of the Clerk.io architecture for developers or other technically interested people.

The purpose of this page is to give a simple insight into the Clerk.io platform to make it easier to understand how to work with it and how to use it for developers and others with technical flair.

Clerk.io In 60 Seconds

In the shortest form Clerk.io does the following:

  1. Takes a stores order history and current product catalog.
  2. Runs the data through the ClerkCore predictive algorithm to learn customer intent.
  3. Makes the predicted behavior available through the Clerk.io API at api.clerk.io.

Through the Clerk.io API other applications can then ask Clerk.io for answers on customer intent queries such as:

  • "Customer X is watching product Y, what would be good alternatives to Y?": https://api.clerk.io/v2/recommendations/substituting?product=Y&visitor=X
  • "Customer X just added product Y to the basket, what's most likely that X will buy next?": https://api.clerk.io/v2/recommendations/complementary?product=Y&visitor=X
  • "I want to create an offer for product X, who of my customers should I send it to?": https://api.clerk.io/v2/campaigns/customers?interest=X

It's on top of these types of queries that we have build our 4 services Search, Recommendations Email and Audience.

The Clerk.io Arcitecture

When working with a platform a glimpse under the hood can greatly help you understand how to use it wisely. That what we'll try to give you in this section.

Clerk.io consists of 3 main subsystems arranged separately around the core Data Store:

  1. Clerk.io Data Sync Infrastructure: The purpose of this systems is to sync all relevant data such as products and orders to Clerk.io.
  2. Clerk.io Compute Cluster - ClerkCore: The purpose of this system is I analyze the store's data in the Data Store and pre-compute core customer intents and behaviors. These basic insights are then stored back in the Data Store to be used when the API is requested for a prediction.
  3. Clerk.io Prediction API - api.clerk.io: The purpose of this system is to answer customer intent queries on demand. The system combines the pre-computed customer intents and behaviors and combines it with the current customer's real-time behavior to answer the intent query.
1768

A simple diagram overview of the Clerk.io platform and the 3 sub-systems.

Clerk.io Data Sync Infrastructure

The purpose of the Clerk.io Data Sync Infrastructure is to make sure that Clerk.io at all times have the correct information about products, orders and customers in order to make the correct predictions. If you see a drop in prediction quality it is most of the time because the wrong data has been synced to Clerk.io (we offer a Data Health dashboard to help detect data issues).

The synchronization infrastructure is two layered:

  1. A Core Importer takes data in an internally well-defined format and validates and stores it.
  2. A series of platform-specific importers loads data from the given platform into the Core Importer.

With this system Clerk.io is able to support a variety of platforms and data formats with an extremely small overhead.

Every time you start a Data Sync in the Clerk.io Backend you load an instance of your selected platform-specific importer that loads syncs data from your store into Clerk.io.

Data Syncs are also scheduled to be run automatically depending on the rate of change in the store and the time (as a metric for the load on the store) it takes to complete the import. The frequency is reported in the Data Sync backend.

On top of that, we try to make all data synchronization in real-time though it is not possible on all platforms. If real-time updates are enabled is also show under Data Sync in the backend.

Clerk.io Compute Cluster - ClerkCore

ClerkCore is the heart of Clerk.io! This is where we predict the future intent of a store's customers.

A store is periodically analyzed dependent on the amount of change made to a store and time since last analyzation.

Analyzations are also done on the fly upon changes so it should never be visible when they are run but it means that the first time you populate a store with data it might take some minutes before you see results through the API.

Clerk.io Prediction API

Insights and knowledge have no value if not used to help people and that's what the Clerk.io Prediction API is for. The API is located at api.clerk.io and the full reference can be found under API Reference.