Overview

Getting Started with CDP

CDP is a Customer Data Platform that collects your raw customer data, turns it into events, resolves customer identities, builds segments, and runs targeted campaigns and exports.

What is CDP?

CDP is a self-hosted Customer Data Platform designed to give you a single, unified view of every customer across all of your data sources. It works by landing your data as raw rows - page views, purchases, form submissions, CRM records - in raw data tables, through any of three channels: the Public API (from any system that can make an HTTP request), Airbyte (or another ELT tool), and File Import (upload a CSV or JSONL file, or let CDP scan a folder in your S3 bucket). A structured pipeline then turns those rows into events and builds them into rich, cross-source customer profiles.

Once unified profiles exist, CDP lets you define dynamic audience segments based on behavior or attributes, then send targeted campaigns through the channel providers you configure - email (SendGrid, Amazon SES or SMTP), LINE (LINE Messaging API) or SMS (Vonage) - and export profiles and activity to your own S3 bucket from Data Destinations. The entire system runs on Temporal.io for durable, fault-tolerant workflow execution, and stores data in ClickHouse (raw data, events, source and unified profiles, computed user property values and segment membership) and PostgreSQL (configuration such as merge policies, event mappings, segments, campaigns, users, API keys and audit logs), plus an S3-compatible storage bucket for uploaded import files, rejects reports, segment export files and template images.

ℹ️
Self-hosted and privacy-first CDP is self-hosted - you own your data. Data leaves your infrastructure only through destinations you configure yourself: the channel providers that deliver your campaigns (Channels) and the S3 buckets you export to (Data Destinations). You have full control over storage, retention, and access policies.

Core Concepts

Before diving into setup, it helps to understand the main building blocks of the CDP data model:

Concept Description
Raw Data A table where your rows land exactly as they arrived, from the Public API, Airbyte (or another ELT tool) or File Import. Nothing is transformed yet. Stored in ClickHouse (the raw_data database). You create and manage raw tables under Ingestion > Data Sources.
Event A standardized customer action (e.g. purchase, page_view) that Stage 1 creates from a raw data row, using the column mapping you set up on the Events screen. Stored in ClickHouse. Each event carries an event_source, an event_type, an event timestamp, identity fields, and the mapped columns as properties. Each identity column is given a kind - Email (trim + lowercase), Phone (trim + remove spaces - . ( )) or Other (trim only) - and its value is normalized that way once, at transform time, before profiles are matched. No + or country code is added. Event properties are not changed.
Merge Policy Rules that decide when records belong to the same person. A source merge policy works within one data source. A unified merge policy combines one source policy per data source. Only one unified policy should be active at a time, and its Engagement switch makes its profiles available to segments, user properties and campaigns.
Source Profile An identity cluster built per data source from merge policies. For example, all profiles from your website form one source. CDP groups events of that data source into a single Source Profile when they share the identity keys named in the source merge policy's merge conditions (for example the same email, or the same user ID). Several keys in one condition mean AND, and several conditions mean OR.
Unified Profile A cross-source customer record built by the active unified merge policy, which combines one source merge policy per data source and merges source profiles that share the identity fields in its merge conditions (resolved with the Union-Find algorithm). One Unified Profile represents one real-world customer, even if they appear under different identifiers across multiple data sources (website, mobile app, CRM, etc.).
User Property A computed attribute of each unified profile, for example the latest email address or the time since the last purchase. It belongs to one unified policy and is added from that policy's User Properties section. Values are refreshed automatically, about every minute, while that policy's Engagement is on. Segments can filter on user properties, and campaigns read the recipient address from one.
Segment A named, dynamic group of Unified Profiles that match a condition rule - for example, "users who made a purchase in the last 30 days" or "users in Japan with account value > $100". Segments come in four types - User properties, Event, Everyone and Random bucket. While the unified policy's Engagement is on, membership is kept up to date automatically, about every minute. Use "Force recompute" only when you want an immediate full refresh.
Campaign A message sent to a Segment through a configured channel provider (email, LINE or SMS) - immediately ("Send now"), once at a set time ("Scheduled"), or on a repeating schedule ("Repeating"). The recipient address is read from a user property ("Send to"). Every send is logged per recipient, and "Sent" means the provider accepted the message. Temporary errors are retried automatically during the run. Delivery and bounce results are not tracked yet.

The 4-Stage Pipeline

CDP processes data through a four-stage pipeline and runs each stage automatically: tables with Auto Transform on (it is off by default) are transformed every hour, source profiles build at about :05 and unified profiles at about :10 past each hour (UTC). Each run picks up only what is new since the last one, and you can also start any stage by hand. Re-running a stage is safe as long as the mapping and dedup keys have not changed. After you change them, "Re-transform all" adds new events alongside the existing ones. Sending the same rows again through the API, or importing the same file again, also adds them again.

Stage 1
Raw Data
transform-raw-to-events
ClickHouse raw_data
Stage 2
Events
build-source-profiles
ClickHouse cdp.events
Stage 3
Source Profiles
build-unified-profiles
ClickHouse cdp.source_profiles
Stage 4
Unified Profiles
(downstream activation)
ClickHouse cdp.unified_profiles

Once Unified Profiles are built, CDP attaches each profile's events to it, and activation takes over. While the unified policy's Engagement is on, CDP computes your user properties and then your segments automatically, about once a minute ("Force Compute" / "Force recompute" refreshes a single item straight away). Campaigns then send to segment members on the schedule you choose - "Send now", "Scheduled" or "Repeating" - and Data Destinations can export profiles or activity to your own S3 bucket.

