:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(data-warehouse): add elevenlabs triage tickets table (#113225)
Tom Owers54d7e5cf4d65
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.mdindex 14df7ec859c3..ce50399ebf68 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md@@ -2852,6 +2852,7 @@ Diffed against: <https://api.elevenlabs.io/openapi.json>- [ ] `/v1/workspace/audit-logs` — state/transition history across workspace resources (medium)- [ ] `/v1/dubbing (list dubs)` — dubbing jobs are a separate billable workload not represented by history or conversations (low)- [ ] `/v1/convai/agent-testing and /v1/convai/test-invocations` — agent test definitions and their invocation results for quality tracking (low)+- [x] `/v1/convai/triage-tickets` — workspace-wide Conversational AI triage tickets raised about agent performance on conversations (medium)Note: Official spec is large (277 paths); the ConvAI surface is the bulk of it. Static endpoint list in settings.py, no dynamic discovery.diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/canonical_descriptions.pyindex 9cb152d4710a..eb04b6fde8ea 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/canonical_descriptions.py@@ -62,4 +62,31 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"description": "Free-text description of the voice.",},},+ "triage_tickets": {+ "description": "Conversational AI triage tickets raised about agent performance on conversations, across every agent in the workspace. One row per ticket.",+ "docs_url": "https://elevenlabs.io/docs/api-reference/triage-tickets/list-for-workspace",+ "columns": {+ "agentqa_ticket_id": "Unique identifier for the triage ticket.",+ "workspace_id": "Identifier of the workspace the ticket belongs to.",+ "agent_id": "Identifier of the agent the ticket is about.",+ "owner_user_id": "Identifier of the user who created the ticket, or 'agent' for agent-raised tickets.",+ "assignee_user_id": "Identifier of the user the ticket is assigned to.",+ "title": "One-line headline for the ticket.",+ "issue_type": "Type of issue the ticket describes.",+ "labels": "Labels attached to the ticket.",+ "conversation_ids": "Identifiers of the conversations the ticket covers.",+ "status": "Ticket status (open, in_progress, resolved, cancelled, merged).",+ "priority": "Ticket priority.",+ "priority_changes": "History of priority changes on the ticket.",+ "source": "How the ticket was raised (qa, agent, manual).",+ "qa_comment": "Overall comment describing what went wrong.",+ "ticket_comments": "Comments left on the ticket.",+ "turn_comments": "Comments attached to specific conversation turns.",+ "merged_into_ticket_id": "The ticket this one was merged into, set while its status is merged.",+ "first_seen_unix_secs": "Time the issue was first seen, in Unix seconds.",+ "last_seen_unix_secs": "Time the issue was last seen, in Unix seconds.",+ "created_at_unix_secs": "Creation time of the ticket, in Unix seconds.",+ "updated_at_unix_secs": "Last update time of the ticket, in Unix seconds.",+ },+ },}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/settings.pyindex 34fcff01725e..cba1c26e6b0c 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/settings.py@@ -109,6 +109,21 @@ ELEVENLABS_ENDPOINTS: dict[str, ElevenLabsEndpointConfig] = {sort_mode="asc",extra_params={"sort": "created_at_unix", "sort_direction": "asc"},),+ # Workspace-wide Conversational AI triage tickets. Mutable (status, priority, assignee, comments) with+ # no updated-since filter, so full refresh only. The API has no sort direction param and returns+ # newest-created first.+ "triage_tickets": ElevenLabsEndpointConfig(+ name="triage_tickets",+ path="/v1/convai/triage-tickets",+ items_key="agent_conversation_tickets",+ cursor_param="cursor",+ cursor_response_key="next_cursor",+ primary_keys=["agentqa_ticket_id"],+ page_size=100,+ partition_key="created_at_unix_secs",+ sort_mode="desc",+ extra_params={"sort_by": "created_at"},+ ),}ENDPOINTS = tuple(ELEVENLABS_ENDPOINTS.keys())diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/source.pyindex 96679641d691..225136b5a5f2 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/source.py@@ -53,7 +53,7 @@ You can create an API key in your [ElevenLabs account settings](https://elevenlaGrant the following read permissions when creating the key:- **History** (text-to-speech generation history)-- **Conversational AI** (conversations and agents)+- **Conversational AI** (conversations, agents, and triage tickets)- **Voices**""",iconPath="/static/services/elevenlabs.svg",diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/tests/test_elevenlabs.py b/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/tests/test_elevenlabs.pyindex 786f31fbb0cc..975cf764adae 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/tests/test_elevenlabs.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/tests/test_elevenlabs.py@@ -116,7 +116,7 @@ class TestBuildParams:assert params["call_start_after_unix"] == 1700000000assert params["summary_mode"] == "include"- @parameterized.expand([("agents",), ("voices",)])+ @parameterized.expand([("agents",), ("voices",), ("triage_tickets",)])def test_full_refresh_endpoints_never_send_a_time_filter(self, endpoint: str) -> None:# Full-refresh endpoints have no server-side updated-since filter; sending one would 4xx.params = _build_params(ELEVENLABS_ENDPOINTS[endpoint], True, 1700000000, "created_at_unix")@@ -294,6 +294,7 @@ class TestSourceResponse:("conversations", ["conversation_id"], "desc", "start_time_unix_secs"),("agents", ["agent_id"], "asc", "created_at_unix_secs"),("voices", ["voice_id"], "asc", "created_at_unix"),+ ("triage_tickets", ["agentqa_ticket_id"], "desc", "created_at_unix_secs"),])@mock.patch(SESSION_PATCH)diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/tests/test_elevenlabs_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/tests/test_elevenlabs_source.pyindex 41b6151b3e2e..2b91d4bd8551 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/tests/test_elevenlabs_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/elevenlabs/tests/test_elevenlabs_source.py@@ -14,6 +14,7 @@ class TestElevenLabsSchemas:("conversations", True, False),("agents", False, False),("voices", False, False),+ ("triage_tickets", False, False),])def test_schema_sync_capabilities(self, endpoint: str, incremental: bool, append: bool) -> None:@@ -35,7 +36,7 @@ class TestElevenLabsSchemas:def test_documented_tables_render_for_public_docs(self) -> None:# lists_tables_without_credentials must stay on so the posthog.com Supported tables section renders.tables = ElevenLabsSource().get_documented_tables()- assert {t["name"] for t in tables} == {"history", "conversations", "agents", "voices"}+ assert {t["name"] for t in tables} == {"history", "conversations", "agents", "voices", "triage_tickets"}class TestElevenLabsNonRetryableErrors: