Skip to content

Commit c03a244

Browse files
authored
Updating readme in relation to #404 (#438)
1 parent ad5e0ce commit c03a244

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,19 @@ The metadata key values in the example are treated as follows-
372372
### Contacts
373373

374374
`Contacts` represent logged out users of your application.
375+
Note that `contacts` are referred to as `leads` in the [Intercom](https://developers.intercom.com/intercom-api-reference/reference#leads)
375376

376377
```ruby
377378
# Create a contact
378379
contact = intercom.contacts.create(email: "[email protected]")
379380

380-
# Update a contact
381+
# Update a contact (via create method)
382+
# You can update a contact by calling the create method but you MUST provide an id or user_id
383+
# If you just provide an email, for example, it will create a new contact
384+
# See the [API reference](https://developers.intercom.com/intercom-api-reference/reference#update-lead) for more detail
385+
contact = intercom.contacts.create(email: "[email protected]", id: "3be0398668071a6bc6850413", name:"update_contact")
386+
387+
# Update a contact (via contact object)
381388
contact.custom_attributes['foo'] = 'bar'
382389
intercom.contacts.save(contact)
383390

0 commit comments

Comments
 (0)