ℹ️
Watch it on the Home page You can watch the pipeline at work on the admin panel's Home page (titled "Pipeline"). It shows one card per stage: Raw Data (number of tables), Events, Source Profiles, Unified Profiles, and the active Segments and Campaigns. Click the Events, Source Profiles or Unified Profiles card to see its trend over the last 7 days. Counts and charts are refreshed hourly, so they are approximate.

For a detailed technical breakdown of each stage - including schemas, deduplication, and the identity resolution algorithm - see the Pipeline Concepts page.

Choose Your Path

CDP serves different audiences. Jump to the guide that fits your role:

Integration Guide

Send rows into your raw data tables through the Public REST API with an API key, sync them with Airbyte (or another ELT tool), or load CSV / JSONL files with File Import. Covers authentication, request validation, errors and the per-table schema endpoint.

Read guide →

Admin Guide

Manage data sources (raw tables, API keys and file imports), event mappings, merge policies, user properties, segments, campaigns and data destinations through the CDP admin interface - no engineering help needed to load a file.

Read guide →

Next Steps

Here is a recommended sequence to go from zero to your first campaign:

  1. Create a raw table
    In the admin panel go to Ingestion > Data Sources (the Raw Data page) and click "Create table", or open an existing table. Every channel writes into a raw table, and a new table accepts no writes until you add a source to it. See Data Sources.
  2. Load your first rows
    On the table's page, click "Add a source" and pick a channel.
    Option A - Public API: choose "Public API". In the "Allow an API key to write here" dialog, click "Create a new API key". The API Keys page opens with the "Create API Key" dialog already showing your table. Enter a Name and click "Create". Copy the "API Key" and "Secret Key" from the "API Key Created" dialog, or click "Download JSON" - they are shown only once, and you need both to authenticate (see API Keys). Then call POST /api/public/v1/raw-data with Basic auth: send Authorization: Basic base64(api_key:secret_key), using the API Key and Secret Key from the dialog (the downloaded JSON file holds them as api_key and secret_key). The body is { "source_table": "...", "rows": [{...}] }, where each object is one row of a raw table that has the Public API enabled and is in your key's scope. Use POST /api/public/v1/raw-data/verify for a dry run, and GET /api/public/v1/tables/{source_table}/schema to see the columns. See the Integration Guide for code examples in multiple languages.
    Option B - File Import (no code): choose "File imports" → "Create a new import source". Use Upload mode to upload a CSV or JSONL file, or Scheduled scan / Manual scan to have CDP pick files up from a folder in your S3 bucket. You follow each run on the Data Imports screen. See File Import.
    Airbyte (or another ELT tool) can also write into the table - see the Integration Guide.
  3. Map the table to events and create a source merge policy
    Go to Ingestion > Events, click "Add event source" and pick your raw table. In the mapping editor, set the "Data Source", "Event Type" and "Event Timestamp" (these cannot be changed later). Tick the columns to keep and give each a "Target Name". Mark at least one column as an "Identity" and choose its kind (Email, Phone or Other). Optionally pick a "Dedup Key". Turn on "Auto Transform" (off by default) so new rows are transformed every hour, then click "Save". Next, go to Unification > Source Profiles and click "Create Merge Policy". Enter a "Policy name" and choose the data source you just mapped - the list shows only data sources with an active event mapping, which is why you save the mapping first. Pick the identity keys that mean "same person", then click "Save and build". See the Admin Guide - Events for every mapping option and Source Profiles for merge policies.
  4. Create a unified merge policy
    Go to Unification > Unified Profiles, click "Manage Policies", then "New Policy". Enter a "Policy name", pick one source merge policy per data source, and set the merge conditions. Turn on "Engagement" so segments, user properties and campaigns can use these profiles, then click "Save". A new policy is saved as the active policy. Only one policy should be active at a time, so if another one is already active, use "Deactivate" on it in "Manage Merge Policies". See Unified Profiles.
  5. Let the pipeline run
    From here CDP runs on its own. Tables with Auto Transform on are transformed every hour. Source profiles build at about :05 and unified profiles at about :10 past each hour (UTC), and events are assigned to unified profiles after each successful unified build. Rows that arrived in the last 15 seconds or so wait for the next transform. To go faster, use "Transform" in the event source's row menu, "Build" on the source merge policy, and "Actions" → "Build" on the Unified Profiles page. Watch the counts fill in on the Home page.
  6. Add user properties
    On the Unified Profiles page, scroll to the User Properties section and click "Add User Property". Give it a "Display Name" and "Property Key", choose the "Event Source", "Event Type" and "Event Property" it reads from (the latest value wins), and click "Save". Create at least one property that holds each customer's contact address - an email address, a LINE userId, or for SMS a phone number already in E.164 format (for example +84901234567) - because campaigns read the recipient from it. CDP does not add a + or country code for you. See User Properties.
  7. Create a Segment
    Go to Activation > Segments and click "New segment". Choose the "Event" type and add a "Performed" condition - for example event type purchase, count > 0, within the last 7 days - then click "Create segment". The segment is attached automatically to the unified policy that has Engagement on, and its members appear within a minute or two on its "Members Profiles" tab. See Segments.
  8. Launch a Campaign
    Go to Activation > Channels and click "Add Provider" to connect an email, LINE or SMS provider (see Channels). Then go to Activation > Campaigns and click "New campaign". In the wizard, pick your segment and channel provider (Target), write the message and choose the "Send to" user property that holds the recipient address (Message), and pick "Send now", "Scheduled" or "Repeating" (Schedule). Click "Save as draft" to try "Test Send" (up to 5 recipients) on the campaign page first, or "Save & activate" to go live. Check each recipient's outcome on the "Send Logs" tab, where "Sent" means the provider accepted the message. See Campaigns.