Closed m-o-e closed 6 years ago
I'm having the same issue :/
This is completely bananas - your data suddenly becomes unqueryable in this dimension as soon as you get a single dup in Intercom...
Hi all, Yeah, this is a restriction at the moment with the API, i.e. it looks for a specific match so if you have multiple emails it will return the error. So it is not a restriction with the SDK as such. We are aware of this issue and thanks for bringing it up. It is frustrating given that you can identify duplicates via the web UI. We are trialling something internally to see if it resolves this issue to allow you search for users with multiple similar attributes such as email. I cannot provide an ETA at the moment but we if it works we will update the API which should resolve this issue. I will leave this issue open as it may be something other people want to comment on even for suggestions of how they would like it to work as well
Hi there - just wanted to see if there's an update to this? We are also seeing occasional duplicate records making it impossible to work with the API for those users.
+1
+1
Hi @rubendinho .. at present we do not have an update on an ETA for this feature. Thanks for the feedback here, it helps us understand its impact and we are looking to see how and when we can address this. I will provide an update when I have more information on this.
Just want to add that we consider this a bug, not a feature. A portion of our users is inaccessible through the API.
np, thanks for noting that. we do understand that this is a restriction for a number of use cases so we are tacking it as such, i.e. something that needs to be resolved.
+1
👍
+1
👍 thanks for this, unfortunately at the moment we do not have an update on this but the appreciate the feedback and hopefully we will get to this as soon as we can
+1
As a workaround, I am using users.scroll.each and comparing the email address to find the Intercom IDs to process. Gross.
+1 Having the same problem
Hey all - as a heads up, as Cathal mentioned - this issue is best served as a discussion for how this is being handled by you all. Since the behavior you're running into is a result of the behavior of the actual API (for which this repo is just a wrapper for) - your best bet would be to give feedback directly by writing into our messenger, or emailing team@intercom.io . We really do appreciate the feedback 👍
As noted, this is an issue with the API which we will be addressing in the near future, it is on our short term plan. So I will close this issue as it is not an SDK issue and something we are addressing on our API. we can then look into if there is any issue once we make the change on the API
Hey @choran it looks like the new version of the Intercom API (v1.1) has support for the feature that we have in mind here. I'm looking at the List By Email functionality.
You can list users by email to find all users with the same email address. [...] Returns a pageable list of users.
Do you plan to support the new version of the API any time soon? Would you be open to a PR that introduced this functionality?
Thanks!
Hey @davidlaprade great question. We'd be more than happy to look at any PR's that you'd like to submit.
The one caveat to this is that the SDK is API version agnostic, so that functionality will depend on a user by user basis depending on the API version they are using, so that would have to be kept in mind when adding the feature. Hope that makes sense :smile:
Hey @davidlaprade - for now, you could even use the current Ruby SDK to get what you needed. You'll notice that the find all by email call in the API just requires some extra query params - so you should still be able to use find_all
if you're using v1.1 of our API:
intercom.users.find_all(type: 'users', email: email_address, page: 1, per_page: 10, created_since: 2, order: :asc)
Ah, wonderful! Thanks @theandrewykim, @jonnyom
Its a good point that we should have noted this in the README, I have updated with the example above and a note on the version change needed 👍
Version info
Expected behavior
Return all users that match a given email address.
Actual behavior
Intercom::MultipleMatchingUsersError: Multiple existing users match this email address xx@example.com - must be more specific using user_id
Steps to reproduce
intercom.users.find_all(type: 'users', email:'xx@example.com').each_with_index { |u,i| p u }
Question
How to fetch all users that match a given email address without providing any additional information?
The intercom web-interface (search) can do it, but how is it done via the API? We don't know any userids, only the email address.