Important:
Wix.Contacts methods are only available from the Dashboard endpoint.
Gets a specific Contact that has interacted with the current site by its ID.
SDK Version: SDK 1.32.0+
Display: Dashboard
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
id (required) | String | The ID of the contact to look up |
onSuccess (required) | Function | Callback function to receive an object with data about the contact |
onFailure (required) | Function | Callback function that's triA function called when an error occurs that receives a Wix.Error |
Example:
Gets a list of all contacts that have interacted with a given site.
SDK Version: SDK 1.31.0+
Display: Dashboard
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
options (required) | Object | Options for this function |
options.label | String or Array[string1, string2,...] | Filter the list of contacts to return by specifying one or more labels that were defined by the user. For example: customers or [customers, colleagues] |
options.pageSize | Integer (1-500) | Number of contacts to display per page. Default is 25. |
onSuccess (required) | Function | Callback function to receive the WixDataCursor object |
onFailure (required) | Function | An on failure callback |
A WixDataCursor object, with the results presented in descending order by date. The following methods are supported by the WixDataCursor:
Example:
Use this method to share contact information with the WixHive.
SDK Version: SDK 1.46.0+
Display: Dashboard
Syntax:
Parameters:
Name | Type | Description |
---|---|---|
contactInfo (required) | Object | Contact information collected by your app. Make sure to include at least the email or phone number in your request - we need it to create/update the contact. |
contactInfo.Name | Object | Contact's Name |
contactInfo.Name.prefix | String | Name prefix (limited to 100 characters) |
contactInfo.Name.first | String | First name (limited to 100 characters) |
contactInfo.Name.middle | String | Middle name (limited to 100 characters) |
contactInfo.Name.last | String | Last name (limited to 100 characters) |
contactInfo.Name.suffix | String | Name suffix (limited to 100 characters) |
contactInfo.picture | String | URL to the Contact's photo |
contactInfo.company | Object | Contact's company details |
contactInfo.company.role | String | Contact's position or role (limited to 100 characters) |
contactInfo.company.name | String | Company name (limited to 100 characters) |
contactInfo.emails | Array[object] | Contact's email addresses |
contactInfo.emails.id | Number | ID of this email within the array |
contactInfo.emails.tag (required) | String] | Tag for this email - home, work, etc (limited to 100 characters) |
contactInfo.emails.email (required) | String | Email address (limited to 250 characters) |
contactInfo.emails.emailStatus | "optOut", "transactional" or "recurring" | The subscription status of the current email |
contactInfo.emails.deliveryStatus | "VALID", "SPAM", "COMPLAINT", "REJECTED", "DEFERRAL" or "BOUNCE" | Email delivery status:
|
contactInfo.phones | Array[object] | Contact's phone number |
contactInfo.phones.id | Number | ID of this phone number within the array |
contactInfo.phones.tag (required) | String | Tag for this phone number - home, work, etc (limited to 100 characters) |
contactInfo.phones.phone (required) | String | Phone number (limited to 30 characters) |
contactInfo.phones.normalizedPhone (required) | String | Normalized phone number |
contactInfo.addresses | Array[object] | Contact's address |
contactInfo.addresses.id | Number | ID of this address within the array |
contactInfo.addresses.tag (required) | String | Tag for this address - home, work, etc (limited to 100 characters) |
contactInfo.addresses.address | String | Street address (limited to 250 characters) |
contactInfo.addresses.neighborhood | String | Neighborhood (limited to 100 characters) |
contactInfo.addresses.city | String | City (limited to 100 characters) |
contactInfo.addresses.region | String | Region, such as a U.S. state or Canadian province (limited to 100 characters) |
contactInfo.addresses.country | String | Country (limited to 100 characters) |
contactInfo.addresses.postalCode | String | Postal code (limited to 20 characters) |
contactInfo.urls | Array[object] | URLs associated with the contact, like Facebook or LinkedIn |
contactInfo.urls.id | Number | ID of this URL within the array |
contactInfo.urls.tag (required) | String | Tag for this URL - personal, Facebook, LinkedIn, etc (limited to 100 characters) |
contactInfo.urls.url (required) | String | The URL |
contactInfo.dates | Array[object] | Important dates for this Contact, like birthday |
contactInfo.dates.id | Number | ID of this date within the array |
contactInfo.dates.tag (required) | String | Tag for this date - birthday, anniversary, etc (limited to 100 characters) |
contactInfo.dates.date (required) | dateTime | The date, as an ISO 8601 timestamp |
contactInfo.onSuccess (required) | Function | An on success callback that returns an object with this information: { Contact: the reconciled Contact, isNew: boolean details: { rejectedData: [ DTO1, DTO2,... ] existingData: [ DTO1, DTO2, ... ] } } |
contactInfo.onFailure | Function | An on failure callback |
Value passed to callback:
An object containing the contact information and the rejected data:
Name | Type | Description |
---|---|---|
Contact | Object | Contains all the information we have for this contact, including the data your app sent. |
isNew | Boolean | Indicates if the contact was just created |
details | Object | Contains more information about this contact, including any data that was rejected |
details.rejectedData | Array | Lists information sent by your app that was rejected (if any). |
details.existingData | Array | Lists the data we already had for this contact, before your app sent additional information. |
Example: