feat(cdp): add Klime destination template#49281
Conversation
…tination Add include_all_properties support for group events using event.properties., and change default filters from [, ] to all events so , , and custom events reach the automatic action mapping.
Align with convention for new external destinations (e.g. OneSignal #46439).
|
Size Change: 0 B Total Size: 106 MB ℹ️ View Unchanged
|
nodejs/src/cdp/templates/_destinations/klime/klime.template.test.ts
Outdated
Show resolved
Hide resolved
|
🎭 Playwright report · View test results →
These issues are not necessarily caused by your changes. |
|
@havenbarnes Looks good to me! It only requires the suggested fixes by Greptile for the |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…st.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
Thanks @beatlevic ! Once CI passes I'll get this in |
There was a problem hiding this comment.
Pull request overview
Adds a new Klime CDP destination template to the NodeJS Hog Function templates registry, enabling PostHog events to be forwarded to Klime’s ingest API.
Changes:
- Registered a new Klime destination in the NodeJS CDP templates index.
- Added a Klime Hog template that builds a batch payload and sends it to
https://i.klime.com/v1/batchwith Bearer auth. - Added Jest tests for the Klime destination template, plus a Klime service icon.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| nodejs/src/cdp/templates/index.ts | Imports and registers the new Klime destination template. |
| nodejs/src/cdp/templates/_destinations/klime/klime.template.ts | Defines the Klime destination Hog template (action mapping, payload shaping, fetch call, inputs schema). |
| nodejs/src/cdp/templates/_destinations/klime/klime.template.test.ts | Adds Jest coverage for payload shape, mapping behavior, property inclusion, and error handling. |
| frontend/public/services/klime.png | Adds Klime icon used by the template UI. |
| .github/CODEOWNERS-soft | Adds a soft ownership rule for posthog/cdp/** under the workflows team. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Visual regression: Storybook UI snapshots updatedChanges: 1 snapshots (1 modified, 0 added, 0 deleted) What this means:
Next steps:
|
…/add-klime-destination
…og/posthog into feat/add-klime-destination
Co-authored-by: beatlevic <beatlevic@gmail.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This is the PostHog/posthog version of #47638 (plus TS conversion)
Problem
Klime users on PostHog currently have no native way to forward events to Klime's ingest API. This adds Klime as a CDP destination so users can send track, identify, and group events directly from PostHog.
Changes
Adds a new Klime destination template following existing CDP patterns (modeled after Customer.io):
posthog/cdp/templates/klime/template_klime.py— Hog function template that sends events toPOST /v1/batchwith Bearer token auth. Supports automatic action detection ($identify/$set→ identify,$group_identify→ group, everything else → track) or explicit action selection. Includesinclude_all_propertiestoggle and custom property mapping.posthog/cdp/templates/klime/test_template_klime.py— 9 test cases covering track, identify, group, automatic/forced action mapping, property inclusion, validation, and error handling.frontend/public/services/klime.png— Klime service icon (180x180 PNG).posthog/cdp/templates/__init__.py— Registered template inHOG_FUNCTION_TEMPLATES.How did you test this code?
pytest posthog/cdp/templates/klime/test_template_klime.py -vPublish to changelog?
No