intercom-ruby icon indicating copy to clipboard operation
intercom-ruby copied to clipboard

Cannot use spaces in custom attributes

Open noctivityinc opened this issue 2 years ago • 1 comments

We have been using custom attributes for almost 7 years via the Javascript API without issue. We have a custom attribute with the key Company Name, note the case and space.

In our javascript code we simply do this:

'Company Name': "#{current_professional.company_name}",

and have no problems, however, when we try to use this gem and do this:

 contact = $intercom.contacts.create(
      email: self.account.email,
      name: self.full_name,
      phone: self.phone,
      role: 'lead',
      custom_attributes: {
        'Company Name' => self.company_name
      }
    )

The Company Name attribute in custom attributes, it does not record the data for Company Name (its blank, everything else is fine). Every example provided shows a key in lower case with underscores, but there is no documentation that says this is required and it works perfectly fine with the javascript code.

What are we missing?

noctivityinc avatar Oct 01 '22 14:10 noctivityinc

Any update on this?

noctivityinc avatar Oct 03 '22 19:10 noctivityinc