: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 inflowinventory tables (#111521)
Tom Owers68648d78aba1
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 bdcd83ecacca..0b8e716d452e 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@@ -4272,15 +4272,15 @@ Note: Endpoint count is a wildly misleading measure of this API's size: of ~800## Inflowinventory — gaps-Today (5): `customers`, `products`, `purchase_orders`, `sales_orders`, `vendors`+Today (9): `categories`, `customers`, `locations`, `manufacturing_orders`, `products`, `purchase_orders`, `sales_orders`, `stock_transfers`, `vendors`Diffed against: <https://cloudapi.inflowinventory.com/docs/api/swagger.json>- [ ] `/{companyId}/stock-adjustments` — inventory write-offs and corrections - the transaction table that explains why on-hand quantities move outside of orders (high)-- [ ] `/{companyId}/stock-transfers` — inter-location inventory movements, required for any multi-warehouse stock analysis (high)-- [ ] `/{companyId}/manufacturing-orders` — production/assembly orders - the third order type alongside the sales and purchase orders already synced (high)-- [ ] `/{companyId}/locations` — lookup resolving the locationId carried on orders, transfers and product quantities (high)-- [ ] `/{companyId}/categories` — lookup resolving product categoryId - the primary breakdown dimension for any sales or inventory report (high)+- [x] `/{companyId}/stock-transfers` — inter-location inventory movements, required for any multi-warehouse stock analysis (high)+- [x] `/{companyId}/manufacturing-orders` — production/assembly orders - the third order type alongside the sales and purchase orders already synced (high)+- [x] `/{companyId}/locations` — lookup resolving the locationId carried on orders, transfers and product quantities (high)+- [x] `/{companyId}/categories` — lookup resolving product categoryId - the primary breakdown dimension for any sales or inventory report (high)- [ ] `/{companyId}/stock-counts` — physical count cycles and their variances, for shrinkage and count-accuracy reporting (medium)- [ ] `/{companyId}/product-cost-adjustments` — cost basis changes over time, needed for correct COGS and margin on historical orders (medium)- [ ] `/{companyId}/product-groups (+ /{productGroupId}/quantities/{locationId})` — product grouping lookup plus per-location on-hand quantities, the current-stock view products alone does not give (medium)diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/canonical_descriptions.pyindex cebd7b6a5ad1..ee0a69a716b9 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/canonical_descriptions.py@@ -86,4 +86,65 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"timestamp": "The row version timestamp used for change tracking.",},},+ "manufacturing_orders": {+ "description": "A manufacturing order that consumes component products to build finished products.",+ "docs_url": _DOCS_URL,+ "columns": {+ "manufacturingOrderId": "The unique ID of the manufacturing order.",+ "manufacturingOrderNumber": "The human-readable manufacturing order number.",+ "status": "The current status of the manufacturing order.",+ "orderDate": "The date the manufacturing order was created.",+ "dueDate": "The date the manufacturing order is due to be completed.",+ "completedDate": "The date the manufacturing order was completed.",+ "isCompleted": "Whether the manufacturing order is completed.",+ "isCancelled": "Whether the manufacturing order is cancelled.",+ "locationId": "The ID of the location where manufacturing takes place.",+ "primaryFinishedProductId": "The ID of the main finished product the order builds.",+ "numFinishedProducts": "The number of distinct finished products on the order.",+ "lines": "The finished product lines on the manufacturing order.",+ "lastModifiedDateTime": "When the manufacturing order was last modified.",+ "timestamp": "The row version timestamp used for change tracking.",+ },+ },+ "stock_transfers": {+ "description": "A stock transfer that moves inventory from one location to another.",+ "docs_url": _DOCS_URL,+ "columns": {+ "stockTransferId": "The unique ID of the stock transfer.",+ "transferNumber": "The human-readable transfer number.",+ "status": "The current status of the stock transfer.",+ "fromLocationId": "The ID of the location the stock is sent from.",+ "toLocationId": "The ID of the location the stock is sent to.",+ "transferDate": "The date of the stock transfer.",+ "sentDate": "The date the stock was sent.",+ "receivedDate": "The date the stock was received.",+ "isCancelled": "Whether the stock transfer is cancelled.",+ "lines": "The product lines moved by the transfer.",+ "lastModifiedDateTime": "When the stock transfer was last modified.",+ "timestamp": "The row version timestamp used for change tracking.",+ },+ },+ "locations": {+ "description": "A location (warehouse or store) where inventory is kept in inFlow Inventory.",+ "docs_url": _DOCS_URL,+ "columns": {+ "locationId": "The unique ID of the location.",+ "name": "The location name.",+ "address": "The address of the location.",+ "isActive": "Whether the location is active.",+ "isDefault": "Whether this is the default location.",+ "timestamp": "The row version timestamp used for change tracking.",+ },+ },+ "categories": {+ "description": "A product category used to group products in inFlow Inventory.",+ "docs_url": _DOCS_URL,+ "columns": {+ "categoryId": "The unique ID of the category.",+ "name": "The category name.",+ "parentCategoryId": "The ID of the parent category, if the category is nested.",+ "isDefault": "Whether this is the default category.",+ "timestamp": "The row version timestamp used for change tracking.",+ },+ },}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/settings.pyindex 878265396c59..1acdd18ea967 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/settings.py@@ -27,6 +27,14 @@ INFLOWINVENTORY_ENDPOINTS: dict[str, InflowInventoryEndpointConfig] = {"purchase_orders": InflowInventoryEndpointConfig(name="purchase_orders", path="purchase-orders", id_field="purchaseOrderId"),+ "manufacturing_orders": InflowInventoryEndpointConfig(+ name="manufacturing_orders", path="manufacturing-orders", id_field="manufacturingOrderId"+ ),+ "stock_transfers": InflowInventoryEndpointConfig(+ name="stock_transfers", path="stock-transfers", id_field="stockTransferId"+ ),+ "locations": InflowInventoryEndpointConfig(name="locations", path="locations", id_field="locationId"),+ "categories": InflowInventoryEndpointConfig(name="categories", path="categories", id_field="categoryId"),}ENDPOINTS = tuple(INFLOWINVENTORY_ENDPOINTS.keys())