This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a query to retrieve a list of contacts.
The queryContacts()
function builds a query to retrieve a list of contacts and returns a ContactsQueryBuilder
object.
The returned object contains the query definition, which is typically used to run the query using the find()
function.
You can refine the query by chaining ContactsQueryBuilder
functions onto the query. ContactsQueryBuilder
functions enable you to sort, filter, and control the results queryContacts()
returns.
queryContacts()
runs with these ContactsQueryBuilder
defaults, which you can override:
skip(0)
limit(50)
descending(\"_createdDate\")
The functions that are chained to queryContacts()
are applied in the order they are called. For example, if you apply ascending('info.company')
and then descending('info.name.last')
, the results are sorted first by the company name, and then, if there are multiple results with the same company, the items are sorted by last name.
PROPERTY | SUPPORTED FILTERS & SORTING |
---|---|
_id | eq() ,ne() ,in() ,exists() |
_createdDate | eq() ,ne() ,gt() ,lt() ,ge() ,le() ,ascending() ,descending() |
_updatedDate | eq() ,ne() ,gt() ,lt() ,ge() ,le() |
lastActivity.activityDate | eq() ,ne() ,gt() ,lt() ,ge() ,le() ,ascending() ,descending() |
primaryInfo.email | eq() ,ne() ,in() ,exists() ,startsWith() ,ascending() ,descending() |
primaryInfo.phone | eq() ,ne() ,in() ,exists() ,startsWith() |
info.name.first | eq() ,ne() ,in() ,exists() ,startsWith() ,ascending() ,descending() |
info.name.last | eq() ,ne() ,in() ,exists() ,startsWith() ,ascending() ,descending() |
info.company | eq() ,ne() ,in() ,exists() ,startsWith() ,ascending() ,descending() |
info.jobTitle | eq() ,ne() ,in() ,exists() ,startsWith() ,ascending() ,descending() |
info.birthdate | eq() ,ne() ,ascending() ,descending() |
info.locale | eq() ,ne() ,in() ,exists() |
You can only call this method when authenticated as a Wix app or Wix user identity.
Query contact options.