Core CONA Logic
Actors
Actors
An actor in CONA represents any entity that can perform actions within an organization. Actors provide a unified way to track and attribute actions across the system.
Types of Actors
User Actors
- Purpose: Represent a person within an organization
- Creation: Created when a user joins an organization
- Identification: Has
user_id
populated, useslabel
field - Usage: Authentication, permissions, user actions
- Example:
actor_123
withuser_id: "user_456"
andlabel: "John Doe"
App Actors
- Purpose: Represent an app/integration within an organization
- Creation: Created when an app is installed
- Identification: Has
user_id
as null, usesapps_label
field - Usage: System actions, automated processes, app-generated data
- Example:
actor_789
withuser_id: null
andapps_label: "shopify"
Database Structure
Key Distinctions
User Actors:
user_id
is populated- Uses
label
field for name - Has
avatar_url
for profile picture - Unique constraint on
[user_id, org_id]
and[label, org_id]
App Actors:
user_id
is null- Uses
apps_label
field for app identifier - Has
logo_url
for app logo - Unique constraint on
[apps_label, org_id]
Important Distinction for Analytics
When tracking user actions in PostHog, always use the authenticated user’s actor ID:
Key Takeaway
- User actors: Have
user_id
populated, for tracking human actions and analytics - App actors: Have
user_id
as null, for system/automated actions and data attribution - Always verify: Check if
user_id
is populated to determine actor type when tracking events