Module: NexusConnectSDK

NexusConnectSDK global namespace

Version:
  • 2.1

Namespaces

chat

Methods


<static> clearContext()

Clears any previously stored data except any user identity information


<static> clearIdentity()

Clears any previously stored consumer identity information


<static> exitHelp()

Ends a live/assisted help session


<static> getAutoComplete(search_text, resultStructure, listTitle, autoCompleteElement [, selfserviceElement])

Gets auto-complete results based on the input search text and inject the result into autoCompleteElement. The resulting elements will display attributes specified in the resultStructure.

By Default resultStructure contains pathName, stepName, pathDescription. The results can be further filtered using the options passed in the resultStructure parameter

Parameters:
Name Type Argument Description
search_text string

The search text based on which autocomplete self-help list will be populated.

resultStructure Array.<string>

An array of strings that decides what attributes should be displayed in the resulting elements.

Possible values are:

  • pathName - the name of the Guided Path
  • stepName - the name of the Guided Path step
  • pathDescription - the description of the Guided Path

If resultStructure is not specified or set to null then all attributes are included by default.

listTitle string

The title of the autocomplete list. If null is passed then the list will not have any title.

autoCompleteElement DOMElement

Reference to a DOMElement into which the autocomplete results will be injected.

selfserviceElement DOMElement <optional>

An optional reference to a DOMElement into which the self-help application will be injected. If not specified, the self-help application is loaded inside a dynamically created element.


<static> initialize(apiToken)

Initializes the SDK with the specified API token

Parameters:
Name Type Description
apiToken string

the API token to be used by the SDK


<static> isLiveHelpActive()

Returns whether or not the live/assisted help application is active.

Returns:

true if the live/assisted help application is active; false if not

Type
boolean

<static> logAction(name [, data])

Log a user action on the page.

Logged data will be shown under session breadcrumb history.

Parameters:
Name Type Argument Description
name string

the name of the user action

data object <optional>

the data associated with the user action


<static> logContent(name [, data])

Log information about the content

Logged data will be shown under content detail section on agent side.

Parameters:
Name Type Argument Description
name string

the name of content

data object <optional>

the content-specific data to be logged


<static> logDevice(name [, data])

Log information about the device.

Logged data will be shown under device detail section on agent side.

Parameters:
Name Type Argument Description
name string

the name of consumer's device

data object <optional>

the device-specific data to be logged


<static> onSelfserviceContainerSizeChange(callback)

Sets a callback that is invoked when the self-help application container size changes to help the containing application adjust its size

Parameters:
Name Type Description
callback function

reference to a callback function invoked when the self-help application container size changes


<static> preserveContext(preserve)

Sets whether or not the current context information should be preserved after the self-help API call

Parameters:
Name Type Description
preserve boolean

true if context information should be preserved; false if not


<static> requestHandledByApp(appHandled)

Set whether or not navigation to a guided path is handled by the containing application or the self-help application

Parameters:
Name Type Description
appHandled boolean

true if the containing application will handle guided path navigation; false if not


<static> resetContext()

Clears any previously stored data including any user identity information


<static> setContactUsOptions(options)

Sets contact us options to be used

Parameters:
Name Type Description
options object

the options for contact

Properties
Name Type Description
phone string

the phone number to be displayed to the consumer to dial.

skill string

the required skill of the agent who the support request should be escalated to

remoteConnectionType string

the type of remote control that must be used. Valid values are remote and cobrowse. Default is remote


<static> setCustomizationOptions(options)

Sets the options of customizing the self-help or live-help

Parameters:
Name Type Description
options object

the customization options

Properties
Name Type Description
themeUrl string

URL to the custom theme CSS file

stepContentThemeUrl string

URL to the custom theme CSS file for step content


<static> setData(param)

Sets custom data to be passed to the SDK

Parameters:
Name Type Description
param object

custom data represented as key-value pairs


