Class: Contact

Constructor

new Contact()

Represents an immutable contact object which exposes all possible contact details.
The contact object can also be used to subscribe for presence updates.

Contacts can be retrieved by using Contacts functions Contacts.getContacts() or Contacts.searchContacts().
Both functions return DataRetrieval that is notifying about operation status and new record coming in.
This object can not be used to edit the contact record. In order to update contact use function Contacts.createEditableContact() and then operate on EditableContact object which should be passed to Contacts.updateContact() function.

See:

Methods

getAlias() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns alias of the contact.

Returns:

getASCIIDisplayName() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns non-localized display name of the contact.
If contact has both localized and non-localized versions of display name specified, Contact.getDisplayName() returns localized one and Contact.getASCIIDisplayName() returns non-localized one.
If contact has only one version of display name specified, Contact.getDisplayName() returns the specified display name and Contact.getASCIIDisplayName() returns empty string.

See:
Returns:

getASCIIFirstName() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns non-localized first name of the contact.
If contact has both localized and non-localized versions of first name specified, Contact.getFirstName() returns localized one and Contact.getASCIIFirstName() returns non-localized one.
If contact has only one version of first name specified, Contact.getFirstName() returns the specified given name and Contact.getASCIIFirstName() returns empty string.

See:
Returns:

getASCIILastName() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns non-localized surname of the contact.
If contact has both localized and non-localized versions of surname specified, Contact.getLastName() returns localized one and Contact.getASCIILastName() returns non-localized one.
If contact has only one version of surname specified, Contact.getLastName() returns the specified surname and Contact.getASCIILastName() returns empty string.

See:
Returns:

getCity() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns the city.

Returns:

getCompany() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns the company.

Returns:

getCountry() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns the country.

Returns:

getCustom1() → {AvayaClientServices.Services.Contacts.ContactFieldList.<AvayaClientServices.Services.Contacts.ContactStringField>}

Returns the list of Custom 1 fields.

Returns:

getCustom2() → {AvayaClientServices.Services.Contacts.ContactFieldList.<AvayaClientServices.Services.Contacts.ContactStringField>}

Returns the list of Custom 2 fields.

Returns:

getCustom3() → {AvayaClientServices.Services.Contacts.ContactFieldList.<AvayaClientServices.Services.Contacts.ContactStringField>}

Returns the list of Custom 3 fields.

Returns:

getDepartment() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns the department.

Returns:

getDisplayName() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns display name of the contact.
If contact has both localized and non-localized versions of display name specified, Contact.getDisplayName() returns localized one and Contact.getASCIIDisplayName()} returns non-localized one.
If contact has only one version of display name specified, Contact.getDisplayName()} returns the specified display name and Contact.getASCIIDisplayName() returns empty string.

Returns:

getEmailAddresses() → {AvayaClientServices.Services.Contacts.ContactFieldList.<AvayaClientServices.Services.Contacts.ContactEmailAddressField>}

Returns the list of email addresses.

Returns:

getFirstName() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns first name of the contact.
If contact has both localized and non-localized versions of first name specified, Contact.getFirstName() returns localized one and Contact.getASCIIFirstName() returns non-localized one.
If contact has only one version of first name specified, Contact.getFirstName() returns the specified given name and Contact.getASCIIFirstName() returns empty string.

See:
Returns:

getIMAddresses() → {AvayaClientServices.Services.Contacts.ContactFieldList.<AvayaClientServices.Services.Contacts.ContactIMAddressField>}

Returns the list of instant messaging addresses.

Returns:

getLanguage() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns the preferred locale of the contact (for example, 'en_US').

Returns:

getLastName() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns last name of the contact.
If contact has both localized and non-localized versions of last name specified, Contact.getLastName() returns localized one and Contact.getASCIILastName() returns non-localized one.
If contact has only one version of surname specified, Contact.getLastName() returns the specified surname and Contact.getASCIILastName() returns empty string.

See:
Returns:

getLocation() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns location of the contact

Returns:

getManager() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns the manager.

Returns:

getNotes() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns notes of the contact.

Returns:

getPhoneNumbers() → {AvayaClientServices.Services.Contacts.ContactFieldList.<AvayaClientServices.Services.Contacts.ContactPhoneField>}

Returns the list of phone numbers.

Returns:

getPictureUrl(size) → {string|undefined}

Returns the URL of contact's picture. You can specify the desired picture size via size parameter.
If the URL can not be retrieved or contact doesn't have picture, the function returns undefined.

Parameters:
Name Type Description
size AvayaClientServices.Services.Contacts.ContactPictureSize

Desired size of the picture.

Returns:
{ string | undefined }

getPostalCode() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns the postal code.

Returns:

