intercom_flutter icon indicating copy to clipboard operation
intercom_flutter copied to clipboard

If a user from my app uses intercom, only their User ID is shown...

Open Skinopathy-Brian-Kan opened this issue 4 years ago • 10 comments

...but if they are coming from my website, their name is shown.

Is there something I'm overlooking? Am I not passing things (info, token, etc) correctly from my Flutter app to Intercom?

Attached are screenshots showing the difference.

Example Example 2

Skinopathy-Brian-Kan avatar Sep 30 '21 14:09 Skinopathy-Brian-Kan

Are you registering the user? https://pub.dev/documentation/intercom_flutter/latest/intercom_flutter/Intercom/registerIdentifiedUser.html

Zazo032 avatar Sep 30 '21 14:09 Zazo032

@Skinopathy-Brian-Kan For the users who are coming from the website, check if Intercom has linked any social Id (Facebook, Twitter, etc) on the user page.

I think on the website, Intercom track these things.

deepak786 avatar Sep 30 '21 17:09 deepak786

Are you registering the user? https://pub.dev/documentation/intercom_flutter/latest/intercom_flutter/Intercom/registerIdentifiedUser.html

Yes.
Intercom.registerIdentifiedUser(userId: uid, email: '')

@Skinopathy-Brian-Kan For the users who are coming from the website, check if Intercom has linked any social Id (Facebook, Twitter, etc) on the user page.

I think on the website, Intercom track these things.

If users are coming from the website, then I do not experience this problem; it's only if they are using Intercom from my app.

Skinopathy-Brian-Kan avatar Sep 30 '21 19:09 Skinopathy-Brian-Kan

@Skinopathy-Brian-Kan Check the card External Profiles on the Intercom regarding the user for which the name is getting displayed and share the screenshot. Screen Shot 2021-10-01 at 1 32 25 AM

Another question, are you using the intercom_flutter package for both the app and website? If not then check this how to update the name and other properties of the user in Intercom using intercom_flutter https://pub.dev/documentation/intercom_flutter/latest/intercom_flutter/Intercom/updateUser.html

deepak786 avatar Sep 30 '21 20:09 deepak786

Here is a screenshot of users whose names are displayed image

To answer your question: I am only using the intercom_flutter package for just the app. I'll look more in-depth with that link you posted.

Skinopathy-Brian-Kan avatar Oct 01 '21 17:10 Skinopathy-Brian-Kan

@deepak786 was there something you were expecting to see for the External Profiles card?

Skinopathy-Brian-Kan avatar Oct 02 '21 19:10 Skinopathy-Brian-Kan

@Zazo032 yes, I am also registering them.

Skinopathy-Brian-Kan avatar Oct 02 '21 20:10 Skinopathy-Brian-Kan

@Skinopathy-Brian-Kan but are you updating user after registering? Like the name etc.

It would be great if you can share the code.

deepak786 avatar Oct 03 '21 16:10 deepak786

Hello @deepak786

There is actually a fair bit of code, but the following snippets seem to be the most relevant.

  void chatWithUs() async {
    final User user = auth.currentUser;
    final uid = user.uid;
    _intercomRegister(uid);
  }

  // called the intercom Messenger
  _intercomRegister(String uid) {
    Intercom.registerIdentifiedUser(userId: uid, email: '');
    Intercom.updateUser(name: fullName, email: currentUserEmail);
    Intercom.displayMessenger();
  }
}

Skinopathy-Brian-Kan avatar Oct 04 '21 17:10 Skinopathy-Brian-Kan

@Skinopathy-Brian-Kan I need the sample that reproduces this issue. Then I will be able to check the issue.

Because looking at the code snippet above, everything seems correct.

Might be you can try by putting await before both registering and updating the user because they are the futures.

deepak786 avatar Nov 02 '21 19:11 deepak786