Home//
Web
- Javascript API: Attributes & Objects
Installation
Customizing the Messenger
Secure your Messenger
Javascript API: Methods
Custom Domains for Email Assets
Javascript API: Attribute...
This page details the possible attributes that can be used when Installing the Messenger
- Visitors / Leads
- Logged In users
window.intercomSettings = {
app_id: YOUR_WORKSPACE_ID
// customise installation with your attributes
}These attributes will modify the behaviour of the messenger. They do not modify user/lead data.
| Attribute in Javascript code | Type | Description |
|---|---|---|
| app_id | string | The ID of your Intercom Workspace which will indicate where to store any data |
| custom_launcher_selector | string | The CSS selector of an element to trigger Intercom("show") in order to activate the messenger (See docs). To target an element by ID: "#id_of_element". To target elements by class ".classname_of_elements" |
| alignment | string | Dictate the alignment of the default launcher icon to be on the left/right. Possible values: "left" or "right" (any other value is treated as right). (See docs) |
| vertical_padding | integer | Move the default launcher icon vertically. Padding from bottom of screen. Minimum value: 20. Does not work on mobile. (See docs) |
| horizontal_padding | integer | Move the default launcher icon horizontally. Padding from right side of screen Minimum value: 20. Does not work on mobile. (See docs) |
| z_index | integer | Specify the stack order of the Messenger. (See docs) |
| hide_default_launcher | boolean | Hide the default launcher icon. Setting to false will forcefully show the launcher icon (See docs) |
| hide_notifications | boolean | Hide in-app notifications in the Messenger. true hides notifications, false shows them. Can also be controlled dynamically via the Intercom('hideNotifications', hidden) API. |
| theme_mode | 'light' | 'dark' | 'system' | Sets the theme mode of the Messenger. 'dark' enables dark mode, 'light' enables light mode, 'system' uses the system preference. Can also be controlled dynamically via the Intercom('update', {theme_mode: 'dark'}) API. |
| messenger_style_id | string | Specifies which messenger style configuration to load. Enables multi-brand setups where different visual styles (colors, logos, etc.) are needed per context. Style IDs are available in your workspace under Settings Messenger Appearance Manage Style. Can also be switched dynamically via Intercom('update', {messenger_style_id: '123456'}). (See docs) |
| session_duration | integer | Time in milliseconds for the Intercom session to be considered active. Must be a literal integer for example, 300000 for 5 minutes (= 5 60 1000). String values such as "5*60000" are not evaluated and will be coerced to a number incorrectly (e.g. parsed as 5, expiring the session in 5ms). This duration must be less than that set in your Messenger settings. (See docs) |
| action_color | string* | Used in button links and more to highlight and emphasise |
| background_color | string* | Used behind your team profile and other attributes |
| link_color | string* | Used for hyperlinks in message content, independent of action_color. Defaults to the standard text color when unset |
* The color string can be any valid CSS Color Name HEX or RGB
These attributes are used to update user/lead information.
- When user_id / email is provided, it will be saved as a User record
- When no user_id / email is provided, it will be considered a Visitor record which is not seen in the Intercom dashboard. When a Visitor sends a message via the Intercom messenger they will be converted to a Lead which is viewable in the Intercom dashboard
- Any other attribute not listed below and not in the Messenger Attributes will be treated as a custom user attribute
- If the value of a custom user attribute is set to an empty string, or a string with the value "undefined", or "null", this will appear as Unknown in Platform.
- If a value is set for a custom user attribute that has been configured to prevent updates via the Messenger then this value will be ignored in the request.
| Attribute | Type | Description |
|---|---|---|
| string | The email address of the currently logged in user (Only applicable to users) | |
| user_id | string | The user_id address of the currently logged in user (Only applicable to users) |
| created_at | timestamp | The Unix timestamp (in seconds) when the user signed up to your workspace (Only applicable to users) |
| name | string | Name of the current user/lead |
| phone | string | Phone number of the current user/lead |
| last_request_at | timestamp | This value can't actually be set by the Javascript API (it automatically uses the time of the last request but is a this is a reserved attribute) |
| unsubscribed_from_emails | boolean | Sets the [unsubscribe status]((https://docs.intercom.com/faqs-and-troubleshooting/unsubscribing-users/how-do-i-unsubscribe-users-from-receiving-emails) of the record |
| language_override | string | Set the messenger language programmatically (instead of relying on browser language settings) |
| utm_campaign | string | UTM Campaign valueNote: All UTM parameters are updated automatically and can not be manually overidden |
| utm_content | string | UTM Content value |
| utm_medium | string | UTM Medium value |
| utm_source | string | UTM Source value |
| utm_term | string | UTM Term value |
| avatar | avatar object | Set the avatar/profile image associated to the current record (typically gathered via social profiles via email address) |
| user_hash | string | Used for identity verification (Only applicable to users) |
| company | company object | Current user's company (Only applicable to users) For field definitions see Company Object in the section below Important: Company ID and company name are the minimum requirements to pass a company into Intercom. Note: If users are associated with multiple companies and you want your company targeted messages to be delivered based on a specific company, make sure to include those specific company details here. Intercom will ensure that any company-based rules for your outbound messages must match that company. |
| companies | array of company objects | An array of companies the user is associated to (Only applicable to users) |
| page_title | string | Used for keeping track of user page views. Default value is the document title property. |
Similar to the API avatar object
window.intercomSettings = {
app_id: YOUR_WORKSPACE_ID,
user_id: USER_ID_OF_CURRENTLY_LOGGED_IN_USER,
avatar: {
"type": "avatar",
"image_url" :"https://yourwebsite.com/user_id/profile.png"
}
}Attribute in Javascript code | Attribute in API | Attribute / Data in Web interface | Type | Description |
|---|---|---|---|---|
type | type | string | The value is "avatar" | |
| image_url | image_url | The avatar/profile picture of the record | string | An avatar image URL. Note: needs to be https. |
Learn more about companies from our Help Center article.
These are very similar to the API company object.
Attributes not listed below will be considered as a custom company attribute.
Note: Company ID and company name are the minimum requirements to pass a company into Intercom.
- Single company
- Multiple companies
window.intercomSettings = {
app_id: YOUR_WORKSPACE_ID,
user_id: USER_ID_OF_CURRENTLY_LOGGED_IN_USER,
company: {
company_id: "6",
created_at: 1394531169,
name: "Example Company Inc.",
monthly_spend: 49,
plan: "Pro",
size: 85,
website: "http://example.com",
industry: "Technology"
}
}| Attribute in Javascript code | Attribute in API | Attribute / Data in Web interface | Type | Description |
|---|---|---|---|---|
| id / company_id | company_id | Company ID | string | The company ID of the company |
| name | name | Name | string | The name of the company |
| created_at / remote_created_at | remote_created_at | Company created at | timestamp | The time the company was created in your system |
| plan | plan | Plan | string | The name of the plan the company is on |
| monthly_spend | monthly_spend | Monthly spend | integer | How much revenue the company generates for your business |
| user_count | people | People | integer | Indicates the number of users in Intercom associated to the companyDoes not actually update the value but is a reserved keyword |
| size | size | Company Size | integer | The number of employees in the company |
| website | website | Company Website | string | The URL for the company website |
| industry | industry | Company Industry | string | The industry of the company |