back to top ⇧

cvc

Contact Center 365 Visitor Intermediate Client. Creates an iframe and loads the Visitor host application inside it. Provides simple API functions to instruct the application. Uses cross-origin communication to send command messages between the application and this client.

Namespaces

options

Methods (16)

(static) attachEvent(eventName, callback, listeneropt)

Attach event listener to an application event.
Parameters:
Name Type Attributes Default Description
eventName string Name of the event
callback function Function to execute on event
listener object <optional>
this Define the scope of the callback

(static) destroy()

Destroys the iframe container, the host application and the intermediate chat control from the main page.

(static) detachEvent(eventName, callback, listeneropt)

Detach event listener from an application event.
Parameters:
Name Type Attributes Default Description
eventName string Name of the event
callback function Function to execute on event
listener object <optional>
this Define the scope of the callback

(static) downloadLogs()

Download application logs

(static) exit()

Destroys the iframe container and the host application from the main page.

(static) getOption(propertyopt)

Get an intermediate client option or configuration setting.
Parameters:
Name Type Attributes Description
property object <optional>
If defined, returns property with then name, otherwise all setting.
See:
  • cvc#_mOptions

(static) init()

Initiates the intermediate chat controller. Reads configuration settings and adds event listeners. Executed when script is processed.

(static) moveContainer(xPosition, yPosition)

Set the absolute position of the container within the page.
Parameters:
Name Type Description
xPosition number Position in pixels from the left side of the page
yPosition number Position in pixels from the top of the page

(static) resizeContainer(width, height, forceopt)

Set the size of the container.
Parameters:
Name Type Attributes Description
width number Width of the container
height number Height of the container
force boolean <optional>
Ignore size constrains

(static) setCad(cad)

Sets the Call Attach Data to be sent when chat is started or proceeding.
Parameters:
Name Type Description
cad object Type CAD

(static) setLanguage(key)

Sets the language of the application.
Parameters:
Name Type Description
key string Two character language key code

(static) setMinimized(minimizedopt)

Toggles the maximized/minimized state of the application.
Parameters:
Name Type Attributes Description
minimized boolean <optional>
Optionally define should the frame be in minimized state

(static) setOption(options)

Set an intermediate client option or configuration setting.
Parameters:
Name Type Description
options object Any option settings as a key value map.
See:

(static) setState(stateopt)

Toggles the application state between notification and application state.
Parameters:
Name Type Attributes Description
state boolean <optional>
Optionally define should the application state be active

(static) setUser(aliasopt, addressopt)

Sets the user's alias or email address.
Parameters:
Name Type Attributes Description
alias string <optional>
User alias to be shown in chat
address string <optional>
User email to be displayed for the agent

(static) setVisible(visibleopt)

Toggles the visibility state of the chat window.
Parameters:
Name Type Attributes Description
visible boolean <optional>
Optionally define should the window be visible

Events

cad

Fired when a CAD (Call Attach Data) object is changed
Parameters:
Name Type Description
detail object The new CAD object

chatState

Fired when the state of the chat changes
Parameters:
Name Type Description
detail string The state of the chat

ready

Fired when the client application has finished loading inside the iFrame
back to top ⇧

options

Configurable application settings.

Members (10)

(static) ad :number

State transition animation duration.
Default Value:
  • 0.2

(static) eu :string

Visitor ECFS server endpoint url
Default Value:
  • "../../../ecfs"

(static) la :boolean

Should the loading of the application be started after host page has finished.
Default Value:
  • false

(static) mp :object

Position of the mobile container. Needs to have relative position defined, either top or bottom and left or right. Negative value means that the value is not in use.
Default Value:
  • {"t":"","b":0.5,"l":"","r":1}

(static) mw :object

Content of the mobile notification window

(static) np :object

Position of the container. Needs to have relative position defined, either top or bottom and left or right. Negative value means that the value is not in use.
Default Value:
  • {"t":"","b":0.5,"l":"","r":1}

(static) nw :object

Content of the notification window

(static) pu :string

Parent site origin url
Default Value:
  • "window.location.protocol + "//" + window.location.host"

(static) ui :boolean

Should the application be loaded inside an iframe or web component.
Default Value:
  • true

(static) vu :string

Location of visitor client source relative to parent site
Default Value:
  • "../.."