Class: Contact

Contact

new Contact()

Source:
  • WixClient.js

Members

<static> Contact

Prototype

Source:
  • WixClient.js

Methods

addActivity(activity)

Adds an Activity to this Contact. Note, the Contact must be saved for the Activity to be persisted

Parameters:
Name Type Description
activity Activity

The Activity to post

Source:
  • WixClient.js

getActivities(cursor, options)

Returns a list of Activity for this contact, based on the filter. By default, all Activities are returned

Parameters:
Name Type Description
cursor string

The current cursor

options GetActivitiesOptions

The Activity to post

Source:
  • WixClient.js

toJson() → {Object}

Creates a JSON Object representing the contact

Source:
  • WixClient.js
Returns:

A Json object representing the Contact

Type
Object

update(contact) → {Promise.<Object, error>}

Checks for the existence of a Contact by either phone, email or both properties. If the Contact exists with the values you have specified, it will be returned. If email and phone are specified, a Contact will only be returned if both properties match. If no match is found, a new Contact will be created

Parameters:
Name Type Description
contact object

JSON representing the Contact

Source:
  • WixClient.js
Returns:

A new Contact, or an error

Type
Promise.<Object, error>

Type Definitions

Address

Contact Address information

Type:
  • Object
Properties:
Name Type Argument Description
tag String

The context tag associated with this address,

address String <nullable>

The contact's street address,

neighborhood String <nullable>

The contact's street neighborhood,

city String <nullable>

The contact's city,

region String <nullable>

The contact's region. An example of this would be a state in the US, or a province in Canada,

country String <nullable>

The contact's country,

postalCode Number <nullable>

The contact's postal code

Source:
  • WixClient.js

Company

Contact Company information

Type:
  • Object
Properties:
Name Type Description
role string

The contact's role within their company,

name string

The name of the contact's current company

Source:
  • WixClient.js

CustomField

CustomField

Type:
  • Object
Properties:
Name Type Description
field string

The name of the custom field

value string

The value of the custom field

Source:
  • WixClient.js

Email

Contact Email information

Type:
  • Object
Properties:
Name Type Description
tag string

a context tag

email string

The email address to add

contactSubscriptionStatus string

The subscription status of the current contact ['optIn' or 'optInOut' or 'notSet']

siteOwnerSubscriptionStatus string

The subscription status of the site owner in relation to this contact ['optIn' or 'optInOut' or 'notSet']

Source:
  • WixClient.js

ID

Contact ID information

Type:
  • Object
Properties:
Name Type Description
exists boolean

true if this id exists

id string

The id of this Contact

Source:
  • WixClient.js

ImportantDate

Contact Important Date information

Type:
  • Object
Properties:
Name Type Description
tag string

The context tag associated with this date

date dateTime

An important date for this contact, as an ISO 8601 timestamp

Source:
  • WixClient.js

Name

Contact Name information

Type:
  • Object
Properties:
Name Type Description
prefix string

The prefix of the contact's name

first string

The contact's first name

middle string

The contact's middle name

last string

The contact's last name

suffix string

The suffix of the contact's name

Source:
  • WixClient.js

Note

Contact Note information

Type:
  • Object
Properties:
Name Type Description
tag string

a context tag

note string

The note to add

Source:
  • WixClient.js

Phone

Contact Phone information

Type:
  • Object
Properties:
Name Type Description
tag string

a context tag

phone string

The phone number to add

normalizedPhone string

The contact's normalized phone number

Source:
  • WixClient.js

Contact Link information A HATEOAS link to operations applicable to this Contact resource

Type:
  • Object
Properties:
Name Type Description
href string

The href of the operation relevant to this resource

rel string

The relationship of this operation to the returned resource

Source:
  • WixClient.js

Url

Contact Url information

Type:
  • Object
Properties:
Name Type Description
tag string

The context tag associated with this url

url string

A url associated with this contact

Source:
  • WixClient.js