Skip to content

Commit e10dc56

Browse files
committed
Merge pull request #157 from intercom/BL/contactdocs
More Contact documentation
2 parents 78f6bea + d25cd48 commit e10dc56

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,29 @@ Intercom::Message.create({
257257
},
258258
:body => "halp"
259259
})
260+
261+
# Message from admin to contact
262+
263+
Intercom::Message.create({
264+
:body => "How can I help :)",
265+
:from => {
266+
:type => "admin",
267+
:id => "1234"
268+
},
269+
:to => {
270+
:type => "contact",
271+
:id => "536e5643as316c83104c400671"
272+
}
273+
})
274+
275+
# Message from a contact
276+
Intercom::Message.create({
277+
:from => {
278+
:type => "contact",
279+
:id => "536e5643as316c83104c400671"
280+
},
281+
:body => "halp"
282+
})
260283
```
261284

262285
#### Events
@@ -314,6 +337,9 @@ contact.save
314337

315338
# Find contacts by email
316339
contacts = Intercom::Contact.find_all(email: "[email protected]")
340+
341+
# Convert a contact into a user
342+
contact.convert(user)
317343
```
318344

319345
### Subscriptions

0 commit comments

Comments
 (0)