Skip to content

Align Customer.io preset subscriptions with reserved events#3655

Open
jcpsimmons wants to merge 7 commits intosegmentio:mainfrom
customerio:cdp-4750-cio-preset-parity
Open

Align Customer.io preset subscriptions with reserved events#3655
jcpsimmons wants to merge 7 commits intosegmentio:mainfrom
customerio:cdp-4750-cio-preset-parity

Conversation

@jcpsimmons
Copy link
Copy Markdown
Contributor

@jcpsimmons jcpsimmons commented Mar 10, 2026

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 -n boots 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.

  • Reviewed all field definitions for sensitive data (API keys, tokens, passwords, client secrets) and confirmed they use type password

New Destination Checklist

Not applicable.

  • Extracted all action API versions to verioning-info.ts file. example

@jcpsimmons
Copy link
Copy Markdown
Contributor Author

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:

  • Track API batch multi-status parsing
  • decimal timestamp normalization

Companion drafts:

This supersedes the preset/default-subscription portion of the older combined draft #3654.

@jcpsimmons jcpsimmons marked this pull request as ready for review March 10, 2026 17:38
@jcpsimmons jcpsimmons requested a review from a team as a code owner March 10, 2026 17:38
@jcpsimmons jcpsimmons marked this pull request as draft March 10, 2026 17:39
@jcpsimmons jcpsimmons marked this pull request as ready for review March 10, 2026 17:50
@jcpsimmons
Copy link
Copy Markdown
Contributor Author

Hi @joe-ayoub-segment could I please have review on this when you get a chance? 🙏

@jcpsimmons
Copy link
Copy Markdown
Contributor Author

@joe-ayoub-segment friendly nudge - could you take a look at this one when you get a chance? Happy to answer any questions. Thanks!

@jcpsimmons
Copy link
Copy Markdown
Contributor Author

@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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Event subscription filters to exclude additional reserved lifecycle events (devices/objects/etc.).
  • Updated Create or Update Device subscriptions to include the reserved Device Created or Updated event.
  • 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"
Copilot AI review requested due to automatic review settings April 21, 2026 13:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-shas and snyk/actions/node GitHub 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.

Comment on lines 10 to +23
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"
Comment thread .github/workflows/ci.yml Outdated
Comment on lines +76 to +77
- name: Use Github Personal Access Token
run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf ssh://[email protected]/
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
uses: snyk/actions/node@cdb760004ba9ea4d525f2e043745dfe85bb9077e # master
@sydneycollins-cio
Copy link
Copy Markdown
Contributor

@joe-ayoub-segment ready for review when you have a chance!

@joe-ayoub-segment
Copy link
Copy Markdown
Contributor

Hi @jcpsimmons the changes look good - though there's a failing test.

FAIL  src/destinations/customerio/__tests__/index.test.ts
    ● Test suite failed to run
  
      src/destinations/customerio/__tests__/index.test.ts:39:1 - error TS1005: '}' expected.
  
      39 
         
  
        src/destinations/customerio/__tests__/index.test.ts:3:38
          3 describe('customerio presets', () => {
                                                 ~
          The parser expected to find a '}' to match the '{' token here.

Can you take a look please?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Event default subscription (and preset subscription) to exclude additional reserved lifecycle events (device + object + report content).
  • Expanded the Create or Update Device subscription surface to include Device Created or Updated (and Application 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants