: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(reply-io): add meetings, linkedin and sequence folder tables (#128486)
Tom Owers742d327dfd83
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 f2892542da13..adc4c49ae723 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@@ -10246,15 +10246,16 @@ Diffed against: <https://docs.reply.io/llms.txt>- [x] `reports/list-email-activity` — per-message send/open/click/reply/bounce events - the core outreach fact table (high). Added as `email_activity`, a full refresh of the all-time report including one-off emails. Not incremental: the engagement flags change after delivery, and the `from` filter is read in the account's time zone- [x] `sequence-contacts/list-contacts-in-sequence (and list-contacts-in-sequence-with-extended-state)` — membership table joining contacts to sequences with per-sequence status; without it sequences and contacts cannot be related (high). Added as `sequence_contacts`, one walk per sequence. The extended-state variant is not synced: it pages at 100 rows instead of 1000 for the same membership rows- [x] `sequence-steps/list-all-sequence-steps (and list-step-variants)` — lookup resolving the step and variant IDs referenced by activity, plus A/B variant analysis (high). Added as `sequence_steps`, one request per sequence. Variants need no table of their own: every email and LinkedIn step row already carries its `variants` array, and a separate table would cost one more request per step-- [ ] `reports/list-meetings` — booked meetings, the outcome metric outreach performance is judged on (high)-- [ ] `sequences/get-stats-for-all-sequences` — vendor-computed per-sequence delivery and reply rates (high)+- [x] `reports/list-meetings` — booked meetings, the outcome metric outreach performance is judged on (high). Added as `meetings`, a full refresh of the all-time report including meetings booked outside sequences. The report has no row ID, so the key is the user, booking time, contact name and channel+- ~~`sequences/get-stats-for-all-sequences` — vendor-computed per-sequence delivery and reply rates (high)~~ — skipped: the endpoint accepts only a window of 31 days or less (`lastWeek`, `lastMonth`, or `from`/`to`), so each sync would overwrite the table with a rolling total, and the email figures already follow from `email_activity`- [x] `user-account/list-team-users` — lookup resolving the owner/user IDs carried on contacts, accounts, sequences and tasks (high). Added as `team_users`, one row per user per team- [ ] `inbox/list-messages-in-an-inbox-thread` — message-level rows under the inbox_threads already synced (medium)- [ ] `inbox/list-inbox-categories` — lookup for the category IDs assigned to inbox threads (medium)- [ ] `reports/list-call-activity` — call outcomes and durations, the phone channel equivalent of email activity (medium)- [ ] `reports/list-linkedin-activity` — LinkedIn connect/message/InMail events for multichannel sequences (medium)-- [ ] `sequence-folders/list-all-sequence-folders` — lookup grouping sequences into folders for team-level rollups (medium)-- [ ] `linkedin-accounts/list-linkedin-accounts` — sending-account dimension for LinkedIn, mirroring email_accounts which is already synced (medium)+- [x] `sequence-folders/list-all-sequence-folders` — lookup grouping sequences into folders for team-level rollups (medium). Added as `sequence_folders`. Reply lists only the folders of the user who owns the API key+- [x] `sequence-folders/list-sequences-in-a-folder` — membership table joining folders to sequences; sequence rows carry no folder ID, so the folder lookup cannot be joined without it. Added as `sequence_folder_sequences`, one walk per folder+- [x] `linkedin-accounts/list-linkedin-accounts` — sending-account dimension for LinkedIn, mirroring email_accounts which is already synced (medium). Added as `linkedin_accounts`## Resend — gapsdiff --git a/products/warehouse_sources/sources/reply_io/canonical_descriptions.py b/products/warehouse_sources/sources/reply_io/canonical_descriptions.pyindex 5c33c1d48f64..aac766b339ba 100644--- a/products/warehouse_sources/sources/reply_io/canonical_descriptions.py+++ b/products/warehouse_sources/sources/reply_io/canonical_descriptions.py@@ -258,4 +258,54 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"variants": "A/B variants of the step, each with its ID, subject, message and attachment flag.",},},+ "meetings": {+ "description": "One meeting booked through Reply, with the team member credited with it, the channel it was booked through, and the contact and sequence it came from.",+ "docs_url": "https://docs.reply.io/api-reference/reports/list-meetings",+ "columns": {+ "userId": "ID of the user who booked the meeting.",+ "source": "Channel through which the meeting was booked (automatedEmail, manualEmail, automatedSms, manualSms, call, whatsApp, linkedIn, unspecified).",+ "contactFullName": "Full name of the contact.",+ "sequenceName": "Name of the sequence that generated the meeting.",+ "bookedAt": "When the meeting was booked, in the account's time zone.",+ },+ },+ "linkedin_accounts": {+ "description": "A LinkedIn account connected to Reply for outreach, with its connection state, today's usage, and daily automation limits.",+ "docs_url": "https://docs.reply.io/api-reference/linkedin-accounts/list-linkedin-accounts",+ "columns": {+ "id": "Unique identifier for the LinkedIn account.",+ "name": "Display name of the LinkedIn account.",+ "status": "Current status of the account (disabled, enabled, dailyLimitReached, cookieInvalid).",+ "profileUrl": "URL to the LinkedIn profile.",+ "photoUrl": "URL to the profile photo.",+ "ownerUserId": "ID of the user who owns this account.",+ "accountType": "Type of LinkedIn account (public, salesNavigator, premium).",+ "authType": "Authentication method used (cookie, credentials).",+ "cookieStatus": "Status of the LinkedIn authentication cookie (notValid, valid, neverValidated).",+ "usage": "Today's usage counts for the account: connection requests, messages, InMails, profile views and more.",+ "limits": "Daily limits configuration for the account, either fixed or a random range.",+ },+ },+ "sequence_folders": {+ "description": "A folder used to organize sequences. Folders are personal, so only the folders of the user who owns the API key are listed.",+ "docs_url": "https://docs.reply.io/api-reference/sequence-folders/list-all-sequence-folders",+ "columns": {+ "id": "Unique identifier for the folder.",+ "name": "Name of the folder.",+ },+ },+ "sequence_folder_sequences": {+ "description": "A sequence filed in a sequence folder, one row per folder and sequence. Joins sequence folders to sequences.",+ "docs_url": "https://docs.reply.io/api-reference/sequence-folders/list-sequences-in-a-folder",+ "columns": {+ "folderId": "ID of the sequence folder.",+ "id": "ID of the sequence.",+ "ownerUserId": "ID of the user who owns the sequence.",+ "name": "Name of the sequence.",+ "created": "When the sequence was created.",+ "status": "Current status of the sequence (new, active, paused).",+ "isArchived": "Whether the sequence is archived.",+ "health": "Overall health of the sequence (healthy, stalled, degraded, blocked).",+ },+ },}diff --git a/products/warehouse_sources/sources/reply_io/settings.py b/products/warehouse_sources/sources/reply_io/settings.pyindex b85da862db02..2defb440b97b 100644--- a/products/warehouse_sources/sources/reply_io/settings.py+++ b/products/warehouse_sources/sources/reply_io/settings.py@@ -48,6 +48,13 @@ REPLY_IO_ENDPOINTS: dict[str, ReplyIoEndpointConfig] = {name="email_template_folders", path="/email-template-folders", scope="sequences:read", paginated=False),"email_accounts": ReplyIoEndpointConfig(name="email_accounts", path="/email-accounts", scope="channels:read"),+ "linkedin_accounts": ReplyIoEndpointConfig(+ name="linkedin_accounts", path="/linkedin-accounts", scope="channels:read", paginated=False+ ),+ # Folders are personal: Reply lists only the folders of the user who owns the API key.+ "sequence_folders": ReplyIoEndpointConfig(+ name="sequence_folders", path="/sequence-folders", scope="sequences:read", paginated=False+ ),"inbox_threads": ReplyIoEndpointConfig(name="inbox_threads", path="/inbox/threads", scope="inbox:read"),# One row per user per team, so a user in several teams appears once for each."team_users": ReplyIoEndpointConfig(@@ -70,6 +77,17 @@ REPLY_IO_ENDPOINTS: dict[str, ReplyIoEndpointConfig] = {json={"filters": {"dateRangePreset": "allTime", "includeOutOfSequence": True}},primary_keys=["contactId", "emailAccountId", "deliveryDate"],),+ # One row per booked meeting. The report has no row ID or contact ID; one user does not book two+ # meetings with the same contact through the same channel at the same instant.+ "meetings": ReplyIoEndpointConfig(+ name="meetings",+ path="/reporting/team-performance/meetings",+ scope="reporting:read",+ method="POST",+ # Same all-time window as email_activity: without one the report returns only the last seven days.+ json={"filters": {"dateRangePreset": "allTime", "includeOutOfSequence": True}},+ primary_keys=["userId", "bookedAt", "contactFullName", "source"],+ ),"sequence_contacts": ReplyIoEndpointConfig(name="sequence_contacts",path="/sequences/{id}/contacts",@@ -100,6 +118,21 @@ REPLY_IO_ENDPOINTS: dict[str, ReplyIoEndpointConfig] = {),primary_keys=["sequenceId", "id"],),+ # Sequence rows carry no folder ID, so this membership walk is the only way to join folders to sequences.+ "sequence_folder_sequences": ReplyIoEndpointConfig(+ name="sequence_folder_sequences",+ path="/sequence-folders/{id}/sequences",+ scope="sequences:read",+ fanout=DependentEndpointConfig(+ parent_name="sequence_folders",+ resolve_param="id",+ resolve_field="id",+ include_from_parent=["id"],+ parent_field_renames={"id": "folderId"},+ child_response_actions=[{"status_code": 404, "action": "ignore"}],+ ),+ primary_keys=["folderId", "id"],+ ),}ENDPOINTS = tuple(REPLY_IO_ENDPOINTS.keys())diff --git a/products/warehouse_sources/sources/reply_io/tests/test_reply_io.py b/products/warehouse_sources/sources/reply_io/tests/test_reply_io.pyindex 093f481660c9..53c0ccae2a0d 100644--- a/products/warehouse_sources/sources/reply_io/tests/test_reply_io.py+++ b/products/warehouse_sources/sources/reply_io/tests/test_reply_io.py@@ -61,7 +61,9 @@ class TestPagination:# The initial (skip=0) page is never fetched on resume.assert result.params("skip") == ["200"]- @parameterized.expand([("custom_fields",), ("email_template_folders",)])+ @parameterized.expand(+ [("custom_fields",), ("email_template_folders",), ("linkedin_accounts",), ("sequence_folders",)]+ )def test_unpaginated_endpoint_fetches_bare_array_once_without_state(self, endpoint: str) -> None:result = _driver().run(endpoint, [_bare([{"id": 1}, {"id": 2}])])@@ -76,17 +78,29 @@ class TestPagination:assert isinstance(result.raised, RESTClientRetryableError)- def test_email_activity_posts_all_time_filters_on_every_page(self) -> None:- result = _driver().run(- "email_activity",- [- _paged([{"contactId": 1, "emailAccountId": 9, "deliveryDate": "2026-01-01T10:00:00Z"}], has_more=True),- _paged([{"contactId": 2, "emailAccountId": 9, "deliveryDate": "2026-01-02T10:00:00Z"}], has_more=False),- ],- )+ @parameterized.expand(+ [+ (+ "email_activity",+ "/v3/reporting/emails",+ {"contactId": 1, "emailAccountId": 9, "deliveryDate": "2026-01-01T10:00:00Z"},+ {"contactId": 2, "emailAccountId": 9, "deliveryDate": "2026-01-02T10:00:00Z"},+ ),+ (+ "meetings",+ "/v3/reporting/team-performance/meetings",+ {"userId": 1, "source": "call", "contactFullName": "Ada Example", "bookedAt": "2026-01-01T10:00:00"},+ {"userId": 2, "source": "linkedIn", "contactFullName": "Bo Example", "bookedAt": "2026-01-02T10:00:00"},+ ),+ ]+ )+ def test_report_posts_all_time_filters_on_every_page(+ self, endpoint: str, path: str, first_row: dict[str, Any], second_row: dict[str, Any]+ ) -> None:+ result = _driver().run(endpoint, [_paged([first_row], has_more=True), _paged([second_row], has_more=False)])- assert [r["contactId"] for r in result.rows] == [1, 2]- assert [r.method for r in result.requests] == ["POST", "POST"]+ assert result.rows == [first_row, second_row]+ assert [(r.method, r.path) for r in result.requests] == [("POST", path), ("POST", path)]assert result.params("skip") == ["0", "1"]# Without a window the report returns only the last seven days.expected_body = {"filters": {"dateRangePreset": "allTime", "includeOutOfSequence": True}}@@ -133,6 +147,34 @@ class TestPagination:assert [(r["sequenceId"], r["id"]) for r in result.rows] == [(7, 50), (7, 51)]assert all("_sequences_id" not in r for r in result.rows)+ def test_sequence_folder_sequences_page_each_folder_and_carry_folder_id(self) -> None:+ result = _driver().run(+ "sequence_folder_sequences",+ route(+ {+ "/sequence-folders": [+ _bare([{"id": "folder-a", "name": "Sales"}, {"id": "folder-b", "name": "Old"}])+ ],+ "/sequence-folders/folder-a/sequences": [+ _paged([{"id": 7, "name": "Intro"}], has_more=True),+ _paged([{"id": 8, "name": "Follow up"}], has_more=False),+ ],+ # A folder deleted between the listing and its sequence fetch.+ "/sequence-folders/folder-b/sequences": [ScriptedResponse(status=404, json={})],+ }+ ),+ )++ assert result.raised is None+ assert [(r["folderId"], r["id"]) for r in result.rows] == [("folder-a", 7), ("folder-a", 8)]+ assert all("_sequence_folders_id" not in r for r in result.rows)+ child_requests = [r for r in result.requests if r.path.endswith("/sequences")]+ assert [(r.path, r.param("skip")) for r in child_requests] == [+ ("/v3/sequence-folders/folder-a/sequences", "0"),+ ("/v3/sequence-folders/folder-a/sequences", "1"),+ ("/v3/sequence-folders/folder-b/sequences", "0"),+ ]+def test_fanout_resumes_after_finished_sequences(self) -> None:script = {"/sequences": [_paged([{"id": 7}, {"id": 8}], has_more=False)],