Skip to content

feat: Handle emailsha256 and other before sending attributes to Rokt Kit#51

Merged
Mansi-mParticle merged 8 commits into
developmentfrom
feat/SQDSDKS-7556-hashed-email-for-rokt
Aug 1, 2025
Merged

feat: Handle emailsha256 and other before sending attributes to Rokt Kit#51
Mansi-mParticle merged 8 commits into
developmentfrom
feat/SQDSDKS-7556-hashed-email-for-rokt

Conversation

@Mansi-mParticle

Copy link
Copy Markdown
Contributor

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

  • This PR includes logic to handle emailsha256 and other before passing attributes to the Rokt Kit:
    If emailsha256 is present, remove both email and other from the attributes.
    If other is present (and emailsha256 is not), map other to emailsha256, then remove both email and other.

Testing Plan

  • Was this tested locally? If not, explain why.
  • Tested with sample app

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@Mansi-mParticle Mansi-mParticle requested a review from a team as a code owner July 28, 2025 14:42
Comment thread src/main/kotlin/com/mparticle/kits/RoktKit.kt Outdated
Comment thread src/main/kotlin/com/mparticle/kits/RoktKit.kt Outdated
Comment thread src/main/kotlin/com/mparticle/kits/RoktKit.kt Outdated
Comment thread src/main/kotlin/com/mparticle/kits/RoktKit.kt Outdated
Comment thread src/main/kotlin/com/mparticle/kits/RoktKit.kt Outdated
Comment thread src/main/kotlin/com/mparticle/kits/RoktKit.kt Outdated

@rmi22186 rmi22186 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good...how about some tests that cover the following:

  • If email identity exists on the user, and emailsha256 attribute is passed to selectPlacements, do not send email attribute to the selectPlacements call.
  • if email identity and other identity exist on the user, only pass emailsha256 attribute with the value from other identity

I think these would go in the kit, not core

@Mansi-mParticle Mansi-mParticle requested a review from rmi22186 July 31, 2025 15:42
Comment thread src/main/kotlin/com/mparticle/kits/RoktKit.kt Outdated

@BrandonStalnaker BrandonStalnaker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Update your addIdentityAttributes method to add the other identity as the "emailsha256" key instead. That way you don't overwrite the other attribute if its passed in.

@BrandonStalnaker BrandonStalnaker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a couple minor things

Comment thread src/test/kotlin/com/mparticle/kits/RoktKitTests.kt
Comment thread src/main/kotlin/com/mparticle/kits/RoktKit.kt Outdated
@Mansi-mParticle Mansi-mParticle merged commit 28fec59 into development Aug 1, 2025
17 checks passed
@Mansi-mParticle Mansi-mParticle deleted the feat/SQDSDKS-7556-hashed-email-for-rokt branch August 1, 2025 15:22
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