Methods
create(userParams) → {Promise}
Upsert a user object, passes data through to intercom
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
userParams |
Object |
Properties
|
Returns:
- Returns success if intercom is disabled, otherwise
returns results of create command in intercom
Example Response:
{ type: 'user',
id: '561409dbd64903a13a001627',
user_id: null,
anonymous: false,
email: 'cneill@gmail.com',
name: 'und1sk0',
pseudonym: null,
avatar:
{ type: 'avatar',
image_url: 'https://graph.facebook.com/658743372/picture?width=24&height=24' },
app_id: 'wqzm3rju',
companies: { type: 'company.list', companies: [Object] },
location_data:
{ type: 'location_data',
city_name: 'San Francisco',
continent_code: 'NA',
country_name: 'United States',
latitude: 37.7484,
longitude: -122.4156,
postal_code: '94110',
region_name: 'California',
timezone: 'America/Los_Angeles',
country_code: 'USA' },
last_request_at: 1462927661,
last_seen_ip: '98.210.192.155',
created_at: 1444153819,
remote_created_at: 1445019573,
signed_up_at: 1445019573,
updated_at: 1463003043,
session_count: 352,
social_profiles: { type: 'social_profile.list', social_profiles: [Object] },
unsubscribed_from_emails: false,
user_agent_data: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36',
tags: { type: 'tag.list', tags: [Object] },
segments: { type: 'segment.list', segments: [Object] },
custom_attributes: { total_unread_count: 0 } }
- Type
- Promise
find(userParams) → {Promise}
Find a user in Intercom by id, user_id, or email
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
userParams |
Object |
Properties
|
Returns:
- Returns success if intercom is disabled, otherwise
returns results of create command in intercom
- Type
- Promise
list() → {Promise}
List all Users. With pagination
Returns:
Resolves with the body of the list call for the type.
- Type
- Promise