How to Use itemSearch for Multiple Options Custom Fields?

Options

I’m trying to use the itemSearch to get all companies with a custom field of the "multiple options" type, but the request is returning no results.

How can I search for companies that have a specific option set in a custom field of the "multiple options" type?

For example, the custom field name is "category" and it has two options: “Client” and “Partner”. I’d like to search for all companies that are categorized as clients.

Here is the request I'm using:

{{baseUrl}}/itemSearch/field?term=client&field_type=organizationField&field_key=bbdb2eef7e65dcb531086fb3ba9c8cdddd514f14&return_item_ids=true

This version clarifies your intention and provides the necessary details in a more organized manner.

Tagged:

Best Answer

  • Manuel Oliveira
    Manuel Oliveira Admin Posts: 1,143 COMMUNITY MANAGER
    5 Likes First Answer First Anniversary First Comment
    #2 Answer ✓
    Options

    Hi @Edson de Paula Is your field single or multiple option type? If so that could be the reason, as itemSearch will search by values under text, large text, numerical, monetary, autocomplete, phone and address type custom fields.

    Instead, you can try creating an organization filter that finds all companies with that specific option and then using GET/v1/organizations with filter_id being the id for the specific organization filter you want to apply.

Answers