Skip to content

fix(intercom): revert keeping mapped external_id with email in rETL v2 (#5735) - #5738

Merged
krishna2020 merged 1 commit into
release/v1.166.0from
fix/revert-intercom-5735-release-v1.166.0
Oct 27, 2026
Merged

krishna2020 merged 1 commit into
release/v1.166.0from
fix/revert-intercom-5735-release-v1.166.0

Conversation

@krishna2020

Copy link
Copy Markdown
Collaborator

What are the changes introduced in this PR?

Reverts #5735 from the v1.166.0 release (into release/v1.166.0).

#5735 made the Intercom v2 rETL identify payload keep a mapped traits.external_id even when email is present. searchContact, however, still only searches by traits.external_id when email is absent; with email it searches by email (plus root userId). So the payload now carries an external_id the search never looked for.

Reproduced with failing component tests on develop: for a rETL event with traits.external_id + email (with integrations.INTERCOM.lookup: 'external_id' and without), the transformer POSTs a new contact instead of updating the contact that already owns that external_id. Flagged by Copilot on #5736.

This restores procWorkflow.yaml exactly to the #5730 state:

payload.external_id = $.outputs.apiVersion === "v2" && !payload.email ? (payload.external_id || payload.user_id) : null;

What is the related Linear task?

Related to INT-7442

Please explain the objectives of your changes below

Unblock the v1.166.0 release without shipping the search/payload mismatch. #5735 will be re-landed on develop together with a searchContact change that searches by the mapped external_id when email is present.

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

Intercom v2 rETL identify with email present: the mapped external_id is not sent again (as before #5735), so search and payload are both email-based. The INT-7442 fix from #5730 (no email: keep the mapped external_id) is unaffected. The three tests #5735 added are removed with it and come back with the re-land.

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified. Please explain the changes.

N/A

Any technical or performance related pointers to consider with the change?

N/A


Developer checklist

  • My code follows the style guidelines of this project

  • No breaking changes are being introduced.

  • All related docs linked with the PR?

  • All changes manually tested?

  • Any documentation changes needed with this change?

  • Is the PR limited to 10 file changes?

  • Is the PR limited to one linear task?

  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?

  • Verified that there are no credentials or confidential data exposed with the changes.

Testing

🤖 Generated with Claude Code

#5735)

This reverts commit 0cf9dd7 from the v1.166.0 release.

#5735 sends the mapped traits.external_id alongside email in the Intercom v2
rETL identify payload, but searchContact still ignores traits.external_id when
email is present. A contact that already owns that external_id can then be
missed and a new contact POSTed instead of updating it.

Restore the #5730 behaviour (email present: external_id is not sent, so search
and payload stay email-based). The INT-7442 fix for records without email is
kept. #5735 will be re-landed together with the searchContact change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@krishna2020
krishna2020 requested review from a team as code owners October 27, 2026 12:19
Copilot AI balanced review requested due to automatic review settings October 27, 2026 12:19
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 88378365-7b92-4f36-9acc-098815c82111

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The narrow rollback matches the release scope, preserves mapped external IDs without email, and has no identified blocking issues.

No open issues 🎉

What changed in this PR

Reverts #5735 for the v1.166.0 release, restoring Intercom v2 rETL identify payloads to match the existing contact lookup behavior while preserving the no-email fix from #5730.

Changes:

  • Omit mapped external_id when email is present; retain it otherwise, with user_id as fallback.
  • Restore the email-present test expectation and remove the three tests introduced by #5735.
File Description
test/​integrations/​destinations/​intercom/​processor/​validationTestData.ts Removes the validation case added by #5735.
test/​integrations/​destinations/​intercom/​processor/​identifyTestData.ts Restores the email-only payload expectation and removes two added cases.
src/​cdk/​v2/​destinations/​intercom/​procWorkflow.yaml Restores the external ID assignment from #5730.

Review effort: Balanced

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.40%. Comparing base (0eb71de) to head (1e379c5).

Additional details and impacted files
@@                Coverage Diff                @@
##           release/v1.166.0    #5738   +/-   ##
=================================================
  Coverage             92.40%   92.40%           
=================================================
  Files                   737      737           
  Lines                 40859    40859           
  Branches               9591     9587    -4     
=================================================
  Hits                  37754    37754           
  Misses                 2844     2844           
  Partials                261      261           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@krishna2020
krishna2020 merged commit e326cdb into release/v1.166.0 Oct 27, 2026
30 checks passed
@krishna2020
krishna2020 deleted the fix/revert-intercom-5735-release-v1.166.0 branch October 27, 2026 12:44
krishna2020 added a commit that referenced this pull request Nov 2, 2026
#5735 was reverted from the release in #5738 after the changelog was generated, so it does not ship in v1.166.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
krishna2020 added a commit that referenced this pull request Nov 2, 2026
#5735 was reverted from the release in #5738 after the changelog was generated, so it does not ship in v1.166.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
krishna2020 added a commit that referenced this pull request Nov 3, 2026
## What are the changes introduced in this PR?

Removes the #5735 entry from the v1.166.0 section of `CHANGELOG.md`.

The changelog was generated in `chore(release): v1.166.0` before #5735
was reverted from the release in #5738, so it still listed #5735 as
shipping. With the revert, nothing from #5735 ships in v1.166.0.

Replaces #5740, whose commit message failed commitlint
(`footer-max-line-length`: a body line starting with `#5735` is parsed
as a footer). Same change, reworded commit message.

## What is the related Linear task?

Related to INT-7442

## Please explain the objectives of your changes below

Keep the v1.166.0 changelog accurate.

### Any changes to existing capabilities/behaviour, mention the reason &
what are the changes ?

N/A — changelog only.

### Any new dependencies introduced with this change?

N/A

### Any new generic utility introduced or modified. Please explain the
changes.

N/A

### Any technical or performance related pointers to consider with the
change?

N/A

<hr>

### Developer checklist

- [x] My code follows the style guidelines of this project

- [x] **No breaking changes are being introduced.**

- [x] All related docs linked with the PR?

- [x] All changes manually tested?

- [ ] Any documentation changes needed with this change?

- [x] Is the PR limited to 10 file changes?

- [x] Is the PR limited to one linear task?

- [ ] Are relevant unit and component test-cases added in **new
readability format**?

### Reviewer checklist

- [ ] Is the type of change in the PR title appropriate as per the
changes?

- [ ] Verified that there are no credentials or confidential data
exposed with the changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants