What Happens When I Change User Email Addresses?

What Happens When I Change User Email Addresses?


This KB only applies to authorized Sales Cookie operators.

To change user email addresses, follow these steps:
  1. Go to Debug > Change Email
  2. Complete the form
    1. Current Email = old email address of a user (MUST exist)
    2. New Email = new email address to switch to (this user may or may not already exist in Sales Cookie) 
  3. Click on Change

Some key considerations:
  1. Each user has a single user record with a unique email
  2. Each user may have different identities pointing at it
    1. For example, 3 identities are associated with a single user whose email is johndoe@example.com.
      1. Microsoft identity with email johndoe@example.com
      2. Google identity with email johndoe@example.com
      3. LinkedIn identity with email johndoe@example.com
  3. We have an old email which we want to change to a new email
    1. There are many statements / records linked to users, so we need to keep the same user record (same SQL ID) when we change emails.
There are two cases:
  1. New user / email does NOT exist in Sales Cookie
    1. Update email address on the old user record to new email address
    2. Delete any identity previously associated with this user
  2. New user / email already exists in Sales Cookie
    1. Update email address on the old user record to new email address
    2. Update email address on the new user record to old email address
    3. Swap used identities associated with each user 
    4. Update default aliases on each user
Here are different scenarios and how they are handled:
  1. If the new email is NOT in-use in Sales Cookie
    1. The user will have to perform a "Sign Up" action and choose a new password
    2. The user will have to accept Terms of Service
  2. If the new email is already in-use in Sales Cookie
    1. The user can sign normally with their existing password
      1. Signing up or resetting credentials is not required
    2. Content associated with each user (ex: commission statements) will be swapped
      1. Content associated with the old email will appear under the new email
      2. Content associated with the new email will appear under the old email
    3. There is no way currently to merge 2 user accounts into one
    4. User aliases are updated after changing email addresses