queryContacts( )


Developer Preview

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.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),in(),exists()
_createdDateeq(),ne(),gt(),lt(),ge(),le(),ascending(),descending()
_updatedDateeq(),ne(),gt(),lt(),ge(),le()
lastActivity.activityDateeq(),ne(),gt(),lt(),ge(),le(),ascending(),descending()
primaryInfo.emaileq(),ne(),in(),exists(),startsWith(),ascending(),descending()
primaryInfo.phoneeq(),ne(),in(),exists(),startsWith()
info.name.firsteq(),ne(),in(),exists(),startsWith(),ascending(),descending()
info.name.lasteq(),ne(),in(),exists(),startsWith(),ascending(),descending()
info.companyeq(),ne(),in(),exists(),startsWith(),ascending(),descending()
info.jobTitleeq(),ne(),in(),exists(),startsWith(),ascending(),descending()
info.birthdateeq(),ne(),ascending(),descending()
info.localeeq(),ne(),in(),exists()
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Members and Contacts - all permissions
Read Members and Contacts - all read permissions
Manage Contacts
Read Contacts
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsQueryContactsOptions

Query contact options.

Returns
Did this help?