Skip to content

Commit 8821f34

Browse files
committed
Adding clearer instructions for find_all with contacts
1 parent 67c4fdd commit 8821f34

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ intercom.conversations.find_all(email: '[email protected]', type: 'user').each {|c
191191
intercom.conversations.find_all(email: '[email protected]', type: 'user', unread: false).each {|convo| ... }
192192
# Iterate over all unread conversations with a user based on the users email
193193
intercom.conversations.find_all(email: '[email protected]', type: 'user', unread: true).each {|convo| ... }
194+
# Iterate over all conversations for a user with their Intercom user ID
195+
intercom.conversations.find_all(intercom_user_id: '536e564f316c83104c000020', type: 'user').each {|convo| ... }
196+
# Iterate over all conversations for a lead
197+
# NOTE: to iterate over a lead's conversations you MUST use their Intercom User ID and type User
198+
intercom.conversations.find_all(intercom_user_id: lead.id, type: 'user').each {|convo| ... }
194199

195200
# FINDING A SINGLE CONVERSATION
196201
conversation = intercom.conversations.find(id: '1')

0 commit comments

Comments
 (0)