diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index a9b298f..e1655c1 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -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", diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 5e66fa7..5560224 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -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", diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index 14f669b..0bac77b 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -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", diff --git a/gemini-extension.json b/gemini-extension.json index ec3b268..9bd10f0 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -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": { diff --git a/skills/query-examples/SKILL.md b/skills/query-examples/SKILL.md index 780b43b..4d085b0 100644 --- a/skills/query-examples/SKILL.md +++ b/skills/query-examples/SKILL.md @@ -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) diff --git a/skills/query-examples/references/models-support-tickets.md b/skills/query-examples/references/models-support-tickets.md new file mode 100644 index 0000000..aea317d --- /dev/null +++ b/skills/query-examples/references/models-support-tickets.md @@ -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