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(data-warehouse): add 2 missing tables to the Systeme.io source (#119143)

Tom Owers5ecea7d21afd
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 21b77a471a80..26b770181ecb 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
@@ -11865,8 +11865,8 @@ Diffed against: <https://developer.systeme.io/llms.txt>
- [ ] `Subscriptions (GET /api/payment/subscriptions)` — analyze subscription growth, cancellations, and recurring revenue by price plan (high)
- [ ] `Email statistics (GET /api/mailing/statistics/newsletters; GET /api/mailing/statistics/campaign-steps; GET /api/mailing/statistics/automation-emails)` — compare messages sent, opens, clicks, bounces, and spam reports across email types (high)
-- [ ] `Digital products (GET /api/payment/digital-products)` — analyze the digital product catalog alongside courses and subscription offerings (medium)
-- [ ] `Physical products (GET /api/payment/physical-products)` — analyze physical product offerings and compare them with digital products (medium)
+- [x] `Digital products (GET /api/payment/digital-products)` — analyze the digital product catalog alongside courses and subscription offerings (medium)
+- [x] `Physical products (GET /api/payment/physical-products)` — analyze physical product offerings and compare them with digital products (medium)
- [ ] `Campaigns (GET /api/mailing/campaigns)` — analyze automated email campaigns alongside newsletters (medium)
- [ ] `Campaign steps (GET /api/mailing/campaigns/{campaignId}/steps)` — connect email performance to each message and its position in a campaign (medium)
- [ ] `Funnels (GET /api/funnels)` — identify marketing funnels for comparisons with contacts and their source URLs (medium)
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/canonical_descriptions.py
index fed02b3cdb44..52df9c5235cc 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/canonical_descriptions.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/canonical_descriptions.py
@@ -82,4 +82,32 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"contact": "Contact associated with the membership.",
},
},
+ "digital_products": {
+ "description": "Digital products sold through creator stores, funnels, or white-label areas.",
+ "docs_url": "https://developer.systeme.io/reference/api_paymentdigital-products_get_collection",
+ "columns": {
+ "id": "Unique digital product identifier.",
+ "name": "Digital product name.",
+ "source": "Area the digital product comes from: digital-store, funnel, or Whitelabel.",
+ "createdAt": "Date and time the digital product was created.",
+ "pricePlansCount": "Number of price plans attached to the digital product.",
+ "resourcesCount": "Number of resources attached to the digital product.",
+ "confirmationEmailId": "Identifier of the confirmation email sent after purchase.",
+ },
+ },
+ "physical_products": {
+ "description": "Physical products with SKU, price, and stock details.",
+ "docs_url": "https://developer.systeme.io/reference/api_paymentphysical-products_get_collection",
+ "columns": {
+ "id": "Unique physical product identifier.",
+ "name": "Physical product name.",
+ "createdAt": "Date and time the physical product was created.",
+ "updatedAt": "Date and time the physical product was last updated.",
+ "sku": "Stock keeping unit of the physical product.",
+ "currency": "Currency code of the product price.",
+ "price": "Product price in the smallest currency unit.",
+ "limitStock": "Whether the stock of the product is limited.",
+ "stock": "Number of units in stock when the stock is limited.",
+ },
+ },
}
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/settings.py
index 7a4a4943441f..7f6ba672d57e 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/settings.py
@@ -11,10 +11,17 @@ ENDPOINTS = {
"enrollments": "school/enrollments",
"communities": "community/communities",
"memberships": "community/memberships",
+ "digital_products": "payment/digital-products",
+ "physical_products": "payment/physical-products",
}
INCREMENTAL_FIELDS = {"contacts": [incremental_field("registeredAt")]}
-PARTITION_KEYS = {"contacts": "registeredAt", "tags": "createdAt"}
+PARTITION_KEYS = {
+ "contacts": "registeredAt",
+ "tags": "createdAt",
+ "digital_products": "createdAt",
+ "physical_products": "createdAt",
+}
AUTH_ERROR = "Systeme.io rejected your API key. Create a new key in your profile settings and reconnect."
PERMISSION_ERROR = "Your API key cannot access this Systeme.io resource. Check your account permissions and reconnect."
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/tests/test_systeme.py b/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/tests/test_systeme.py
index f651068d2155..5c4e726ecdcb 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/tests/test_systeme.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/systeme/tests/test_systeme.py
@@ -80,7 +80,15 @@ def test_invalid_or_repeated_cursor_fails(body: dict[str, Any], message: str) ->
@pytest.mark.parametrize("status,expected", [(200, None), (401, "rejected your API key"), (403, "account permissions")])
[email protected]("schema,path", [(None, "contacts"), ("newsletters", "mailing/newsletters")])
+ "schema,path",
+ [
+ (None, "contacts"),
+ ("newsletters", "mailing/newsletters"),
+ ("digital_products", "payment/digital-products"),
+ ("physical_products", "payment/physical-products"),
+ ],
+)
def test_validate_credentials_status_and_probe(
status: int, expected: str | None, schema: str | None, path: str
) -> None: