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.

chore(cdp): move destination templates klaviyo to zendesk into products (#115475)

Harley Alexanderc4d6fb1ae393
diff --git a/posthog/cdp/templates/__init__.py b/posthog/cdp/templates/__init__.py
index 284ff87c91a3..d847ff9da1c1 100644
--- a/posthog/cdp/templates/__init__.py
+++ b/posthog/cdp/templates/__init__.py
@@ -38,55 +38,55 @@ from products.cdp.backend.templates.intercom.template_intercom import (
template_send_event as intercom_send_event,
)
from products.cdp.backend.templates.june.template_june import template as june
-
-from ._siteapps.template_debug_posthog import template as debug_posthog
-from ._siteapps.template_early_access_features import template as early_access_features
-from ._siteapps.template_hogdesk import template as hogdesk
-from ._siteapps.template_notification_bar import template as notification_bar
-from ._siteapps.template_pineapple_mode import template as pineapple_mode
-from .klaviyo.template_klaviyo import (
+from products.cdp.backend.templates.klaviyo.template_klaviyo import (
template_event as klaviyo_event,
template_user as klaviyo_user,
)
-from .knock.template_knock import template as knock
-from .kudosity.template_kudosity import template as kudosity
-from .loops.template_loops import (
+from products.cdp.backend.templates.kudosity.template_kudosity import template as kudosity
+from products.cdp.backend.templates.loops.template_loops import (
TemplateLoopsMigrator,
template as loops,
template_send_event as loops_send_event,
)
-from .mailchimp.template_mailchimp import template as mailchimp
-from .mailgun.template_mailgun import template_mailgun_send_email as mailgun
-from .mailjet.template_mailjet import (
+from products.cdp.backend.templates.mailchimp.template_mailchimp import template as mailchimp
+from products.cdp.backend.templates.mailgun.template_mailgun import template_mailgun_send_email as mailgun
+from products.cdp.backend.templates.mailjet.template_mailjet import (
template_create_contact as mailjet_create_contact,
template_update_contact_list as mailjet_update_contact_list,
)
-from .make.template_make import template as make
-from .microsoft_teams.template_microsoft_teams import template as microsoft_teams
-from .onesignal.template_onesignal import template as onesignal
-from .posthog.template_posthog import (
+from products.cdp.backend.templates.make.template_make import template as make
+from products.cdp.backend.templates.microsoft_teams.template_microsoft_teams import template as microsoft_teams
+from products.cdp.backend.templates.onesignal.template_onesignal import template as onesignal
+from products.cdp.backend.templates.posthog.template_posthog import (
TemplatePostHogMigrator,
template as posthog,
)
-from .reddit.template_reddit_pixel import template_reddit_pixel as reddit_pixel
-from .rudderstack.template_rudderstack import (
+from products.cdp.backend.templates.reddit.template_reddit_pixel import template_reddit_pixel as reddit_pixel
+from products.cdp.backend.templates.rudderstack.template_rudderstack import (
TemplateRudderstackMigrator,
template as rudderstack,
)
-from .salesforce.template_salesforce import (
+from products.cdp.backend.templates.salesforce.template_salesforce import (
template_create as salesforce_create,
template_lookup as salesforce_lookup,
template_update as salesforce_update,
)
-from .sendgrid.template_sendgrid import (
+from products.cdp.backend.templates.sendgrid.template_sendgrid import (
TemplateSendGridMigrator,
template as sendgrid,
)
-from .snapchat_ads.template_pixel import template_snapchat_pixel as snapchat_pixel
-from .tiktok_ads.template_tiktok_pixel import template_tiktok_pixel as tiktok_pixel
-from .userlist.template_userlist import template as userlist
+from products.cdp.backend.templates.snapchat_ads.template_pixel import template_snapchat_pixel as snapchat_pixel
+from products.cdp.backend.templates.tiktok_ads.template_tiktok_pixel import template_tiktok_pixel as tiktok_pixel
+from products.cdp.backend.templates.userlist.template_userlist import template as userlist
+from products.cdp.backend.templates.zendesk.template_zendesk import template as zendesk
+
+from ._siteapps.template_debug_posthog import template as debug_posthog
+from ._siteapps.template_early_access_features import template as early_access_features
+from ._siteapps.template_hogdesk import template as hogdesk
+from ._siteapps.template_notification_bar import template as notification_bar
+from ._siteapps.template_pineapple_mode import template as pineapple_mode
+from .knock.template_knock import template as knock
from .zapier.template_zapier import template as zapier
-from .zendesk.template_zendesk import template as zendesk
HOG_FUNCTION_TEMPLATES = [
blank_site_destination,
diff --git a/posthog/test/repo_invariants/database_free_test_classes_baseline.txt b/posthog/test/repo_invariants/database_free_test_classes_baseline.txt
index b65aeeb100e0..a997d59a3f6a 100644
--- a/posthog/test/repo_invariants/database_free_test_classes_baseline.txt
+++ b/posthog/test/repo_invariants/database_free_test_classes_baseline.txt
@@ -88,10 +88,10 @@ posthog/caching/test/test_redis_cluster_keys.py::TestRedisClusterKeySlots
products/cdp/backend/templates/avo/test_template_avo.py::TestTemplateMigration
products/cdp/backend/templates/customerio/test_template_customerio.py::TestTemplateMigration
products/cdp/backend/templates/hubspot/test_template_hubspot.py::TestTemplateMigration
-posthog/cdp/templates/posthog/test_template_posthog.py::TestTemplateMigration
-posthog/cdp/templates/rudderstack/test_template_rudderstack.py::TestTemplateMigration
-posthog/cdp/templates/salesforce/test_template_salesforce.py::TestTemplateMigration
-posthog/cdp/templates/sendgrid/test_template_sendgrid.py::TestTemplateMigration
+products/cdp/backend/templates/posthog/test_template_posthog.py::TestTemplateMigration
+products/cdp/backend/templates/rudderstack/test_template_rudderstack.py::TestTemplateMigration
+products/cdp/backend/templates/salesforce/test_template_salesforce.py::TestTemplateMigration
+products/cdp/backend/templates/sendgrid/test_template_sendgrid.py::TestTemplateMigration
posthog/clickhouse/client/test/test_limit.py::TestRateLimit
posthog/clickhouse/test/test_deletion_coverage.py::TestDeletionCoverage
posthog/clickhouse/test/test_query_tagging.py::TestAddFallbackQueryTags
diff --git a/posthog/cdp/templates/klaviyo/template_klaviyo.py b/products/cdp/backend/templates/klaviyo/template_klaviyo.py
similarity index 99%
rename from posthog/cdp/templates/klaviyo/template_klaviyo.py
rename to products/cdp/backend/templates/klaviyo/template_klaviyo.py
index bae813d32045..4a2ab3069541 100644
--- a/posthog/cdp/templates/klaviyo/template_klaviyo.py
+++ b/products/cdp/backend/templates/klaviyo/template_klaviyo.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC
template_user: HogFunctionTemplateDC = HogFunctionTemplateDC(
status="stable",
diff --git a/posthog/cdp/templates/klaviyo/test_template_klaviyo.py b/products/cdp/backend/templates/klaviyo/test_template_klaviyo.py
similarity index 99%
rename from posthog/cdp/templates/klaviyo/test_template_klaviyo.py
rename to products/cdp/backend/templates/klaviyo/test_template_klaviyo.py
index 583d52463db0..df49c262b818 100644
--- a/posthog/cdp/templates/klaviyo/test_template_klaviyo.py
+++ b/products/cdp/backend/templates/klaviyo/test_template_klaviyo.py
@@ -1,7 +1,8 @@
import pytest
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.klaviyo.template_klaviyo import (
+
+from products.cdp.backend.templates.klaviyo.template_klaviyo import (
template_event as klaviyo_event,
template_user as klaviyo_user,
)
diff --git a/posthog/cdp/templates/kudosity/template_kudosity.py b/products/cdp/backend/templates/kudosity/template_kudosity.py
similarity index 98%
rename from posthog/cdp/templates/kudosity/template_kudosity.py
rename to products/cdp/backend/templates/kudosity/template_kudosity.py
index 51d97c7eff79..739b55003b51 100644
--- a/posthog/cdp/templates/kudosity/template_kudosity.py
+++ b/products/cdp/backend/templates/kudosity/template_kudosity.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC
template: HogFunctionTemplateDC = HogFunctionTemplateDC(
status="stable",
diff --git a/posthog/cdp/templates/kudosity/test_template_kudosity.py b/products/cdp/backend/templates/kudosity/test_template_kudosity.py
similarity index 97%
rename from posthog/cdp/templates/kudosity/test_template_kudosity.py
rename to products/cdp/backend/templates/kudosity/test_template_kudosity.py
index 5da34b4d001a..cc4d18d1e702 100644
--- a/posthog/cdp/templates/kudosity/test_template_kudosity.py
+++ b/products/cdp/backend/templates/kudosity/test_template_kudosity.py
@@ -1,5 +1,6 @@
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.kudosity.template_kudosity import template as template_kudosity
+
+from products.cdp.backend.templates.kudosity.template_kudosity import template as template_kudosity
class TestTemplateKudosity(BaseHogFunctionTemplateTest):
diff --git a/posthog/cdp/templates/loops/template_loops.py b/products/cdp/backend/templates/loops/template_loops.py
similarity index 98%
rename from posthog/cdp/templates/loops/template_loops.py
rename to products/cdp/backend/templates/loops/template_loops.py
index 3e5a2106e01b..cd6ced34f00f 100644
--- a/posthog/cdp/templates/loops/template_loops.py
+++ b/products/cdp/backend/templates/loops/template_loops.py
@@ -1,7 +1,7 @@
import dataclasses
from copy import deepcopy
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC, HogFunctionTemplateMigrator
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC, HogFunctionTemplateMigrator
template: HogFunctionTemplateDC = HogFunctionTemplateDC(
status="stable",
diff --git a/posthog/cdp/templates/loops/test_template_loops.py b/products/cdp/backend/templates/loops/test_template_loops.py
similarity index 98%
rename from posthog/cdp/templates/loops/test_template_loops.py
rename to products/cdp/backend/templates/loops/test_template_loops.py
index 8df017baf6e0..55ac7b237f3f 100644
--- a/posthog/cdp/templates/loops/test_template_loops.py
+++ b/products/cdp/backend/templates/loops/test_template_loops.py
@@ -1,5 +1,6 @@
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.loops.template_loops import (
+
+from products.cdp.backend.templates.loops.template_loops import (
template as template_loops,
template_send_event as template_loops_send_event,
)
diff --git a/posthog/cdp/templates/mailchimp/template_mailchimp.py b/products/cdp/backend/templates/mailchimp/template_mailchimp.py
similarity index 98%
rename from posthog/cdp/templates/mailchimp/template_mailchimp.py
rename to products/cdp/backend/templates/mailchimp/template_mailchimp.py
index d9ddec0dfd9b..17ce9e256ffb 100644
--- a/posthog/cdp/templates/mailchimp/template_mailchimp.py
+++ b/products/cdp/backend/templates/mailchimp/template_mailchimp.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC
template: HogFunctionTemplateDC = HogFunctionTemplateDC(
status="deprecated",
diff --git a/posthog/cdp/templates/mailchimp/test_template_mailchimp.py b/products/cdp/backend/templates/mailchimp/test_template_mailchimp.py
similarity index 96%
rename from posthog/cdp/templates/mailchimp/test_template_mailchimp.py
rename to products/cdp/backend/templates/mailchimp/test_template_mailchimp.py
index 3f249bf98a59..a9f43be833cb 100644
--- a/posthog/cdp/templates/mailchimp/test_template_mailchimp.py
+++ b/products/cdp/backend/templates/mailchimp/test_template_mailchimp.py
@@ -1,5 +1,6 @@
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.mailchimp.template_mailchimp import template as template_mailchimp
+
+from products.cdp.backend.templates.mailchimp.template_mailchimp import template as template_mailchimp
def create_inputs(**kwargs):
diff --git a/posthog/cdp/templates/mailgun/template_mailgun.py b/products/cdp/backend/templates/mailgun/template_mailgun.py
similarity index 97%
rename from posthog/cdp/templates/mailgun/template_mailgun.py
rename to products/cdp/backend/templates/mailgun/template_mailgun.py
index 8d63dab0463c..6be7af3f0aff 100644
--- a/posthog/cdp/templates/mailgun/template_mailgun.py
+++ b/products/cdp/backend/templates/mailgun/template_mailgun.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC
# See https://documentation.mailgun.com/docs/mailgun/api-reference/openapi-final/tag/Messages
diff --git a/posthog/cdp/templates/mailgun/test_template_mailgun.py b/products/cdp/backend/templates/mailgun/test_template_mailgun.py
similarity index 97%
rename from posthog/cdp/templates/mailgun/test_template_mailgun.py
rename to products/cdp/backend/templates/mailgun/test_template_mailgun.py
index 70063c77dc34..3e9e4197f58d 100644
--- a/posthog/cdp/templates/mailgun/test_template_mailgun.py
+++ b/products/cdp/backend/templates/mailgun/test_template_mailgun.py
@@ -1,7 +1,8 @@
from typing import Optional
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.mailgun.template_mailgun import template_mailgun_send_email
+
+from products.cdp.backend.templates.mailgun.template_mailgun import template_mailgun_send_email
def create_inputs(overrides: Optional[dict] = None):
diff --git a/posthog/cdp/templates/mailjet/template_mailjet.py b/products/cdp/backend/templates/mailjet/template_mailjet.py
similarity index 98%
rename from posthog/cdp/templates/mailjet/template_mailjet.py
rename to products/cdp/backend/templates/mailjet/template_mailjet.py
index ef39f8dd55a2..576311e50a8a 100644
--- a/posthog/cdp/templates/mailjet/template_mailjet.py
+++ b/products/cdp/backend/templates/mailjet/template_mailjet.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC
# See https://dev.mailjet.com/email/reference/contacts/contact-list/
diff --git a/posthog/cdp/templates/mailjet/test_template_mailjet.py b/products/cdp/backend/templates/mailjet/test_template_mailjet.py
similarity index 93%
rename from posthog/cdp/templates/mailjet/test_template_mailjet.py
rename to products/cdp/backend/templates/mailjet/test_template_mailjet.py
index 893f61594f11..853d629d0511 100644
--- a/posthog/cdp/templates/mailjet/test_template_mailjet.py
+++ b/products/cdp/backend/templates/mailjet/test_template_mailjet.py
@@ -1,5 +1,9 @@
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.mailjet.template_mailjet import template_create_contact, template_update_contact_list
+
+from products.cdp.backend.templates.mailjet.template_mailjet import (
+ template_create_contact,
+ template_update_contact_list,
+)
def create_inputs(**kwargs):
diff --git a/posthog/cdp/templates/make/template_make.py b/products/cdp/backend/templates/make/template_make.py
similarity index 95%
rename from posthog/cdp/templates/make/template_make.py
rename to products/cdp/backend/templates/make/template_make.py
index 44551988a450..4cb8382b3f75 100644
--- a/posthog/cdp/templates/make/template_make.py
+++ b/products/cdp/backend/templates/make/template_make.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC
template: HogFunctionTemplateDC = HogFunctionTemplateDC(
status="stable",
diff --git a/posthog/cdp/templates/make/test_template_make.py b/products/cdp/backend/templates/make/test_template_make.py
similarity index 96%
rename from posthog/cdp/templates/make/test_template_make.py
rename to products/cdp/backend/templates/make/test_template_make.py
index dddf457dd752..201fa99721d0 100644
--- a/posthog/cdp/templates/make/test_template_make.py
+++ b/products/cdp/backend/templates/make/test_template_make.py
@@ -1,7 +1,8 @@
import pytest
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.make.template_make import template as template_make
+
+from products.cdp.backend.templates.make.template_make import template as template_make
class TestTemplateMake(BaseHogFunctionTemplateTest):
diff --git a/posthog/cdp/templates/microsoft_teams/template_microsoft_teams.py b/products/cdp/backend/templates/microsoft_teams/template_microsoft_teams.py
similarity index 97%
rename from posthog/cdp/templates/microsoft_teams/template_microsoft_teams.py
rename to products/cdp/backend/templates/microsoft_teams/template_microsoft_teams.py
index 0a8f5d475303..7ef1e8f9c14e 100644
--- a/posthog/cdp/templates/microsoft_teams/template_microsoft_teams.py
+++ b/products/cdp/backend/templates/microsoft_teams/template_microsoft_teams.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC
template: HogFunctionTemplateDC = HogFunctionTemplateDC(
status="stable",
diff --git a/posthog/cdp/templates/microsoft_teams/test_template_microsoft_teams.py b/products/cdp/backend/templates/microsoft_teams/test_template_microsoft_teams.py
similarity index 97%
rename from posthog/cdp/templates/microsoft_teams/test_template_microsoft_teams.py
rename to products/cdp/backend/templates/microsoft_teams/test_template_microsoft_teams.py
index c9fd4e45dd7f..7cd21ed55e11 100644
--- a/posthog/cdp/templates/microsoft_teams/test_template_microsoft_teams.py
+++ b/products/cdp/backend/templates/microsoft_teams/test_template_microsoft_teams.py
@@ -1,7 +1,8 @@
import pytest
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.microsoft_teams.template_microsoft_teams import template as template_microsoft_teams
+
+from products.cdp.backend.templates.microsoft_teams.template_microsoft_teams import template as template_microsoft_teams
class TestTemplateMicrosoftTeams(BaseHogFunctionTemplateTest):
diff --git a/posthog/cdp/templates/onesignal/template_onesignal.py b/products/cdp/backend/templates/onesignal/template_onesignal.py
similarity index 97%
rename from posthog/cdp/templates/onesignal/template_onesignal.py
rename to products/cdp/backend/templates/onesignal/template_onesignal.py
index 67508ce6f699..f0e550f9f9df 100644
--- a/posthog/cdp/templates/onesignal/template_onesignal.py
+++ b/products/cdp/backend/templates/onesignal/template_onesignal.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC
template: HogFunctionTemplateDC = HogFunctionTemplateDC(
status="stable",
diff --git a/posthog/cdp/templates/onesignal/test_template_onesignal.py b/products/cdp/backend/templates/onesignal/test_template_onesignal.py
similarity index 95%
rename from posthog/cdp/templates/onesignal/test_template_onesignal.py
rename to products/cdp/backend/templates/onesignal/test_template_onesignal.py
index 7d91bb952b68..23ab922567c8 100644
--- a/posthog/cdp/templates/onesignal/test_template_onesignal.py
+++ b/products/cdp/backend/templates/onesignal/test_template_onesignal.py
@@ -2,7 +2,8 @@ import pytest
import time_machine
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.onesignal.template_onesignal import template as template_onesignal
+
+from products.cdp.backend.templates.onesignal.template_onesignal import template as template_onesignal
from common.hogvm.python.utils import UncaughtHogVMException
diff --git a/posthog/cdp/templates/posthog/template_posthog.py b/products/cdp/backend/templates/posthog/template_posthog.py
similarity index 97%
rename from posthog/cdp/templates/posthog/template_posthog.py
rename to products/cdp/backend/templates/posthog/template_posthog.py
index b2b9034511f9..baec7e929eb7 100644
--- a/posthog/cdp/templates/posthog/template_posthog.py
+++ b/products/cdp/backend/templates/posthog/template_posthog.py
@@ -3,7 +3,7 @@ from copy import deepcopy
from posthog.hogql.escape_sql import escape_hogql_string
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC, HogFunctionTemplateMigrator
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC, HogFunctionTemplateMigrator
template: HogFunctionTemplateDC = HogFunctionTemplateDC(
status="stable",
diff --git a/posthog/cdp/templates/posthog/test_template_posthog.py b/products/cdp/backend/templates/posthog/test_template_posthog.py
similarity index 98%
rename from posthog/cdp/templates/posthog/test_template_posthog.py
rename to products/cdp/backend/templates/posthog/test_template_posthog.py
index a41d0f50c22b..58c446e9e138 100644
--- a/posthog/cdp/templates/posthog/test_template_posthog.py
+++ b/products/cdp/backend/templates/posthog/test_template_posthog.py
@@ -1,13 +1,13 @@
from posthog.test.base import BaseTest
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.posthog.template_posthog import (
+
+from products.cdp.backend.models.plugin import PluginConfig
+from products.cdp.backend.templates.posthog.template_posthog import (
TemplatePostHogMigrator,
template as template_posthog,
)
-from products.cdp.backend.models.plugin import PluginConfig
-
class TestTemplatePosthog(BaseHogFunctionTemplateTest):
template = template_posthog
diff --git a/posthog/cdp/templates/reddit/template_reddit_pixel.py b/products/cdp/backend/templates/reddit/template_reddit_pixel.py
similarity index 98%
rename from posthog/cdp/templates/reddit/template_reddit_pixel.py
rename to products/cdp/backend/templates/reddit/template_reddit_pixel.py
index f240599ad99d..f8da4987ea03 100644
--- a/posthog/cdp/templates/reddit/template_reddit_pixel.py
+++ b/products/cdp/backend/templates/reddit/template_reddit_pixel.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionMappingTemplate, HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionMappingTemplate, HogFunctionTemplateDC
common_inputs = [
{
diff --git a/posthog/cdp/templates/reddit/test_template_reddit_pixel.py b/products/cdp/backend/templates/reddit/test_template_reddit_pixel.py
similarity index 98%
rename from posthog/cdp/templates/reddit/test_template_reddit_pixel.py
rename to products/cdp/backend/templates/reddit/test_template_reddit_pixel.py
index 1adc51ef81fa..1a101e3a00d2 100644
--- a/posthog/cdp/templates/reddit/test_template_reddit_pixel.py
+++ b/products/cdp/backend/templates/reddit/test_template_reddit_pixel.py
@@ -1,5 +1,6 @@
from posthog.cdp.templates.helpers import BaseSiteDestinationFunctionTest
-from posthog.cdp.templates.reddit.template_reddit_pixel import template_reddit_pixel
+
+from products.cdp.backend.templates.reddit.template_reddit_pixel import template_reddit_pixel
TEST_EMAIL = "[email protected]"
TEST_PRODUCT_ID = "product12345"
diff --git a/posthog/cdp/templates/rudderstack/template_rudderstack.py b/products/cdp/backend/templates/rudderstack/template_rudderstack.py
similarity index 98%
rename from posthog/cdp/templates/rudderstack/template_rudderstack.py
rename to products/cdp/backend/templates/rudderstack/template_rudderstack.py
index 67ce86951954..449ee0215260 100644
--- a/posthog/cdp/templates/rudderstack/template_rudderstack.py
+++ b/products/cdp/backend/templates/rudderstack/template_rudderstack.py
@@ -1,7 +1,7 @@
import dataclasses
from copy import deepcopy
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC, HogFunctionTemplateMigrator
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC, HogFunctionTemplateMigrator
template: HogFunctionTemplateDC = HogFunctionTemplateDC(
status="stable",
diff --git a/posthog/cdp/templates/rudderstack/test_template_rudderstack.py b/products/cdp/backend/templates/rudderstack/test_template_rudderstack.py
similarity index 98%
rename from posthog/cdp/templates/rudderstack/test_template_rudderstack.py
rename to products/cdp/backend/templates/rudderstack/test_template_rudderstack.py
index 1ea1a62d7381..82fcc0afef3b 100644
--- a/posthog/cdp/templates/rudderstack/test_template_rudderstack.py
+++ b/products/cdp/backend/templates/rudderstack/test_template_rudderstack.py
@@ -1,13 +1,13 @@
from posthog.test.base import BaseTest
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.rudderstack.template_rudderstack import (
+
+from products.cdp.backend.models.plugin import PluginConfig
+from products.cdp.backend.templates.rudderstack.template_rudderstack import (
TemplateRudderstackMigrator,
template as template_rudderstack,
)
-from products.cdp.backend.models.plugin import PluginConfig
-
class TestTemplateRudderstack(BaseHogFunctionTemplateTest):
template = template_rudderstack
diff --git a/posthog/cdp/templates/salesforce/template_salesforce.py b/products/cdp/backend/templates/salesforce/template_salesforce.py
similarity index 99%
rename from posthog/cdp/templates/salesforce/template_salesforce.py
rename to products/cdp/backend/templates/salesforce/template_salesforce.py
index 9a81a1f5dda3..550cc7de2848 100644
--- a/posthog/cdp/templates/salesforce/template_salesforce.py
+++ b/products/cdp/backend/templates/salesforce/template_salesforce.py
@@ -1,7 +1,7 @@
import dataclasses
from copy import deepcopy
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC, HogFunctionTemplateMigrator
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC, HogFunctionTemplateMigrator
common_filters = {
"events": [{"id": "$identify", "name": "$identify", "type": "events", "order": 0}],
diff --git a/posthog/cdp/templates/salesforce/test_template_salesforce.py b/products/cdp/backend/templates/salesforce/test_template_salesforce.py
similarity index 99%
rename from posthog/cdp/templates/salesforce/test_template_salesforce.py
rename to products/cdp/backend/templates/salesforce/test_template_salesforce.py
index 851729cdef0b..54209fd6e2ed 100644
--- a/posthog/cdp/templates/salesforce/test_template_salesforce.py
+++ b/products/cdp/backend/templates/salesforce/test_template_salesforce.py
@@ -4,15 +4,15 @@ from posthog.test.base import BaseTest
from parameterized import parameterized
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.salesforce.template_salesforce import (
+
+from products.cdp.backend.models.plugin import PluginConfig
+from products.cdp.backend.templates.salesforce.template_salesforce import (
TemplatSalesforceMigrator,
template_create as template_salesforce_create,
template_lookup as template_salesforce_lookup,
template_update as template_salesforce_update,
)
-from products.cdp.backend.models.plugin import PluginConfig
-
from common.hogvm.python.utils import UncaughtHogVMException
diff --git a/posthog/cdp/templates/sendgrid/template_sendgrid.py b/products/cdp/backend/templates/sendgrid/template_sendgrid.py
similarity index 97%
rename from posthog/cdp/templates/sendgrid/template_sendgrid.py
rename to products/cdp/backend/templates/sendgrid/template_sendgrid.py
index 56b1724c54a6..24eaa5b25c54 100644
--- a/posthog/cdp/templates/sendgrid/template_sendgrid.py
+++ b/products/cdp/backend/templates/sendgrid/template_sendgrid.py
@@ -1,7 +1,7 @@
import dataclasses
from copy import deepcopy
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC, HogFunctionTemplateMigrator
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC, HogFunctionTemplateMigrator
# Based off of https://www.twilio.com/docs/sendgrid/api-reference/contacts/add-or-update-a-contact
diff --git a/posthog/cdp/templates/sendgrid/test_template_sendgrid.py b/products/cdp/backend/templates/sendgrid/test_template_sendgrid.py
similarity index 98%
rename from posthog/cdp/templates/sendgrid/test_template_sendgrid.py
rename to products/cdp/backend/templates/sendgrid/test_template_sendgrid.py
index 67d60bca55a4..4a2746de0772 100644
--- a/posthog/cdp/templates/sendgrid/test_template_sendgrid.py
+++ b/products/cdp/backend/templates/sendgrid/test_template_sendgrid.py
@@ -1,13 +1,13 @@
from posthog.test.base import BaseTest
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.sendgrid.template_sendgrid import (
+
+from products.cdp.backend.models.plugin import PluginConfig
+from products.cdp.backend.templates.sendgrid.template_sendgrid import (
TemplateSendGridMigrator,
template as template_sendgrid,
)
-from products.cdp.backend.models.plugin import PluginConfig
-
class TestTemplateSendgrid(BaseHogFunctionTemplateTest):
template = template_sendgrid
diff --git a/posthog/cdp/templates/snapchat_ads/template_pixel.py b/products/cdp/backend/templates/snapchat_ads/template_pixel.py
similarity index 99%
rename from posthog/cdp/templates/snapchat_ads/template_pixel.py
rename to products/cdp/backend/templates/snapchat_ads/template_pixel.py
index e14e21792eb9..d5f4a59de440 100644
--- a/posthog/cdp/templates/snapchat_ads/template_pixel.py
+++ b/products/cdp/backend/templates/snapchat_ads/template_pixel.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionMappingTemplate, HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionMappingTemplate, HogFunctionTemplateDC
def build_inputs(multiProductEvent=False):
diff --git a/posthog/cdp/templates/tiktok_ads/template_tiktok_pixel.py b/products/cdp/backend/templates/tiktok_ads/template_tiktok_pixel.py
similarity index 99%
rename from posthog/cdp/templates/tiktok_ads/template_tiktok_pixel.py
rename to products/cdp/backend/templates/tiktok_ads/template_tiktok_pixel.py
index 5ee31b80b960..bba8336af9c3 100644
--- a/posthog/cdp/templates/tiktok_ads/template_tiktok_pixel.py
+++ b/products/cdp/backend/templates/tiktok_ads/template_tiktok_pixel.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionMappingTemplate, HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionMappingTemplate, HogFunctionTemplateDC
def build_inputs(multiProductEvent=False):
diff --git a/posthog/cdp/templates/userlist/template_userlist.py b/products/cdp/backend/templates/userlist/template_userlist.py
similarity index 98%
rename from posthog/cdp/templates/userlist/template_userlist.py
rename to products/cdp/backend/templates/userlist/template_userlist.py
index 6d3f0e5c3d06..b61f654ee8bd 100644
--- a/posthog/cdp/templates/userlist/template_userlist.py
+++ b/products/cdp/backend/templates/userlist/template_userlist.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC
template: HogFunctionTemplateDC = HogFunctionTemplateDC(
status="stable",
diff --git a/posthog/cdp/templates/userlist/test_template_userlist.py b/products/cdp/backend/templates/userlist/test_template_userlist.py
similarity index 99%
rename from posthog/cdp/templates/userlist/test_template_userlist.py
rename to products/cdp/backend/templates/userlist/test_template_userlist.py
index 2b5fe402f2a7..ab1bd3cce026 100644
--- a/posthog/cdp/templates/userlist/test_template_userlist.py
+++ b/products/cdp/backend/templates/userlist/test_template_userlist.py
@@ -1,5 +1,6 @@
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.userlist.template_userlist import template as template_userlist
+
+from products.cdp.backend.templates.userlist.template_userlist import template as template_userlist
def create_inputs(**kwargs):
diff --git a/posthog/cdp/templates/zendesk/template_zendesk.py b/products/cdp/backend/templates/zendesk/template_zendesk.py
similarity index 97%
rename from posthog/cdp/templates/zendesk/template_zendesk.py
rename to products/cdp/backend/templates/zendesk/template_zendesk.py
index a6ab8f81dc32..aabf1bdf07c5 100644
--- a/posthog/cdp/templates/zendesk/template_zendesk.py
+++ b/products/cdp/backend/templates/zendesk/template_zendesk.py
@@ -1,4 +1,4 @@
-from posthog.cdp.templates.hog_function_template import HogFunctionTemplateDC
+from products.cdp.backend.templates.hog_function_template import HogFunctionTemplateDC
# Bsed off of https://developer.zendesk.com/api-reference/ticketing/users/users/#create-or-update-user
diff --git a/posthog/cdp/templates/zendesk/test_template_zendesk.py b/products/cdp/backend/templates/zendesk/test_template_zendesk.py
similarity index 95%
rename from posthog/cdp/templates/zendesk/test_template_zendesk.py
rename to products/cdp/backend/templates/zendesk/test_template_zendesk.py
index 2c873cc3b0fa..63752b4941f9 100644
--- a/posthog/cdp/templates/zendesk/test_template_zendesk.py
+++ b/products/cdp/backend/templates/zendesk/test_template_zendesk.py
@@ -1,5 +1,6 @@
from posthog.cdp.templates.helpers import BaseHogFunctionTemplateTest
-from posthog.cdp.templates.zendesk.template_zendesk import template as template_zendesk
+
+from products.cdp.backend.templates.zendesk.template_zendesk import template as template_zendesk
def create_inputs(**kwargs):
diff --git a/products/logs/backend/test/test_alerts_api.py b/products/logs/backend/test/test_alerts_api.py
index 581b3860461a..f9e0ceae4240 100644
--- a/products/logs/backend/test/test_alerts_api.py
+++ b/products/logs/backend/test/test_alerts_api.py
@@ -13,13 +13,13 @@ from rest_framework.test import APIClient
from posthog.cdp.templates.fixtures import template_pagerduty, template_slack
from posthog.cdp.templates.hog_function_template import sync_template_to_db
-from posthog.cdp.templates.microsoft_teams.template_microsoft_teams import template as template_microsoft_teams
from posthog.clickhouse.client import sync_execute
from posthog.models.team.team import Team
from posthog.models.user import User
from products.cdp.backend.models.hog_function_template import HogFunctionTemplate
from products.cdp.backend.models.hog_functions.hog_function import HogFunction
+from products.cdp.backend.templates.microsoft_teams.template_microsoft_teams import template as template_microsoft_teams
from products.logs.backend.alert_check_query import AlertCheckQuery, BucketedCount
from products.logs.backend.models import LogsAlertConfiguration, LogsAlertEvent
from products.logs.backend.presentation.views.alerts_api import (