Skip to content

STRATCONN-6751 - [Iterable] - update email address feature#3811

Open
joe-ayoub-segment wants to merge 5 commits into
mainfrom
iterable-update-email
Open

STRATCONN-6751 - [Iterable] - update email address feature#3811
joe-ayoub-segment wants to merge 5 commits into
mainfrom
iterable-update-email

Conversation

@joe-ayoub-segment

Copy link
Copy Markdown
Contributor
  • Adds a newEmail field to the Iterable updateUser action, enabling users to update a user's email address in Iterable
  • For single event processing (perform), calls Iterable's /api/users/updateEmail endpoint with both currentEmail and currentUserId as
    identifiers when available
  • For batch processing (performBatch), sets the new email via dataFields.email in the /api/users/bulkUpdate payload — this approach only
    works for hybrid projects, not email-only projects
  • When newEmail is not provided, existing behavior is completely unchanged

Testing

  • Manually verified via Postman against all project types (email-only, hybrid)
  • Verified single endpoint works with currentEmail only, currentUserId only, and both together
  • Verified batch endpoint works for hybrid project with dataFields.email
  • Unit tests pass (6850 tests, 0 failures)
  • Confirm no regressions on existing identify/upsert flows in staging

Security Review

Please ensure sensitive data is properly protected in your integration.

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

New Destination Checklist

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

Copilot AI review requested due to automatic review settings May 25, 2026 15:41
@joe-ayoub-segment joe-ayoub-segment requested a review from a team as a code owner May 25, 2026 15:41
@joe-ayoub-segment joe-ayoub-segment self-assigned this May 25, 2026
@joe-ayoub-segment joe-ayoub-segment added partner-eng-review (cloud) needs-stage-test Must be tested in Stage before deployment labels May 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for updating a user’s email in the existing Iterable updateUser action by introducing a newEmail field and routing single-event requests through Iterable’s /api/users/updateEmail endpoint when present, while batch requests set the new email via dataFields.email in /api/users/bulkUpdate.

Changes:

  • Added a new updateEmail API endpoint constant and a newEmail action field (typed/validated as an email).
  • Updated perform to call /api/users/updateEmail when newEmail is provided, sending currentEmail and/or currentUserId when available.
  • Updated performBatch to include the new email as dataFields.email per-user, plus expanded unit tests/snapshots accordingly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/destination-actions/src/destinations/iterable/utils.ts Adds updateEmail to the regional endpoint map used by Iterable actions.
packages/destination-actions/src/destinations/iterable/updateUser/index.ts Introduces newEmail field; routes single requests to /users/updateEmail; sets dataFields.email in batch payloads when newEmail is present.
packages/destination-actions/src/destinations/iterable/updateUser/generated-types.ts Adds newEmail to the generated Payload typings and docs.
packages/destination-actions/src/destinations/iterable/updateUser/tests/index.test.ts Adds unit tests for updateEmail behavior and batch dataFields.email behavior.
packages/destination-actions/src/destinations/iterable/updateUser/tests/snapshots/snapshot.test.ts.snap Updates snapshot output to reflect the newEmail branch request payload.

Comment thread packages/destination-actions/src/destinations/iterable/updateUser/index.ts Outdated
Copilot AI review requested due to automatic review settings May 25, 2026 15:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread packages/destination-actions/src/destinations/iterable/updateUser/index.ts Outdated
@joe-ayoub-segment joe-ayoub-segment changed the title Iterable update email STRATCONN-6751 - [Iterable] - update email address feature May 26, 2026
joe-ayoub-segment added a commit that referenced this pull request Jun 19, 2026
Cover the updateUser newEmail feature (PR #3811) with e2e fixtures:
- email -> newEmail single (update + updateEmail)
- userId-only newEmail single (currentUserId branch)
- batch newEmail folded into dataFields.email (per-item multistatus)

Emails are generated per-run via randomUUID so the full create-then-rename
path is exercised with fresh identifiers. Batch assertions verify both the
per-item sent payload and the bulkUpdate successCount.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-stage-test Must be tested in Stage before deployment partner-eng-review (cloud)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants