How to use
Tiaude turns product events into explainable churn risk scores.
This section is about usage, not internals. The goal is to help you integrate Tiaude quickly, persist the right data, and know when to use each scoring method.
Start here
- Quickstart: install, configure, score, persist
- Configuration: define signals for your product
- Runtime scoring: choose between
track(),scoreUser(), andrefreshScore() - ChurnResult: Understand the standardized structure that all Tiaude scoring methods return
- Production: persistence and backend patterns
- Errors and recovery: what can fail and how to recover
The core integration model
Tiaude has two important pieces of data:
raw events = your source of truth
Tiaude state = compact runtime optimizationThe state lets you avoid recomputing a user from all historical events every time something happens.
But it does not replace raw event storage.
In a serious backend integration, you should store both:
- raw product events in your own database;
- the latest Tiaude
statefor each user.
The three methods
track() -> normal event ingestion path
scoreUser() -> full recompute from raw events
refreshScore() -> time-only recalculation without a new eventUse track() for the hot path.
Use scoreUser() when you need to rebuild safely.
Use refreshScore() when time passes and you want scores to age.
Recommended production pattern
The recommended backend convention is:
try track() or refreshScore()
if incremental reuse fails -> load raw events -> scoreUser()That gives you a fast path and a safe recovery path.
try {
const result = scorer.track({
userId,
previousState: user.churnState ?? null,
event,
});
await saveChurnState(userId, result.state);
return result;
} catch (error) {
if (shouldRecompute(error)) {
const events = await loadUserEvents(userId);
const result = scorer.scoreUser({
userId,
events,
});
await saveChurnState(userId, result.state);
return result;
}
throw error;
}Mental model for LLMs and agents
When generating code that uses Tiaude:
- create one scorer from a stable config;
- store raw events in the app database;
- store
result.stateper user; - call
track()when a new event arrives; - call
refreshScore()for scheduled aging; - call
scoreUser()when state cannot be reused; - never treat Tiaude state as the only source of truth.
The safest generated integration is always:
hot path: track(previousState, event)
fallback: scoreUser(rawEvents)