Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "posthog",
"description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from Claude Code. Optionally capture Claude Code sessions to PostHog LLM Analytics.",
"version": "1.1.2",
"version": "1.1.3",
"author": {
"name": "PostHog",
"email": "hey@posthog.com",
Expand Down
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posthog",
"version": "1.0.4",
"version": "1.0.5",
"description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from Codex",
"author": {
"name": "PostHog",
Expand Down
2 changes: 1 addition & 1 deletion .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "posthog",
"displayName": "PostHog",
"version": "1.0.4",
"version": "1.0.5",
"description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from Cursor",
"author": {
"name": "PostHog",
Expand Down
2 changes: 1 addition & 1 deletion gemini-extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posthog",
"version": "1.0.3",
"version": "1.0.4",
"description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from Gemini CLI",
"mcpServers": {
"posthog": {
Expand Down
1 change: 1 addition & 0 deletions skills/query-examples/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Schema reference for PostHog's core system models, organized by domain:
- [Notebooks](./references/models-notebooks.md)
- [Session Recording Playlists](./references/models-session-recording-playlists.md)
- [Session Recordings](./references/models-session-recordings.md)
- [Support Tickets](./references/models-support-tickets.md)
- [Surveys](./references/models-surveys.md)
- [SQL Variables](./references/models-variables.md)
- [Skipped events in the read-data-schema tool](./references/taxonomy-skipped-events.md)
Expand Down
43 changes: 43 additions & 0 deletions skills/query-examples/references/models-support-tickets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Support Tickets

## Ticket (`system.support_tickets`)

Support tickets from the conversations product, created via widget, email, or Slack channels.

### Columns

Column | Type | Nullable | Description
`id` | uuid | NOT NULL | Primary key
`team_id` | integer | NOT NULL | Team this ticket belongs to
`ticket_number` | integer | NOT NULL | Auto-incrementing number, unique per team
`channel_source` | varchar(20) | NOT NULL | Origin channel: `widget`, `email`, or `slack`
`channel_detail` | varchar(30) | NULL | Sub-type: `slack_channel_message`, `slack_bot_mention`, `slack_emoji_reaction`, `widget_embedded`, `widget_api`
`distinct_id` | varchar(400) | NOT NULL | PostHog distinct_id linking the ticket to a person
`status` | varchar(20) | NOT NULL | `new`, `open`, `pending`, `on_hold`, or `resolved`
`priority` | varchar(20) | NULL | `low`, `medium`, or `high`
`anonymous_traits` | jsonb | NOT NULL | Customer-provided traits (name, email, etc.)
`message_count` | integer | NOT NULL | Total number of messages in the ticket
`unread_customer_count` | integer | NOT NULL | Messages the customer hasn't seen (from team/AI)
`unread_team_count` | integer | NOT NULL | Messages the team hasn't seen (from customer)
`last_message_at` | timestamp with tz | NULL | When the most recent message was sent
`last_message_text` | varchar(500) | NULL | Truncated preview of the most recent message
`email_subject` | varchar(500) | NULL | Email subject line (email-originated tickets only)
`email_from` | varchar(254) | NULL | Sender email address (email-originated tickets only)
`session_id` | varchar(64) | NULL | PostHog session ID captured at ticket creation
`session_context` | jsonb | NOT NULL | Session context data (replay URL, current URL, etc.)
`sla_due_at` | timestamp with tz | NULL | SLA deadline set via workflows, null means no SLA
`created_at` | timestamp with tz | NOT NULL | When the ticket was created
`updated_at` | timestamp with tz | NOT NULL | When the ticket was last updated

### Key Relationships

- Tickets belong to a **Team** (`team_id`)
- Tickets are linked to a **Person** via `distinct_id`
- Ticket assignments are managed via `TicketAssignment` (not exposed as a system table)

### Important Notes

- The `status` field follows a lifecycle: `new` -> `open` -> `pending`/`on_hold` -> `resolved`
- The `anonymous_traits` field contains customer-provided key-value pairs, commonly including `name` and `email`
- The `session_context` field may contain `session_replay_url`, `current_url`, and other session metadata
- Tickets are never deleted; filter by `status` to exclude resolved tickets
Loading