: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(warehouse-sources): add four missing flowlu tables (#108297)
Tom Owers8bd1d39d02de
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 05945cb6fa98..e63680148705 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@@ -3272,14 +3272,14 @@ Note: Machine-readable OpenAPI at /swagger-api-v3.yaml enumerates 26 resources;## Flowlu — **thin**-Today (13): `accounts`, `agile_issues`, `agile_sprints`, `customer_payments`, `estimates`, `invoices`, `leads`, `pipelines`, `products`, `projects`, `tasks`, `timesheets`, `transactions`+Today (17): `accounts`, `agile_issues`, `agile_sprints`, `customer_payments`, `estimates`, `invoice_items`, `invoices`, `leads`, `pipeline_stages`, `pipelines`, `products`, `project_stages`, `projects`, `tasks`, `timelogs`, `timesheets`, `transactions`Diffed against: <https://www.flowlu.com/api/json/openapien.json>-- [ ] `/crm/pipeline_stage/list` — lookup resolving the stage ID on every lead; we sync pipelines but not their stages (high)-- [ ] `/fin/invoice_item/list` — invoice line items - revenue by product/service instead of invoice totals only (high)-- [ ] `/timetracker/timelogs/list` — individual time log entries behind the timesheet rollups already synced (high)-- [ ] `/st/stages/list` — lookup resolving project stage IDs on the projects table (high)+- [x] `/crm/pipeline_stage/list` — lookup resolving the stage ID on every lead; we sync pipelines but not their stages (high) — added as `pipeline_stages`+- [x] `/fin/invoice_item/list` — invoice line items - revenue by product/service instead of invoice totals only (high) — added as `invoice_items`+- [x] `/timetracker/timelogs/list` — individual time log entries behind the timesheet rollups already synced (high) — added as `timelogs`+- [x] `/st/stages/list` — lookup resolving project stage IDs on the projects table (high) — added as `project_stages` (Flowlu has three separate stage entities; `/agile/stages` and `/task/stages` remain open)- [ ] `/crm/source/list` — lookup resolving lead source IDs - core attribution dimension (high)- [ ] `/agile/stages/list` — lookup resolving the workflow stage on agile_issues (high)- [ ] `/task/stages/list` — lookup resolving task workflow stage IDs (medium)@@ -3289,7 +3289,7 @@ Diffed against: <https://www.flowlu.com/api/json/openapien.json>- [ ] `/fin/organization/list` — lookup resolving the billing organization on invoices/transactions (medium)- [ ] `/crm/loss_reason/list` — lookup resolving loss reason IDs on closed-lost leads (medium)-Note: developers.flowlu.com is the API host, not docs (returns 404/api-key errors). The real spec is the ReDoc document at https://www.flowlu.com/api/json/openapien.json: 608 paths, 124 of them `/list` collections. PostHog exposes 13, so this is a small fraction - other untouched clusters include knowledgebase/\*, businessprocess/\*, telephony/calls, im/\* (chat threads and messages), products/pricelist_item and company/absences.+Note: developers.flowlu.com is the API host, not docs (returns 404/api-key errors). The real spec is the ReDoc document at https://www.flowlu.com/api/json/openapien.json: 608 paths, 124 of them `/list` collections. PostHog exposes 17, so this is a small fraction - other untouched clusters include knowledgebase/\*, businessprocess/\*, telephony/calls, im/\* (chat threads and messages), products/pricelist_item and company/absences.## FlyIo — gapsdiff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/flowlu/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/flowlu/canonical_descriptions.pyindex eeb4278a2a97..2ad465e45aa0 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/flowlu/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/flowlu/canonical_descriptions.py@@ -2,12 +2,13 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.common.canCanonicalDescriptions,)-# Descriptions sourced from the Flowlu REST API docs (https://developers.flowlu.com).+# Descriptions sourced from the Flowlu REST API spec (https://www.flowlu.com/api/json/openapien.json);+# developers.flowlu.com is the API host, not a docs site.# Partial coverage is fine — uncovered columns fall back to LLM enrichment.CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"accounts": {"description": "A CRM account in Flowlu — an organization or contact you do business with.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the account.","name": "The account's display name.",@@ -16,7 +17,7 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {},"leads": {"description": "A CRM opportunity (Flowlu's API keeps the legacy 'lead' entity name) tracked through a sales pipeline.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the opportunity.","name": "The opportunity's name.",@@ -24,15 +25,31 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {},"pipelines": {"description": "A CRM sales pipeline that opportunities move through.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the pipeline.","name": "The pipeline's name.",},},+ "pipeline_stages": {+ "description": "A stage of a CRM sales pipeline, resolving the stage an opportunity sits in.",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json",+ "columns": {+ "id": "The unique ID of the stage.",+ "name": "The stage's name.",+ "pipeline_id": "The ID of the pipeline this stage belongs to.",+ "ordering": "The stage's position in the pipeline, sorted ascending.",+ "active": "Whether the stage is still in use.",+ "color": "The stage's colour as a hex code.",+ "created_date": "When the stage was created.",+ "created_by": "The ID of the user who created the stage.",+ "updated_date": "When the stage was last changed.",+ "updated_by": "The ID of the user who last changed the stage.",+ },+ },"tasks": {"description": "A task in Flowlu's task management module.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the task.","name": "The task's title.",@@ -40,43 +57,82 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {},"projects": {"description": "A project in Flowlu's project management module.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the project.","name": "The project's name.",},},+ "project_stages": {+ "description": "A stage of a project workflow, resolving the stage a project sits in.",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json",+ "columns": {+ "id": "The unique ID of the stage.",+ "name": "The stage's name.",+ "fullname": "The stage's full name.",+ "description": "The stage's description.",+ "project_id": "The ID of the project this stage belongs to.",+ "project_type_id": "The ID of the project type whose workflow the stage belongs to.",+ "ordering": "The stage's position in the workflow, sorted ascending.",+ "color": "The stage's colour as a hex code.",+ },+ },"invoices": {"description": "An invoice issued to a customer in Flowlu's finance module.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the invoice.",},},+ "invoice_items": {+ "description": "A line item on an invoice, giving revenue per product or service rather than per invoice total.",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json",+ "columns": {+ "id": "The unique ID of the line item.",+ "invoice_id": "The ID of the invoice this line item belongs to.",+ "item_id": "The ID of the catalog product or service being billed.",+ "name": "The line item's name.",+ "description": "The line item's description.",+ "ordering": "The line item's position on the invoice, sorted ascending.",+ "quantity": "Quantity billed.",+ "unit_price": "Price per unit.",+ "unit_id": "The ID of the unit the quantity is measured in.",+ "discount": "The discount applied to the line item.",+ "discount_is_percent": "Whether the discount is a percentage (1) or a fixed amount (0).",+ "discount_amount": "The discount as a monetary amount.",+ "sub_total": "The line item total before tax.",+ "tax_total": "Total tax charged on the line item.",+ "total": "The line item total including tax.",+ "paid_total": "Amount paid against the line item.",+ "bcy_paid_total": "Amount paid, converted to the account's base currency.",+ "paid_date": "When the line item was paid.",+ "type": "Whether the row is a billable line (10) or a header (20).",+ },+ },"estimates": {"description": "An estimate (quote) prepared for a customer in Flowlu's finance module.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the estimate.",},},"customer_payments": {"description": "A payment received from a customer, typically applied against an invoice.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the payment.",},},"transactions": {"description": "A money transaction (income or expense) recorded in Flowlu's finance module.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the transaction.",},},"agile_issues": {"description": "An issue (user story, task, or bug) on a Flowlu agile board.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the issue.","name": "The issue's title.",@@ -84,7 +140,7 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {},"agile_sprints": {"description": "A sprint within a Flowlu agile project.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the sprint.","name": "The sprint's name.",@@ -92,14 +148,43 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {},"timesheets": {"description": "A time-tracking entry logged against tasks or projects in Flowlu.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the timesheet entry.",},},+ "timelogs": {+ "description": "An individual time log entry behind a timesheet, with the hours, rates, and amounts recorded for one stretch of work.",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json",+ "columns": {+ "id": "The unique ID of the time log.",+ "name": "The time log's name.",+ "description": "What the logged time was spent on.",+ "timesheet_id": "The ID of the timesheet this entry rolls up into.",+ "user_id": "The ID of the user the time is logged for.",+ "time_spent": "Time spent, in seconds.",+ "is_manual": "Whether the time was entered by hand rather than tracked by the timer.",+ "is_billable": "Whether the time is billable to the customer.",+ "is_approved": "Whether the time log has been approved.",+ "rate": "The rate used to value the logged time.",+ "billing_rate": "The rate charged to the customer.",+ "employee_cost_rate": "The hourly cost of the employee's work.",+ "amount": "The logged time valued at the rate.",+ "billing_amount": "The amount billed to the customer.",+ "employee_cost_amount": "The cost of the logged time to the business.",+ "currency_id": "The ID of the currency the amounts are in.",+ "start_timestamp": "When the timer was started.",+ "stop_timestamp": "When the timer was stopped.",+ "status": "The time log's status: new (0), running (10), paused (20), or stopped (30).",+ "created_date": "When the time log was created.",+ "created_by": "The ID of the user who created the time log.",+ "updated_date": "When the time log was last changed.",+ "updated_by": "The ID of the user who last changed the time log.",+ },+ },"products": {"description": "A product or service from Flowlu's product catalog.",- "docs_url": "https://developers.flowlu.com",+ "docs_url": "https://www.flowlu.com/api/json/openapien.json","columns": {"id": "The unique ID of the product.","name": "The product's name.",diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/flowlu/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/flowlu/settings.pyindex de34cb0b8e81..21f8f4bc62fe 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/flowlu/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/flowlu/settings.py@@ -23,15 +23,20 @@ FLOWLU_ENDPOINTS: dict[str, FlowluEndpointConfig] = {# Flowlu's API keeps the legacy `lead` entity name for CRM opportunities."leads": FlowluEndpointConfig(name="leads", path="/crm/lead/list"),"pipelines": FlowluEndpointConfig(name="pipelines", path="/crm/pipeline/list"),+ "pipeline_stages": FlowluEndpointConfig(name="pipeline_stages", path="/crm/pipeline_stage/list"),"tasks": FlowluEndpointConfig(name="tasks", path="/task/tasks/list"),"projects": FlowluEndpointConfig(name="projects", path="/st/projects/list"),+ # Flowlu has three separate stage entities; this one is the project stage (`/st/`).+ "project_stages": FlowluEndpointConfig(name="project_stages", path="/st/stages/list"),"invoices": FlowluEndpointConfig(name="invoices", path="/fin/invoice/list"),+ "invoice_items": FlowluEndpointConfig(name="invoice_items", path="/fin/invoice_item/list"),"estimates": FlowluEndpointConfig(name="estimates", path="/fin/estimate/list"),"customer_payments": FlowluEndpointConfig(name="customer_payments", path="/fin/customer_payment/list"),"transactions": FlowluEndpointConfig(name="transactions", path="/fin/transaction/list"),"agile_issues": FlowluEndpointConfig(name="agile_issues", path="/agile/issues/list"),"agile_sprints": FlowluEndpointConfig(name="agile_sprints", path="/agile/sprints/list"),"timesheets": FlowluEndpointConfig(name="timesheets", path="/timetracker/timesheets/list"),+ "timelogs": FlowluEndpointConfig(name="timelogs", path="/timetracker/timelogs/list"),"products": FlowluEndpointConfig(name="products", path="/products/product/list"),}