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.
Query contacts: Supported filters, sorting, and search
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.
Contact properties: Supported filters, sorting, and search
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
.
System fields: Supported filters, sorting, and search
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 Field | Supported Filters & Sorting | Supported Values |
---|---|---|
info.extendedFields.emailSubscriptions.deliverabilityStatus | eq() ,ne() ,hasSome() | "VALID" , "BOUNCED" , "SPAM_COMPLAINT" , "NOT_SET" , "INACTIVE" . |
info.extendedFields.emailSubscriptions.effectiveEmail | ascending() , descending() | |
info.extendedFields.emailSubscriptions.subscriptionStatus | eq() , ne() , hasSome() | "SUBSCRIBED" , "UNSUBSCRIBED" , "NOT_SET" , "PENDING" . |
info.extendedFields.members.membershipStatus | eq() , ne() , hasSome() | "APPROVED" , "DENIED" , "PENDING" , "INACTIVE" . |
Custom fields: Supported filters, sorting, and search
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 thecustom.new-customer
extended field, use this flattened field name:'info.extendedFields.custom.new-customer'
.
Data Type/Format | Supported Filters & Sorting |
---|---|
String | eq() , ne() , hasSome() , startsWith() , ascending() , descending() |
Number | eq() , ne() , gt() , lt() , ge() , le() , between() , ascending() , descending() |
Date string in YYYY-MM-DD format | eq() , 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
.
Property | Supported Sorting |
---|---|
_createdDate | ascending() , descending() |
_updatedDate | ascending() , descending() |
displayName | ascending() , 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
.
Property | Supported Sorting |
---|---|
_createdDate | ascending() , descending() |
_updatedDate | ascending() , descending() |
displayName | ascending() , descending() |
Was this helpful?
In This Article
Query contacts: Supported filters, sorting, and search Contact properties: Supported filters, sorting, and search System fields: Supported filters, sorting, and search Custom fields: Supported filters, sorting, and search Query labels: Supported filters and sorting Query extended fields: Supported filters and sorting