@@ -61,7 +61,7 @@ Resources this API supports:
61
61
https://api.intercom.io/counts
62
62
https://api.intercom.io/subscriptions
63
63
https://api.intercom.io/jobs
64
-
64
+
65
65
66
66
### Examples
67
67
@@ -99,7 +99,7 @@ contacts = intercom.contacts.search(
99
99
}
100
100
)
101
101
contacts.each {|c | p c.email}
102
- # For full detail on possible queries, please refer to the API documentation:
102
+ # For full detail on possible queries, please refer to the API documentation:
103
103
# https://developers.intercom.com/intercom-api-reference/reference
104
104
105
105
# Merge a lead into an existing user
@@ -191,7 +191,7 @@ intercom.data_attributes.save(attribute)
191
191
attribute.archived = true
192
192
intercom.data_attributes.save(attribute)
193
193
194
- # Find all customer attributes including archived
194
+ # Find all customer attributes including archived
195
195
customer_attributes_incl_archived = intercom.data_attributes.find_all({" model" : " contact" , " include_archived" : true })
196
196
customer_attributes_incl_archived.each { |attr | p attribute.name }
197
197
```
@@ -321,7 +321,7 @@ conversation.statistics.time_to_admin_reply
321
321
conversation.statistics.last_assignment_at
322
322
323
323
# Get information on the sla applied to a conversation
324
- conversation.sla_applied.sla_name
324
+ conversation.sla_applied.sla_name
325
325
326
326
# REPLYING TO CONVERSATIONS
327
327
# User (identified by email) replies with a comment
@@ -370,9 +370,9 @@ intercom.conversations.mark_read(conversation.id)
370
370
intercom.conversations.run_assignment_rules(conversation.id)
371
371
372
372
# Search for conversations
373
- # For full detail on possible queries, please refer to the API documentation:
374
- # https://developers.intercom.com/intercom-api-reference/reference
375
-
373
+ # For full detail on possible queries, please refer to the API documentation:
374
+ # https://developers.intercom.com/intercom-api-reference/reference
375
+
376
376
# Search for open conversations sorted by the created_at date
377
377
conversations = intercom.conversations.search(
378
378
query: {
@@ -386,18 +386,23 @@ conversations = intercom.conversations.search(
386
386
conversations.each {|c | p c.id}
387
387
388
388
# Tagging for conversations
389
- tag = intercom.tags.find(id: " 2" )
389
+ tag = intercom.tags.find(id: " 2" )
390
390
conversation = intercom.conversations.find(id: " 1" )
391
391
392
392
# An Admin ID is required to add or remove tag on a conversation
393
- admin = intercom.admins.find(id: " 1" )
393
+ admin = intercom.admins.find(id: " 1" )
394
394
395
395
# Add a tag to a conversation
396
396
conversation.add_tag(id: tag.id, admin_id: admin.id)
397
397
398
398
# Remove a tag from a conversation
399
399
conversation.remove_tag(id: tag.id, admin_id: admin.id)
400
-
400
+
401
+ # Add a contact to a conversation
402
+ conversation.add_contact(admin_id: admin.id, customer: { intercom_user_id: contact.id })
403
+
404
+ # Remove a contact from a conversation
405
+ conversation.remove_contact(id: contact.id, admin_id: admin.id)
401
406
```
402
407
403
408
#### Full loading of an embedded entity
0 commit comments