Customer 360
Build a unified customer view in a single database by leveraging graph traversal for identity resolution, churn risk scoring, and cross-sell recommendations, the document model for fuzzy deduplication via cross-matching on customer attributes, vector similarity with LSM_VECTOR embeddings for customer preference and product matching, full-text search for support ticket content indexing, and time-series analysis for customer journey event chains and conversion path tracking.
Architecture Overview
Vertices |
|
Edges |
|
Customers connect to households, devices, addresses, and support tickets. Sessions contain events that trace customer journeys. Customers carry prefVector embeddings for personalization. Support tickets are full-text indexed.
Key Queries
Identity Resolution — Discover linked identities through shared sessions (3-hop transitive):
SELECT c1.name, c2.name, session.id AS sharedSession
FROM MATCH {type: Customer, as: c1}
-STARTED-> {type: Session, as: session}
<-STARTED- {type: Customer, as: c2}
WHERE c1 <> c2
Churn Risk Scoring — Calculate churn risk based on churned neighbors in the social network:
SELECT customer.name,
COUNT(CASE WHEN neighbor.status = 'churned' THEN 1 END) * 1.0 / COUNT(neighbor) AS churnRatio
FROM MATCH {type: Customer, as: customer}
-BELONGS_TO-> {type: Household}
<-BELONGS_TO- {type: Customer, as: neighbor}
GROUP BY customer.name ORDER BY churnRatio DESC
Customer Journey Analysis — Trace conversion paths from ad click to purchase:
MATCH (c:Customer)-[:STARTED]->(s:Session)-[:TRIGGERED]->(e1:Event)-[:TRIGGERED]->(e2:Event)-[:TRIGGERED]->(e3:Event)
WHERE e1.type = 'ad_click' AND e3.type = 'purchase'
RETURN c.name, e1.type, e2.type, e3.type, s.channel
Try It Yourself
git clone https://github.com/ArcadeData/arcadedb-usecases.git
cd arcadedb-usecases/customer-360
docker compose up -d
./setup.sh
./queries/queries.sh
Full source: customer-360 on GitHub