question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not updating custom attributes

See original GitHub issue

I’m trying to integrate my react-native app with Intercom, but when I try to send custom attributes from a user, it doens’t work. And it not give an error, so, I could not undestand why it doesn’t work.

I’m using the npm package, and I had follow all steps to implement it on android OS, like is described on npm page documentation.

My android version is 8.0, and i’m using the last version of intercom npm package.

const intercomSettings = {
    name: user.full_name,
    email: user.email,
    user_id: `${user.id_user}`,
    // eslint-disable-next-line
    mobileSale_version: "1.0.1"
  };
Intercom.registerIdentifiedUser({ userId: `${intercomSettings.user_id}` })
    .then((p) => { console.log('iden', p) })

  Intercom.updateUser(intercomSettings)
    .then((p, e) => { console.log('promise', p, e) })
    .catch((err) => { console.log('err', err) })

All this console.log() logs “undefined”, and the mobileSale_version from the user that I’m logged in not update on Intercom site.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
AlphaJuliettOmegacommented, Jun 9, 2021

@Teal-labs-developer I think the issue I was having is that I had to set up the actual attribute on Intercom side

As in, the specific attribute key ‘error’ in my case, you can’t push a key that’s not defined on Intercom side beforehand.

I’m not really sure what I was struggling with re Android vs iOs as it’s now working on Emulators and Real devices.

1reaction
carlosa54commented, Mar 28, 2019

Hi @steinjonathan,

For the custom attributes to work you’ll need to add them as a custom_attributes value.

e.g.

const intercomSettings = {
    name: user.full_name,
    email: user.email,
    user_id: `${user.id_user}`,
    // eslint-disable-next-line
    custom_attributes: {
        mobileSale_version: "1.0.1"
    }
  };
Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom attribute not updating immediately after changes in ...
Attributes Configured in Magento should update immediately after changing in Magento. Actual Behaviour. Working on CIF Core Product Component.
Read more >
Product custom attributes not updated - Magento 2 REST API
I'm using Magento 2.3.4 CE. I used the below JSON to update the product custom attribute part_number ...
Read more >
Update AWS Cognito user's custom attributes without ...
So, if I sign in the user with the password, I'm able to update the custom attributes in the cognito pool successfully. I...
Read more >
Unable to update custom product attribute value programatically
Hello, I have created a few custom product attributes in Magento 2.2.6 and have no problem saving a new product with these new...
Read more >
Change the Attributes of an Amazon Cognito User Pool
Note: You can add custom attributes to an existing user pool, ... If you do not, then authentication fails during user migration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found