Solved

Behavior of user_id-device_id reconciliation when N-to-N relationship

  • 11 March 2022
  • 4 replies
  • 143 views

Badge

Hello,

 

I have an application on which sometimes, the sales team help a user to finish creating their account. They will thus set the password and everything, and then communicate the credentials on the phone to the user.

 

I would like to understand the behavior of Amplitude id reconciliation between device_id and user_id on this specific case:

 

  • User A (not registered yet) has its own device_id
  • A guy from the sales team, with its own device_id, helps this user to finish creating his account.
  • In parallel, this sales team guy will also help 5 other users. The sales team guy has the same device_id for each user (because he does not change his browser session each time)
  • When sales team guy gave credentials to the user A, user A logins with his account and uses the app.


In this scenario, how will Amplitude manage the IDs reconciliation ? Indeed, the guy from the sales team has its own device_id, and create accounts for five different users. Will Amplitude take ALL the actions from this device_id, and reconcile it with each user_id ?

 

Technically speaking, my question is “How Amplitude reconcile user IDs and device IDs when there is a N-to-N relationship?”

 

Thanks a lot for your time

Nolwww

icon

Best answer by SheenaGreen 11 March 2022, 17:36

View original

4 replies

Userlevel 4
Badge +8

Hey @Nolwww ,

 

I’m assuming user ID is set when the user logs in, and I’m also assuming that the sales team guy is performing the log in event as part of the process of helping users create the account. Using the following sample values for the scenario:

 

USER A
Device ID = A
User ID = UIDA
Sales Team Guy: Device ID = 1

USER B
Device ID = B
User ID = UIDB
Sales Team Guy: Device ID = 1

 

Sales team guy performs all events to register User A, including login. These events are logged under an Amplitude profile with User ID = UIDA, Device ID = 1. User A uses the credentials to log in on their device, which will now merge Users A’s anonymous profile associated with device ID = A with the Amplitude profile created when sales team guy (STG) registered and logged in on behalf of User A. 

 

STG moves on to registering User B. All events that occur for STG between the moment he registered and logged in as User A to the point where he registers and logs in as User B, will be attributed to User A’s profile where User ID = UIDA. As soon as STG’s Device ID of 1 is associated with a new user ID (aka when he logs in as User B) a new Amplitude profile with User ID = UIDB is created and any events that STG fires on Device ID = 1 moving forward will only appear on this profile - until he logs in as another user, at which point the cycle repeats. 

 

It was quite challenging to write out this explanation, so I hope it makes sense! Essentially, any activity from a specific device ID will appear in the profile of the User ID that the device ID was most recently associated with. 

Badge

Thanks a lot ! Very clear !

Just for clarifying a last point:

 

It means a device ID can have some events with User ID = UIDA, and some events attributed to User ID = UIDB, and so on ? 

 

Or when Amplitude reconcile STG device id with user UIDB, all the history of events for device_id 1 will be linked to the most recent user_id ?

Userlevel 4
Badge +8

@Nolwww that is correct! The moment Amplitude associates STG’s device ID with user ID UIDB, only the events moving forward performed on STG’s device ID are associated UIDB. Previous events from STG’s device ID remain associated with the User ID that was previously seen with STG’s device ID. 

Badge

Awesome ! Thanks a lot for your help

Reply