Advice and answers from the Intercom Team

Intercom lets you send custom attributes about your customers. This means that you can filter your user list and send messages when users meet criteria specific to your business. For example, if you are a project management tool, you could send us over the number of files, the number of projects or the number of to-do items each user has. Then, if for example you wanted to message the users who had too few files added to their profile, you would then set the filters on the message to be "files less than 1".

How do I do it?

You send custom attributes by adding it to your intercomSettings code snippet as additional key/value pairs. Make sure to double check that your custom attribute keys always have a JSON-valid value; this means double quotes around strings and sending null as a value when there isn't a value for that user. It's also important to note that:

  • Field names must not contain Periods ('.') or Dollar ('$') characters
  • Field values must be JSON Strings, Numbers or Booleans - Objects and Arrays will be rejected.
  • Keys cannot contain characters such as ~`!@#%^&*'{}|\'"  or the NULL character.
  • Keys are case-sensitive.
  • Values cannot be nested hashes or arrays.
  • We only allow custom data attributes of string type to have up to 255 characters.

Here are some custom attribute examples:

window.intercomSettings = {
  email: "bob@example.com",
  user_id: "123",
  app_id: "abc1234",
  created_at: 1234567890,
  "subdomain": "intercom", // Put quotes around text strings
  "teammates": 4, // Send numbers without quotes
  "active_accounts": 12,
  "last_order_at" : 1350466020, // Send dates in unix timestamp format and end key names with "_at"
  "custom_domain": null // Send null when no value exists for a user
}

Note: You can clear existing values in custom attributes by passing empty strings. 

What custom attributes can I send to Intercom?

You can send any custom attributes you like to Intercom. Typically our customers see a lot of value in sending attributes that relate to customer development. These could be things like:

  • Price plan.
  • Value of purchases.
  • Name of plan.
  • Number of teammates added.
  • Number of songs played.
  • Date the subscription ends.

Intercom also lets you send user data about specific User Events in your product.

Note: If you have over 100 custom user attributes created it may degrade your performance. 

Filtering custom attributes

You can apply filters based on custom attributes, the same way you would with standard attributes. Intercom allows string-based operators for strings, numerical operators for numerical values, and simple true false filters for booleans values.

Once you have added your custom attributes, you should enable identity verification.

Adding descriptions to custom attributes

You can add a description to any custom attribute you create in Intercom. This will help both you and your teammates remember what your custom attributes mean. Here’s how to do that.

How do I archive custom attributes?

Archiving a custom attribute is easy. When you're approaching your custom attribute limit, for example, you can archive the custom attributes you don't want anymore. Once you archive a custom attribute, it won't appear as a filter in your user list. Here's how to do it: 

  1. Open your ‘App settings’ menu in the bottom left-hand corner of the screen by clicking on your avatar.
  2. Select 'People Attributes' from the left hand side menu.
  3. Find the custom attribute field that you want to archive and click the archive icon. You can always unarchive a field later, if you change your mind.

Custom attributes as dates

You can send dates in custom data by sending a unix timestamp (you should send it as seconds). If the name of your custom attribute ends with _at then we'll automatically treat it as a date, rather than a number. In the example below,'last_order_at' will be treated as a date by default.

window.intercomSettings = {
  email: "bob@example.com",
  user_id: "123",
  app_id: "abc1234",
  created_at: 1234567890,
  "subdomain": "intercom", // Put quotes around text strings
  "teammates": 4, // Send numbers without quotes
  "active_accounts": 12,
  "last_order_at" : 1350466020, // Send dates in unix timestamp format and end key names with "_at"
  "custom_domain": null // Send null when no value exists for a user
}

Custom attributes as URLs

If you send Intercom a custom user attribute as a plain string that is a URL like " http://www.google.com", we recognize this as a URL, and turn it into a hyperlink when displayed on Intercom.

If you run into any problems while adding custom attributes about your users to Intercom, just let us know via the Intercom Messenger in the bottom right of this page, or send a mail to team@intercom.com. We'll get you setup in no time. .

Did this answer your question?