rubyintercom

Search by custom attribute in Intercom ruby gem


I am using Intercom ruby gem. One of my company responses looks like below:

 @company_id="648",
 @created_at=1578937499,
 @custom_attributes=
  {"cname"=>nil,
   "contacts"=>1,
   "ein"=>"xyz123"
  }

In order to search by company_id, I can do this: intercom.companies.find(company_id: 648) (Reference: https://github.com/intercom/intercom-ruby#search-for-customers) . However, I want to search by one of the custom attributes ein. Is it possible to do that?


Solution

  • I don't think that is possible at the moment

    From the latest API (version 2.3 right now) there is only ability to search contacts (users/leads) https://developers.intercom.com/intercom-api-reference/reference#search-for-contacts

    Looks like retrieving companies can only be done via