getPresence() → {AvayaClientServices.Services.Presence.Presence|AvayaClientServices.Services.Presence.SelfPresence|undefined}

Returns presence information of the contact.
Note that for the presence to start being updated, Contact.startPresence() must be invoked.
If presence will no longer be needed, use Contact.stopPresence() in order to stop presence subscription.

Returns:

getRank() → {AvayaClientServices.Services.Contacts.ContactNumberField}

Returns rank of the contact. This value may be used for sorting the contacts list.
Can be any non-negative number (including fractional numbers).

Returns:

getScopiaLoginId() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns Scopia Login ID.
This field will have empty value in non-Scopia deployments or if this contact represents Scopia Terminal.

Returns:

getScopiaUserId() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns Scopia User ID.
This field will have empty value in non-Scopia deployments or if this contact represents Scopia Terminal.

Returns:

getState() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns the state field.

Returns:

getStreetAddress() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns the street address.

Returns:

getTerminal() → {AvayaClientServices.Services.Contacts.Terminal}

Returns Scopia Terminal.
This field will have empty value in non-Scopia deployments or if this contact doesn't represent Scopia Terminal.

See:
Returns:

getUniqueAddressForMatching() → {string}

Returns the unique ID of the contact.

Returns:
{ string }

The address used for matching/merging other contact records.

getWorkRoomNumber() → {AvayaClientServices.Services.Contacts.ContactStringField}

Returns the work room number.

Returns:

isBuddy() → {AvayaClientServices.Services.Contacts.ContactBooleanField}

Returns the buddy flag. Used for presence feature purposes.

Returns:

isFavorite() → {AvayaClientServices.Services.Contacts.ContactBooleanField}

Returns the favorite flag.

Returns:

isVideoCapable() → {AvayaClientServices.Services.Contacts.ContactBooleanField}

Returns the video capable flag.

Returns:

startPresence() → {AvayaClientServices.Base.Promise.<(undefined|AvayaClientServices.Services.Presence.PresenceError)>}

Starts monitoring presence of this contact. Once the operation is completed, Contact.getPresence() will be returning the actual presence information for the contact.

See:
Returns:

stopPresence() → {AvayaClientServices.Base.Promise.<(undefined|AvayaClientServices.Services.Presence.PresenceError)>}

Stops monitoring presence of this contact. Once the operation is completed, Contact.getPresence() will not be returning contact's actual presence information.

Returns:

Callbacks

addOnContactChangedCallback(callback)

Parameters:
Name Type Description
callback AvayaClientServices.Services.Contacts.Contact#onContactChangedCallback

addOnPresenceChangedCallback(callback)

Parameters:
Name Type Description
callback AvayaClientServices.Services.Contacts.Contact#onPresenceChangedCallback

removeOnContactChangedCallback(callback)

Removes existing onContactChangedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Contacts.Contact#onContactChangedCallback

removeOnPresenceChangedCallback(callback)

Removes existing onPresenceChangedCallback.

Parameters:
Name Type Description
callback AvayaClientServices.Services.Contacts.Contact#onPresenceChangedCallback

Capabilities

getDeleteContactCapability() → {AvayaClientServices.Base.Capability}

Returns the capability indicating if this contact can be deleted from the contact list. See Contacts.deleteContact().

Returns:
{ AvayaClientServices.Base.Capability }

Capability object describing whether this particular contact can be deleted or not.

getPresenceCapability() → {AvayaClientServices.Base.Capability}

Returns the capability specifying if Presence information can be retrieved for this contact. See Contact.getPresence().

See:
Returns:
{ AvayaClientServices.Base.Capability }

Capability object describing whether the presence for this particular contact can be retrieved or not.

getUpdateContactCapability() → {AvayaClientServices.Base.Capability}

Returns the capability indicating if this contact can be updated. See also Contacts.updateContact().

Returns:
{ AvayaClientServices.Base.Capability }

Capability object describing whether this particular contact can be changed or not.

Type Definitions

onContactChangedCallback(contacts, contact)

Interface for the callback function to be invoked when the contact is updated.

Parameters:
Name Type Description
contacts AvayaClientServices.Services.Contacts.Contacts

An instance of contacts module.

contact AvayaClientServices.Services.Contacts.Contact

Updated contact object.

onPresenceChangedCallback(contact, presence)

Interface for the callback function to be invoked when the contact's presence information is changed.
Note that Contact.startPresence() must be invoked in order to trigger receiving presence updates.

Parameters:
Name Type Description
contact AvayaClientServices.Services.Contacts.Contact

Object the presence has been updated for.

presence AvayaClientServices.Services.Presence.Presence | AvayaClientServices.Services.Presence.SelfPresence

Presence information of the contact.

©2016 Avaya Inc. All Rights Reserved.