Skip to content

: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.

feat(warehouse): add productive status, comment, and purchase order tables (#126979)

Tom Owersb1179426a112
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.md
index 2411690e833e..d0d2668e4add 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
@@ -9768,16 +9768,16 @@ Today (12): `bookings`, `companies`, `contact_entries`, `deals`, `expenses`, `in
Diffed against: <https://developer.productive.io/reference/download_spec?format=json>
-- [ ] `Deal statuses (GET /api/v2/deal_statuses)` — resolve deal stage identifiers and compare pipeline outcomes (high)
+- [x] `Deal statuses (GET /api/v2/deal_statuses)` — resolve deal stage identifiers and compare pipeline outcomes (high)
- [x] `Pipelines (GET /api/v2/pipelines)` — resolve pipeline identifiers in deals and group sales results by pipeline (high)
-- [ ] `Workflow statuses (GET /api/v2/workflow_statuses)` — resolve task status identifiers into lifecycle categories and names (high)
+- [x] `Workflow statuses (GET /api/v2/workflow_statuses)` — resolve task status identifiers into lifecycle categories and names (high)
- [x] `Service types (GET /api/v2/service_types)` — resolve service categories for revenue and work analysis (high)
- [x] `Task lists (GET /api/v2/task_lists)` — resolve task list identifiers and group work within projects (high)
- [x] `Line items (GET /api/v2/line_items)` — analyze invoice quantities, prices, taxes, and links to services or expenses (high)
- [ ] `Salaries (GET /api/v2/salaries)` — analyze labor cost rates and working capacity by person (medium)
- [ ] `Revenue distributions (GET /api/v2/revenue_distributions)` — track deal revenue allocation across reporting periods (medium)
-- [ ] `Purchase orders (GET /api/v2/purchase_orders)` — compare committed purchases with expenses and project budgets (medium)
-- [ ] `Comments (GET /api/v2/comments)` — analyze discussion activity and context attached to project work (medium)
+- [x] `Purchase orders (GET /api/v2/purchase_orders)` — compare committed purchases with expenses and project budgets (medium)
+- [x] `Comments (GET /api/v2/comments)` — analyze discussion activity and context attached to project work (medium)
Note: The official complete OpenAPI spec provides collection operations and resource schemas for the v2 API. Existing tables use a fixed endpoint map and retain JSON:API relationships. Authentication, integrations, notification plumbing, and document formatting are excluded.
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/productive/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/productive/canonical_descriptions.py
index effc6de7e5c5..640ca6fb342d 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/productive/canonical_descriptions.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/productive/canonical_descriptions.py
@@ -7,6 +7,10 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"description": "Scheduled work allocations and absences for people.",
"docs_url": "https://developer.productive.io/reference/resources/bookings",
},
+ "comments": {
+ "description": "Discussion comments attached to tasks, deals, and other Productive records.",
+ "docs_url": "https://developer.productive.io/reference/resources/comments",
+ },
"companies": {
"description": "Client organizations associated with projects, deals, budgets, and invoices.",
"docs_url": "https://developer.productive.io/reference/resources/companies",
@@ -15,6 +19,10 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"description": "Email addresses, phone numbers, websites, and postal addresses belonging to companies or people.",
"docs_url": "https://developer.productive.io/reference/resources/contact-entries",
},
+ "deal_statuses": {
+ "description": "Stages of a deal pipeline, including win probability and whether the stage counts as open, won, lost, or delivered.",
+ "docs_url": "https://developer.productive.io/reference/resources/deal-statuses",
+ },
"deals": {
"description": "Sales opportunities and delivery budgets, including their financial and pipeline details.",
"docs_url": "https://developer.productive.io/reference/resources/deals",
@@ -47,6 +55,10 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"description": "Workspaces organizing client and internal work, including tasks and budgets.",
"docs_url": "https://developer.productive.io/reference/resources/projects",
},
+ "purchase_orders": {
+ "description": "Orders issued to vendors for costs committed against deals and budgets, with totals and receipt status.",
+ "docs_url": "https://developer.productive.io/reference/resources/purchase-orders",
+ },
"service_types": {
"description": "Categories of work assigned to services, such as design or development.",
"docs_url": "https://developer.productive.io/reference/resources/service-types",
@@ -67,4 +79,8 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"description": "Time logged by people against services, including work dates and durations.",
"docs_url": "https://developer.productive.io/reference/resources/time-entries",
},
+ "workflow_statuses": {
+ "description": "Task statuses within a workflow, each mapped to a not started, started, or closed category.",
+ "docs_url": "https://developer.productive.io/reference/resources/workflow-statuses",
+ },
}
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/productive/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/productive/settings.py
index d4876b52186b..00572a597dd8 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/productive/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/productive/settings.py
@@ -16,8 +16,10 @@ class ProductiveEndpoint:
ENDPOINTS: dict[str, ProductiveEndpoint] = {
"bookings": ProductiveEndpoint(path="bookings"),
+ "comments": ProductiveEndpoint(path="comments"),
"companies": ProductiveEndpoint(path="companies"),
"contact_entries": ProductiveEndpoint(path="contact_entries", partition_key="id", partition_mode="md5"),
+ "deal_statuses": ProductiveEndpoint(path="deal_statuses", partition_key="id", partition_mode="md5"),
"deals": ProductiveEndpoint(path="deals"),
"expenses": ProductiveEndpoint(path="expenses"),
"invoices": ProductiveEndpoint(path="invoices"),
@@ -26,11 +28,13 @@ ENDPOINTS: dict[str, ProductiveEndpoint] = {
"people": ProductiveEndpoint(path="people"),
"pipelines": ProductiveEndpoint(path="pipelines"),
"projects": ProductiveEndpoint(path="projects"),
+ "purchase_orders": ProductiveEndpoint(path="purchase_orders"),
"service_types": ProductiveEndpoint(path="service_types", partition_key="id", partition_mode="md5"),
"services": ProductiveEndpoint(path="services", partition_key="id", partition_mode="md5"),
"task_lists": ProductiveEndpoint(path="task_lists", partition_key="id", partition_mode="md5"),
"tasks": ProductiveEndpoint(path="tasks"),
"time_entries": ProductiveEndpoint(path="time_entries"),
+ "workflow_statuses": ProductiveEndpoint(path="workflow_statuses", partition_key="id", partition_mode="md5"),
}
# Timestamp filters need live verification before they can safely drive a sync watermark.
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/productive/tests/test_productive.py b/products/warehouse_sources/backend/temporal/data_imports/sources/productive/tests/test_productive.py
index 947289130205..fcadc0000ba7 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/productive/tests/test_productive.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/productive/tests/test_productive.py
@@ -22,8 +22,10 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.productive
"endpoint",
[
"bookings",
+ "comments",
"companies",
"contact_entries",
+ "deal_statuses",
"deals",
"expenses",
"invoices",
@@ -32,11 +34,13 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.productive
"people",
"pipelines",
"projects",
+ "purchase_orders",
"service_types",
"services",
"task_lists",
"tasks",
"time_entries",
+ "workflow_statuses",
],
)
@responses.activate