clevertap-android-sdk icon indicating copy to clipboard operation
clevertap-android-sdk copied to clipboard

Multiple profiles merging into one

Open samarthgupta2907 opened this issue 1 year ago • 5 comments

Despite creating two unique identities, I can see the profiles are getting merged into one. I am calling the OnUserLogin API on the new identity, but on the clevertap dashboard, I can see these identities getting merged.

Expected behavior As per the documentation - On calling the OnUserLogin API, two different profiles should have been created.

Screenshots/Logs Adding logs and screenshots of the issue -

onUserLogin: {Name=Samarth, Identity=41787103_90228_MANAGER, [email protected], Phone=7073804522, Res ID=90228, City ID=6, Device
                 ID=0d9e8927-feb1-4c38-b4b8-18b2844cf876, Permission=MANAGER, POS=true, Hyperpure=true, User ID=41787103} maps to current device id __7aad0143d0614cee9d80dd3a77604a4b pushing on current
                 profile
onUserLogin: {Name=Samarth, Identity=41787103_50002_MANAGER, [email protected], Phone=7073804522, Res ID=50002, City ID=4, Device
                 ID=0d9e8927-feb1-4c38-b4b8-18b2844cf876, Permission=MANAGER, POS=false, Hyperpure=true, User ID=41787103} maps to current device id __7aad0143d0614cee9d80dd3a77604a4b pushing on current
                 profile
Screenshot 2024-02-15 at 4 54 36 PM
  • CleverTap SDK Version 5.2.1

samarthgupta2907 avatar Feb 15 '24 11:02 samarthgupta2907

@samarthgupta2907 Identity and Email are composite keys for the CleverTap SDK. If you provide the same email ID or identity then the profiles will be merged. Please check issue #113 particularly this comment for more info or raise a support ticket via our Help Center

darshanclevertap avatar Feb 15 '24 11:02 darshanclevertap

Thanks for the quick revert Darshan. Thanks for clarifying this.

samarthgupta2907 avatar Feb 15 '24 11:02 samarthgupta2907

Hi @darshanclevertap - Before we close this. Can you help address this - https://github.com/CleverTap/clevertap-android-sdk/issues/113#issuecomment-1945976037

Would like to know if we have to handle this case in a specific way, or something else ? Since, currently our profiles with unique identifiers are getting merged into one because emails are same.

samarthgupta2907 avatar Feb 15 '24 12:02 samarthgupta2907

@darshanclevertap We want to keep the identifier as 'Identity' key only and not email or FBID. When checked on our CT console, only 'Identity' was selected but when debugged on the client side in the ConfigurableIdentityRepo class, the loaded identityset was having values as [Email, Identity] which seems to be picked from default legacy values which might be due to failed fetching from CT backend. My question is, is it enough to set the identifier on the console or do we need to set in the android manifest as well? Also, apart from pushing profiles from the app using onUserLogin, we do import them via SMTP using the same column names 'Identity', 'Email' amongst others. It would be helpful if you can guide us through this as docs and behaviour seems contradictory.

rd7773 avatar Feb 16 '24 09:02 rd7773

@rd7773 @samarthgupta2907 For both of you - the answer is that we need to do some code changes in the AndroidManifest file so that only "Identity" is treated as the primary key. To help you with the correct code for both of your cases, please reach out to our support teams via the Help Center and mention this GitHub issue and we will provide you with the steps to solve for your cases.

darshanclevertap avatar Feb 16 '24 09:02 darshanclevertap

Closing this issue due to inactivity. Feel free to reopen for further assistance

Anush-Shand avatar Jul 11 '24 11:07 Anush-Shand