Contacts: Supported Filters, Sorting, and Search

This article covers field support for filtering, sorting, and searching in the Contacts API, the Labels API, and the Extended Fields API.

The available options when calling queryContacts() have been divided into these 3 sections:

  • Contact properties: Covers querying the base set of contact properties, such as contact ID, name, emails, and labels.
  • System fields: Covers querying system fields inside the info.extendedFields object.
  • Custom fields: Covers querying custom fields inside the info.extendedFields object.

For information on the difference between system fields and custom fields, see Terminology.

The table below shows field support for filters, sorting, and free-text searching for the base set of contact properties. It doesn't include extended fields (those are covered in the sections below).

For a full description of the Contact object, see ContactsQueryResult > items.

PropertySupported Filters & Sorting
_ideq(), ne(), hasSome()
_createdDateeq(), ne(), gt(), lt(), ge(), le(), between(), ascending(), descending()
_updatedDateeq(), ne(), gt(), lt(), ge(), le(), between()
lastActivity.activityDateeq(), ne(), gt(), lt(), ge(), le(), between(), ascending(), descending()
primaryInfo.emaileq(), ne(), hasSome(), startsWith(), ascending(), descending()
primaryInfo.phoneeq(), ne(), hasSome(), startsWith()
info.name.firsteq(), ne(), hasSome(), startsWith(), ascending(), descending()
info.name.lasteq(), ne(), hasSome(), startsWith(), ascending(), descending()
info.emails.emaileq(), ne(), hasSome(), startsWith()
info.phones.phoneeq(), ne(), hasSome(), startsWith()
info.addresses.streeteq(), ne(), hasSome(), startsWith()
info.addresses.cityeq(), ne(), hasSome(), startsWith()
info.addresses.subdivisioneq(), ne(), hasSome(),
info.addresses.countryeq(), ne(), hasSome(),
info.companyeq(), ne(), hasSome(), startsWith(), ascending(), descending()
info.jobTitleeq(), ne(), hasSome(), startsWith(), ascending(), descending()
info.birthdateeq(), ne(), gt(), lt(), ge(), le(), between(), ascending(), descending()
info.localeeq(), ne(), hasSome(),
info.labelKeyshasSome(), hasAll()

The table below shows field support for filters, sorting, and free-text searching for the Wix-defined extended fields (also known as system fields).

Note: When working directly with the Contact object in your code, data in extended fields must be accessed using bracket notation, like this: info.extendedFields['{key}']. However, when querying or sorting, extended field names are flattened with dot notation, like this: ascending('info.extendedFields.{key}').

Extended FieldSupported Filters & SortingSupported Values
info.extendedFields.emailSubscriptions.deliverabilityStatuseq(),ne(),hasSome()"VALID", "BOUNCED", "SPAM_COMPLAINT", "NOT_SET", "INACTIVE".
info.extendedFields.emailSubscriptions.effectiveEmailascending(), descending()
info.extendedFields.emailSubscriptions.subscriptionStatuseq(), ne(), hasSome()"SUBSCRIBED", "UNSUBSCRIBED", "NOT_SET", "PENDING".
info.extendedFields.members.membershipStatuseq(), ne(), hasSome()"APPROVED", "DENIED", "PENDING", "INACTIVE".

Extended fields that are created by 3rd-party apps or site contributors are known as custom fields. You can add, remove, and change custom field names from the Contact List in the Dashboard.

The table below shows field support for filters, sorting, and free-text searching for custom fields.

Note: When querying or sorting, extended field names are flattened to a dot-separated string, like this: 'info.extendedFields.{key}'. For example, to query the custom.new-customer extended field, use this flattened field name: 'info.extendedFields.custom.new-customer'.

Data Type/FormatSupported Filters & Sorting
Stringeq(), ne(), hasSome(), startsWith(), ascending(), descending()
Numbereq(), ne(), gt(), lt(), ge(), le(), between(), ascending(), descending()
Date string in YYYY-MM-DD formateq(), ne(), gt(), lt(), ge(), le(), between(), ascending(), descending()

Query labels: Supported filters and sorting

This section covers the available options when calling queryLabels().

The table below shows field support for filters and sorting for the label object.

For a full description of the Label object, see LabelsQueryResult > items.

PropertySupported Sorting                                                            
_createdDateascending(), descending()
_updatedDateascending(), descending()
displayNameascending(), descending()

Query extended fields: Supported filters and sorting

This section covers the available options when calling queryExtendedFields().

The table below shows field support for filters and sorting for the extended field object.

For a full description of the ExtendedField object, see ExtendedFieldsQueryResult > items.

PropertySupported Sorting                                                            
_createdDateascending(), descending()
_updatedDateascending(), descending()
displayNameascending(), descending()
Was this helpful?
Yes
No