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

User email is not showing on Intercom after loginIdentifiedUser(email: email) #484

Open
AbdullahChauhan opened this issue Nov 17, 2024 · 7 comments
Labels
support Asking for help writing an application

Comments

@AbdullahChauhan
Copy link

AbdullahChauhan commented Nov 17, 2024

Here's the steps currently I've implemented in my app but things are not working as expected:

  1. Initializing the user on app init
  2. After successful initialization, calling the loginUnidentifiedUser()
  3. When the user signed up in the app, calling the loginIdentifiedUser(email: user.email)
  4. Intercom dashboard still showing user id there
  5. No email updated in the user model after checking with fetchLoggedInUserAttributes()

Am I missing something here?

Plugin version: 9.2.0
Flutter version: 3.22.3

@deepak786
Copy link
Collaborator

deepak786 commented Nov 18, 2024

You cannot login again the user if the user is already logged in.
To update the email after loginUnidentifiedUser, maybe you need to use updateUser API.

@deepak786 deepak786 added the support Asking for help writing an application label Nov 18, 2024
@AbdullahChauhan
Copy link
Author

Hey @deepak786 Thanks for replying to my question.

No, we can't update the anonymous user.
loginUnidentifiedUser --> updateUser

Error I'm getting: You cannot update the email of an anonymous user. Please call registerIdentified user instead. The email: [email protected] was NOT applied

@AbdullahChauhan
Copy link
Author

@deepak786
So here's the updated flow I tested but still there's no email update on the Intercom chat USER DATA:

  1. Fresh user in the app -> loginUnidentifiedUser
  2. I can't call the updateUser because the user is currently anonymous
  3. User start chatting via messenger
  4. User appeared on the Intercom chat support with Random User id and identity similar toUser xxxx
  5. Now, user signed up in the app
  6. After successful sign up, immediately calling the loginIdentifiedUser with the user email. Note: I'm not calling the logout here before loginIdentifiedUser because I want to maintain the previous anonymous user chat history to this registered user
  7. Still no email update on the User data, strange!
  8. Even I called updateUser with user email after loginIdentifiedUser but still no email update!

Can you please try out these steps and let me know If something I'm still missing here!!!

Plugin version: 9.2.0
Flutter version: 3.24.5
Platform: Android

@deepak786
Copy link
Collaborator

Then you need to check with the Intercom support team about how to convert an unidentified user to an identified user maintaining the chats.

@AbdullahChauhan
Copy link
Author

@deepak786
Actually while shifting from anonymous to register user, the chat is maintaining but the problem is User email is not updating in the User data and since I'm calling loginIdentifiedUser(email: email) email should be updated in the Chat support!

@deepak786
Copy link
Collaborator

deepak786 commented Nov 18, 2024

It means yourloginIdentifiedUser(email: email) call is ignored as there is already a logged-in user (unidentified). So please check with the Intercom support team for solutions or alternatives.

@AbdullahChauhan
Copy link
Author

Yeah, It seems like the call with the email is ignored because user is already registered with user id.
Let's keep the issue open. I'll get back here after confirmation from the support. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Asking for help writing an application
Projects
None yet
Development

No branches or pull requests

2 participants