: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 gusto tax payments table (#119235)
Tom Owersa17ee4c2199d
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 c5d36fba2071..75aec5e82e5d 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@@ -5644,7 +5644,7 @@ Note: developer.getguru.com is a ReadMe site with no downloadable OpenAPI (opena## Gusto — gaps-Today (9): `companies`, `contractor_payments`, `contractors`, `employees`, `jobs`, `locations`, `pay_periods`, `pay_schedules`, `payrolls`+Today (10): `companies`, `contractor_payments`, `contractors`, `employees`, `jobs`, `locations`, `pay_periods`, `pay_schedules`, `payrolls`, `tax_payments`Diffed against: <https://docs.gusto.com/embedded-payroll/llms.txt>@@ -5658,6 +5658,7 @@ Diffed against: <https://docs.gusto.com/embedded-payroll/llms.txt>- [ ] `Employee time off activities (GET /v1/employees/{employee_uuid}/time_off_activities)` — explain leave balance changes through accrual, usage, and adjustment activity (medium)- [ ] `Recurring reimbursements (GET /v1/employees/{employee_id}/recurring_reimbursements)` — forecast recurring employee reimbursements separately from amounts already paid through payroll (medium)- [ ] `Events (GET /v1/events)` — track payroll and employee changes as events instead of inferring them from repeated snapshots (medium)+- [x] `Tax payments (GET /v1/companies/{company_uuid}/tax_payments)` — reconcile payroll tax liabilities with what Gusto paid each agency and when (medium)Note: Used the current documentation index and parsed version 2026-06-15 OpenAPI blocks from each selected reference page. Compared their GET operations with the nine static source tables. Compensation records, terminations, and garnishments are already nested in existing responses. Child collections need parent fan-out; events require system authentication and retain only 30 days.diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/gusto/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/gusto/canonical_descriptions.pyindex 4a53da52f072..733c38d311e6 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/gusto/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/gusto/canonical_descriptions.py@@ -180,4 +180,21 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"_company_uuid": "The company that made this payment.",},},+ "tax_payments": {+ "description": "A tax payment Gusto has made, or scheduled, to a tax agency on behalf of a company.",+ "docs_url": "https://docs.gusto.com/embedded-payroll/reference/get-tax-payments",+ "columns": {+ "uuid": "The unique identifier of the tax payment.",+ "company_uuid": "The company the tax payment belongs to.",+ "agency_name": "The name of the tax agency the payment is submitted to. Null for some legacy payments.",+ "jurisdiction": "The tax jurisdiction of the payment: a two-letter state code, or US for federal.",+ "period_start": "The first day of the tax period the payment covers.",+ "period_end": "The last day of the tax period the payment covers.",+ "due_date": "The date the payment is due to the agency.",+ "payment_sent_on": "The date Gusto submitted the payment. Null until submitted, and cleared if the payment is returned or cancelled.",+ "amount": "Total amount owed for the payment. Negative for corrections, refunds, or credits.",+ "amount_paid": "Amount paid toward the payment so far. Equal to amount once fully paid.",+ "_company_uuid": "The company this tax payment belongs to.",+ },+ },}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/gusto/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/gusto/settings.pyindex 5ef61992335b..0114364db64f 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/gusto/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/gusto/settings.py@@ -86,6 +86,14 @@ GUSTO_ENDPOINTS: dict[str, GustoEndpointConfig] = {# {"contractor_uuid": ..., "payments": [...]}]}.data_key="contractor_payments",),+ # The date filters here (due date, period, sent-on) don't track `amount_paid` and+ # `payment_sent_on` changing after a payment is scheduled, so a date watermark would leave+ # earlier unpaid payments stale. Full refresh keeps payment status current.+ "tax_payments": GustoEndpointConfig(+ name="tax_payments",+ path="/v1/companies/{company_uuid}/tax_payments",+ primary_keys=["uuid"],+ ),}ENDPOINTS = tuple(GUSTO_ENDPOINTS.keys())