Align Customer.io preset subscriptions with reserved events#3655
Align Customer.io preset subscriptions with reserved events#3655jcpsimmons wants to merge 7 commits intosegmentio:mainfrom
Conversation
|
This draft is 1 of 3 upstream Customer.io PRs for CDP-4750. Scope here: only Customer.io preset/default-subscription parity for reserved lifecycle events, plus a focused preset test file. Not in this PR:
Companion drafts:
This supersedes the preset/default-subscription portion of the older combined draft #3654. |
|
Hi @joe-ayoub-segment could I please have review on this when you get a chance? 🙏 |
|
@joe-ayoub-segment friendly nudge - could you take a look at this one when you get a chance? Happy to answer any questions. Thanks! |
|
@sydneycollins-cio handing this PR to you along with CDP-4750 if you're able to take it over. Status from my side: this is the preset/default-subscription parity slice. No actionable review feedback yet; it looks like the main next step is getting Joe/upstream review. |
There was a problem hiding this comment.
Pull request overview
Aligns the Customer.io destination’s automatic presets and action-level default subscriptions so reserved lifecycle events route to their dedicated lifecycle actions instead of the generic “Track Event” surface.
Changes:
- Expanded the generic
Track Eventsubscription filters to exclude additional reserved lifecycle events (devices/objects/etc.). - Updated
Create or Update Devicesubscriptions to include the reservedDevice Created or Updatedevent. - Added/expanded automatic presets for lifecycle actions (device/object/person/relationship delete, merge, suppress/unsuppress).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/destination-actions/src/destinations/customerio/trackEvent/index.ts | Updates action-level default subscription to exclude more reserved lifecycle events from generic tracking. |
| packages/destination-actions/src/destinations/customerio/index.ts | Expands automatic presets and aligns preset subscriptions with reserved events/lifecycle actions. |
| packages/destination-actions/src/destinations/customerio/createUpdateDevice/index.ts | Expands action default subscription to include additional reserved device lifecycle events. |
| packages/destination-actions/src/destinations/customerio/tests/index.test.ts | Adds unit tests asserting lifecycle preset presence and subscription filtering behavior. |
| and event != "User Unsuppressed" | ||
| and event != "Group Deleted" | ||
| and event != "Object Deleted" | ||
| and event != "Report Delivery Event" |
… to match preset filter
There was a problem hiding this comment.
Pull request overview
Aligns the Customer.io destination’s generic presets and default subscriptions so reserved lifecycle events route to their dedicated lifecycle actions (instead of the generic “Track Event” surface).
Changes:
- Expanded Customer.io “Track Event” default subscription/preset to exclude additional reserved lifecycle events (device/object/report content).
- Updated device lifecycle subscriptions to include the “Device Created or Updated” reserved event and added new automatic lifecycle presets (delete device/object/person/relationship, merge, suppress/unsuppress).
- Pinned
nrwl/nx-set-shasandsnyk/actions/nodeGitHub Actions usages to specific commits in CI.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/destination-actions/src/destinations/customerio/trackEvent/index.ts | Excludes additional reserved lifecycle events from the Track Event default subscription. |
| packages/destination-actions/src/destinations/customerio/index.ts | Updates/extends automatic presets to route reserved lifecycle events to their dedicated actions. |
| packages/destination-actions/src/destinations/customerio/createUpdateDevice/index.ts | Broadens the default subscription to include reserved device lifecycle events. |
| packages/destination-actions/src/destinations/customerio/tests/index.test.ts | Adds unit coverage ensuring presets/subscriptions include/exclude the intended reserved events. |
| .github/workflows/ci.yml | Pins third-party GitHub Actions to SHAs and adjusts steps to support Nx SHA calculation in more jobs. |
| defaultSubscription: ` | ||
| type = "track" | ||
| and event != "Application Installed" | ||
| and event != "Application Opened" | ||
| and event != "Application Uninstalled" | ||
| and event != "Device Created or Updated" | ||
| and event != "Device Deleted" | ||
| and event != "Relationship Deleted" | ||
| and event != "User Deleted" | ||
| and event != "User Suppressed" | ||
| and event != "User Unsuppressed" | ||
| and event != "Group Deleted" | ||
| and event != "Object Deleted" | ||
| and event != "Report Delivery Event" | ||
| and event != "Report Content Event" |
| - name: Use Github Personal Access Token | ||
| run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf ssh://[email protected]/ |
|
|
||
| - name: Run Snyk to check for vulnerabilities | ||
| uses: snyk/actions/node@master | ||
| uses: snyk/actions/node@cdb760004ba9ea4d525f2e043745dfe85bb9077e # master |
|
@joe-ayoub-segment ready for review when you have a chance! |
|
Hi @jcpsimmons the changes look good - though there's a failing test. Can you take a look please? |
There was a problem hiding this comment.
Pull request overview
Aligns the Customer.io destination’s generic preset subscriptions and default subscriptions with Customer.io reserved lifecycle events, ensuring those reserved events route to their dedicated lifecycle actions instead of the generic “Track Event” surface.
Changes:
- Updated the
Track Eventdefault subscription (and preset subscription) to exclude additional reserved lifecycle events (device + object + report content). - Expanded the
Create or Update Devicesubscription surface to includeDevice Created or Updated(andApplication Opened). - Added/expanded automatic presets for lifecycle actions (device/object/relationship deletes, merge, suppress/unsuppress).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/destination-actions/src/destinations/customerio/trackEvent/index.ts |
Excludes additional reserved lifecycle events from the generic Track Event default subscription. |
packages/destination-actions/src/destinations/customerio/index.ts |
Updates/extends automatic presets so reserved lifecycle events map to the correct lifecycle actions and are excluded from generic Track Event. |
packages/destination-actions/src/destinations/customerio/createUpdateDevice/index.ts |
Expands the Create/Update Device default subscription to include additional reserved device events. |
packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts |
Adds unit coverage asserting the new presets/subscriptions are present and reserved events are excluded from Track Event. |
Aligns the generic Customer.io preset and default-subscription surface with reserved lifecycle events and already-supported lifecycle actions.
Testing
Verified locally under Node
22.13.1:TZ=UTC yarn cloud test --testPathPattern=src/destinations/customerio/__tests__/index.test.ts✅./bin/run serve --destination=customerio -nboots successfully and exposes the Customer.io action routes ✅End-to-end testing using the local server was completed ✅
Added unit tests for new functionality
Tested end-to-end using the local server
[If destination is already live] Tested for backward compatibility of destination. Note: New required fields are a breaking change.
[Segmenters] Tested in the staging environment
[If applicable for this change] Tested for regression with Hadron.
Security Review
No field definitions or credential handling were changed in this PR.
passwordNew Destination Checklist
Not applicable.
verioning-info.tsfile. example