<static> setDisplayOrder(displayOrder)

Set the display order of widgets displayed in self-help

Parameters:
Name Type Description
displayOrder Array.<string>

An array of widget names in the required display order.

Possible values are:

  • search - the search widget
  • categories - the category cards widget
  • paths - the recommended paths widget
  • contact_us - the contact us widget with the call and chat buttons as configured

When displayOrder is not set or null is passed as the value, then all the widgets are displayed in the order of search, categories, paths and contact_us


<static> setEmail(emailAddress)

Sets the e-mail address the consumer to the specified address

Parameters:
Name Type Description
emailAddress string

the e-mail address of the consumer to be set


<static> setExternalId(externalId)

Sets an external ID of the consumer to the specified ID

Parameters:
Name Type Description
externalId string

the external ID of the consumer to be set


<static> setFirstName(firstName)

Sets the first name of the consumer to the specified name

Parameters:
Name Type Description
firstName string

the first name of the consumer


<static> setLanguage(languageCode)

Sets the language code to be used by the self-help and live-help application

Parameters:
Name Type Description
languageCode string

iso language code representing the language to be used


<static> setLastName(lastName)

Sets the last name of the consumer to the specified name

Parameters:
Name Type Description
lastName string

the last name of the consumer to be set


<static> setPhone(phoneNumber)

Sets the phone number of the consumer to the specified number

Parameters:
Name Type Description
phoneNumber string

the phone number of the consumer to be set


<static> showExitPath(showExit)

Set whether or not the exit path button is displayed inside the self-help application

Parameters:
Name Type Description
showExit boolean

true if the exit path button must be displaed inside the self-help application; false if not


<static> showFeedbackOnExitPath(showFeedback)

Set whether or not the feedback prompt must be displayed by the self-help application on completion of a path

Parameters:
Name Type Description
showFeedback boolean

true if the feedback prompt has to be shown; false if not


<static> showLiveHelp(element, options)

Brings up the Assisted Support Screen.

Creates iframe which can be appended to an element within dialog box that overlays over a small area of the screen.

Parameters:
Name Type Description
element DOMElement

An optional container for assisted support screen.

options object

options to configure the live-help

Properties
Name Type Description
mode string

what assisted help options are available to the consumer. Valid values are call and chat and "" for both. Default is both.

phone string

Live Help phone number. Calling card number if configured is used as default.

skill string

Name of skill for queueing chat. If no skill is passed, mode is set to call.

remoteConnectionType string

the type of remote control that must be used. Valid values are remote and cobrowse. Default is remote


<static> showSelfHelpForId(helpId [, element])

Loads the self-help application for the content with the specified help ID.

Parameters:
Name Type Argument Description
helpId string

the help ID of the self-help content to load

element DOMElement <optional>

an optional reference to a DOMElement into which the self-help application should load. If not specified, the self-help application is loaded into the body of the page.


<static> showSelfHelpForPathId(pathId [, element])

Loads the self-help application for the content with the specified path id.

Parameters:
Name Type Argument Description
pathId string

the path ID of the self-help content to load

element DOMElement <optional>

an optional reference to a DOMElement into which the self-help application should load. If not specified, the self-help application is loaded into the body of the page.


<static> showSelfHelpForSearch(searchTerm [, element])

Loads the self-help application for the content with the specified search term.

Parameters:
Name Type Argument Description
searchTerm string

the search term used to query the self-help content to load

element DOMElement <optional>

an optional reference to a DOMElement into which the self-help application should load. If not specified, the self-help application is loaded into the body of the page.


<static> showSelfHelpForTags(tags [, element])

Loads the self-help application for the content with the specified tags.

Parameters:
Name Type Argument Description
tags Array.<string>

an array containing the tags of the self-help content to load

element DOMElement <optional>

an optional reference to a DOMElement into which the self-help application should load. If not specified, the self-help application is loaded into the body of the page.