Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate CTMS records created during FxA email workflow #1017

Open
robhudson opened this issue Jan 17, 2025 · 0 comments
Open

Duplicate CTMS records created during FxA email workflow #1017

robhudson opened this issue Jan 17, 2025 · 0 comments

Comments

@robhudson
Copy link
Collaborator

Description

A workflow involving changes to primary and secondary emails in a Mozilla Account can lead to duplicate records in CTMS. This creates inconsistencies in how user data and subscriptions are represented.

Steps to Reproduce

  1. Create a Mozilla Account using an email address [email protected].
    • This creates CTMS user 1 with emails.primary_email and fxa.primary_email set to [email protected].
  2. Add a second email address [email protected] as a secondary email but do not make it the primary email.
    • In CTMS, this is not recorded. It's only an FxA change at this point.
  3. Use the secondary email address [email protected] to sign up for a newsletter on the website.
  4. Go back to the Mozilla Account and make the secondary email [email protected] the primary email.
    • For CTMS user 1 this updates fxa.primary_email to [email protected] while keeping the emails.primary_email value of [email protected].
    • CTMS user 1's fxa.primary_email now conflicts with CTMS user 2's emails.primary_email.

Observed Behavior

Steps to Reproduce - Alternate workflow

  1. Create a Mozilla Account using an email address [email protected].
    • This creates CTMS user 1 with emails.primary_email and fxa.primary_email set to [email protected].
  2. Add a second email address [email protected] as a secondary email and make it the primary email.
  3. Use the email address [email protected] to sign up for a newsletter on the website.

Observed Behavior

Expected Behavior

  • There should be only one CTMS record for the user:
  • To fix this issue, define and implement a solution to merge 2 contacts.

Additional Considerations

  • The emails table includes a basket_token, which allows users to navigate to the preference center.
  • If records are merged, take into consideration which basket_token remains functional so users can access the preference center.
  • Perhaps a system notification email is sent notifying the user of the merge and providing the chosen basket token as a reference. The other basket token will result in a 404 from that point forward.
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

No branches or pull requests

1 participant