Skip to content

Sync generic Customer.io destination fixes upstream#3654

Closed
jcpsimmons wants to merge 3 commits into
segmentio:mainfrom
customerio:cdp-4750-upstream-customerio-sync
Closed

Sync generic Customer.io destination fixes upstream#3654
jcpsimmons wants to merge 3 commits into
segmentio:mainfrom
customerio:cdp-4750-upstream-customerio-sync

Conversation

@jcpsimmons

@jcpsimmons jcpsimmons commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This upstreams the generic Customer.io destination behavior that should live in segmentio/action-destinations, instead of staying only in Customer.io's fork.

This PR is intentionally limited to generic Customer.io behavior that benefits Segment users connecting to Customer.io:

  • framework support for destinations to return parsed batch multi-status results
  • Customer.io Track API multi-status parsing in the shared destination
  • decimal timestamp tolerance in Customer.io timestamp parsing
  • the generic reserved-event preset/default-subscription updates that our fork already exposes

Why

Customer.io currently carries a forked Customer.io destination in customerio/cdp-action-destinations and a CDP-side wrapper in customerio/cdp.

For CDP-4750, the goal is to shrink the fork over time:

  • upstream generic destination fixes here
  • keep Customer.io-only runtime overrides in customerio/cdp
  • leave only temporary fork-only deltas in customerio/cdp-action-destinations

The main generic gap this PR addresses is Track API batch handling. Our fork already knows how to parse Customer.io's per-item batch errors and surface them as multi-status results instead of treating the entire batch as a flat success. That behavior should exist upstream because it is part of the shared Customer.io API contract, not a Customer.io-internal deployment detail.

Changes

  • Adds MultiStatusResponse / ResultMultiStatusNode support in the actions core so a destination can return parsed per-item batch results.
  • Updates the Customer.io destination sendBatch() helper to parse Track API 207 Multi-Status responses and 200 responses that still contain an errors array.
  • Allows decimal numeric timestamps to pass through Customer.io timestamp normalization unchanged.
  • Brings the upstream Customer.io preset/default-subscription surface closer to the generic preset set already exposed in our fork:
    • Delete Device
    • Delete Relationship
    • Delete Person
    • Delete Object
    • Merge People
    • Suppress Person
    • Unsuppress Person
    • reserved-event exclusions for device/object events in Track Event
    • Device Created or Updated in Create or Update Device
  • Adds focused Customer.io tests for the preset surface and Track API multi-status parsing helpers.

Related PRs

Verification

I could not run the Segment repo test suite in this environment because local dependency installation fails on private Segment packages (@segment/remote-service-client and control-plane-service-js-client).

The code paths ported here are taken from behavior already running in Customer.io's fork, and I added matching upstream tests in this PR for those same code paths.

@jcpsimmons

Copy link
Copy Markdown
Contributor Author

Dependency map for CDP-4750:

  • segmentio/action-destinations#3654 is the upstream source-of-truth PR for generic Customer.io destination behavior.
  • customerio/cdp-action-destinations#195 is the transitional fork PR that keeps our forked manifest/presets aligned and retains the fork-only Report Content Event preset.
  • customerio/cdp#4523 is the CDP wrapper PR for cio-customerio only.

Merge intent:

  • this PR owns generic shared behavior
  • #195 should not be used as the long-term home for shared runtime fixes
  • #4523 should remain wrapper-only

Links:

@jcpsimmons

Copy link
Copy Markdown
Contributor Author

Superseded by the smaller draft split for CDP-4750:

Closing this larger draft to avoid duplicate review paths and stale conflict noise.

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.

2 participants