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_idpopulated, useslabelfield - Usage: Authentication, permissions, user actions
- Example:
actor_123withuser_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_idas null, usesapps_labelfield - Usage: System actions, automated processes, app-generated data
- Example:
actor_789withuser_id: nullandapps_label: "shopify"
Database Structure
Key Distinctions
User Actors:user_idis populated- Uses
labelfield for name - Has
avatar_urlfor profile picture - Unique constraint on
[user_id, org_id]and[label, org_id]
user_idis null- Uses
apps_labelfield for app identifier - Has
logo_urlfor 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_idpopulated, for tracking human actions and analytics - App actors: Have
user_idas null, for system/automated actions and data attribution - Always verify: Check if
user_idis populated to determine actor type when tracking events