Skip to content

added segment_traits_by_field and segment_identifiers_by_field in ups…#3822

Open
monutwilio wants to merge 6 commits into
mainfrom
STRATCONN-6826/liquid-functions
Open

added segment_traits_by_field and segment_identifiers_by_field in ups…#3822
monutwilio wants to merge 6 commits into
mainfrom
STRATCONN-6826/liquid-functions

Conversation

@monutwilio

@monutwilio monutwilio commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

https://twilio-engineering.atlassian.net/browse/STRATCONN-6826

  1. Added two hidden fields in upsertProfile action of Memora internal destination to store field wise traits and identifiers used in the mapping.

Testing

Manual testing details is in control-plane PR

  • 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
  • [Segmenters] [If applicable for this change] Tested for regression with Hadron.

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 June 4, 2026 06:28

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 two internal (hidden) mapping fields to the Memora Upsert Profile action so Segment’s control plane can capture per-field usage of Segment trait and identifier directives for enrichment / id_sync wiring.

Changes:

  • Introduces segment_traits_by_field as an internal object field to record referenced Segment trait names by stored field key.
  • Introduces segment_identifiers_by_field as an internal object field to record referenced Segment identifier names by stored field key.

Comment thread packages/destination-actions/src/destinations/memora/upsertProfile/index.ts Outdated
…d types

Documents that both fields are used exclusively by the Segment control plane
(actions-memora-internal destination) for the Conversation Memory Sync feature,
and explains why they are marked unsafe_hidden. Also includes generated-types
updates that were missing from the previous commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

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 3 out of 3 changed files in this pull request and generated no new comments.

@monutwilio monutwilio marked this pull request as ready for review June 4, 2026 06:54
@monutwilio monutwilio requested a review from a team as a code owner June 4, 2026 06:54
Verifies that the unsafe_hidden control-plane metadata fields are never
forwarded in the outbound Bulk upsert request body.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
nk1107
nk1107 previously approved these changes Jun 4, 2026
monutwilio and others added 2 commits June 4, 2026 22:16
… only

These fields are exclusively used by the Segment control plane for the
Conversation Memory Sync feature and have no place in the public memora
destination. memora-internal now overrides upsertProfile to spread the
base action fields and append the two unsafe_hidden fields.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The test was using the base memora destination where the fields are not
declared, so the framework stripped them trivially. Moved to memora-internal
where segment_traits_by_field and segment_identifiers_by_field are declared,
making the assertion meaningful.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 4, 2026 16:55

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 3 out of 3 changed files in this pull request and generated 3 comments.

Adds nockIntercepted flag and response assertions so the test fails
meaningfully if the HTTP interceptor is never hit, not just on body content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

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 3 out of 3 changed files in this pull request and generated 1 comment.

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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