Organization Tables & Schemas
Schema reference for organization tables - conversations, users, services, tools, and more.
Read-only tables that hold your organization's operational data. Each page below documents the schema for a specific area (conversations, users, services, and so on) along with a small query example to get you started.
Available Tables
Schema Overview
Organization data relates users and services to conversations, with messages and metric results associated with those conversations. Use the table references and documented identifiers below to construct joins; relationships do not imply shared authorization across organizations.
Common Queries
-- Active conversations in last 7 days
SELECT COUNT(*) as active_conversations
FROM conversations
WHERE created_at >= CURRENT_DATE - INTERVAL '7 days'
AND is_finished = false;
-- Daily message volume
SELECT DATE(created_at) as day,
COUNT(*) as message_count
FROM messages
WHERE org_id = 'your-org-id'
GROUP BY DATE(created_at)
ORDER BY day DESC
LIMIT 30;
-- User engagement metrics
SELECT u.user_id,
u.email,
COUNT(DISTINCT c._id) as conversation_count
FROM users u
LEFT JOIN conversations c ON u.user_id = c.user_id
GROUP BY u.user_id, u.email;Subpages
ConversationUserServiceOrganizationDynamic BehaviorsMetricRoleToolSimulationCommon Query PatternsLast updated
Was this helpful?

