JSMCAPI Classes

This chapter discusses the JavaScript MultiChannel Application Programming Interface (JSMCAPI) classes.

Click to jump to top of pageClick to jump to parent topicUnderstanding JSMCAPI

This section introduces the JSMCAPI, a JavaScript-based API used to build custom applications, such as MultiChannel consoles, or to enable MultiChannel functionality on the PeopleSoft Pure Internet Architecture page. The API is built upon the REN server JavaScript client and is a pure JavaScript API.

JSMCAPI is the interface with which the application developer accessess the JSMCAPI functionalities. JSMCAPI provides a set of objects such as User, Address, Group, and so on. The psmc, a global object, provides all those methods called to send agent requests to the server; it also provides an event handler callback method for the PeopleSoft MultiChannel Application Programming Interface (PSMCAPI) call backs for events coming from the CTI server.

The JSMCAPI communicates with the PSMCAPI through the REN server using MCP (Multi-Channel Protocol). MCP includes topic and event definition. In general, JSMCAPI:

Click to jump to top of pageClick to jump to parent topic_Address Class Hierarchy

The _Address class can be extended by other subclasses. The following flowchart shows the different subclasses, and how they interrelate.

Do not instantiate _Address or _UQAddress class objects. Instead, use the child classes.

_Address class hierarchy

See Also

_Address Class Constructor

_UQAddress Class Constructor

A2AChatAddress Class Constructor

Extension Class Constructor

ChatAddress Class Constructor

EmailAddress Class Constructor

GenericAddress Class Constructor

Click to jump to top of pageClick to jump to parent topic_Address Class Constructor

The following is the _Address class constructor.

Click to jump to top of pageClick to jump to parent topic_Address

Syntax

_Address()

Description

Creates an _Address object that describes the address.

Parameters

None.

Returns

An _Address object.

Click to jump to top of pageClick to jump to parent topic_Address Class Fields

In this section we discuss the JSMCAPI _Address class fields. These fields are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topiccaps

Description

The capacities of the address.

Type: object.

Click to jump to top of pageClick to jump to parent topicid

Description

The ID of the address.

Type: string.

Click to jump to top of pageClick to jump to parent topic_Address Class Callback Event Method

The following is the callback event method used with a JSMCAPI _Address object.

Click to jump to top of pageClick to jump to parent topiconError

Syntax

onError(event)

Description

Fires on the event of an address error.

Click to jump to top of pageClick to jump to parent topic_UQAddress Class Constructor

The following is the UQAddress class constructor.

Click to jump to top of pageClick to jump to parent topic_UQAddress

Syntax

_UQAddress()

Description

Creates a _UQAddress object, which is the base for the various addresses associated with the universal queue server.

Parameters

None

Returns

A universal queue address object.

Click to jump to top of pageClick to jump to parent topic_UQAddress Class Fields

The _UQAddress class inherits the following fields from the _Address class.

See _Address Class Fields.

The following are the _UQAddress class fields.

Click to jump to top of pageClick to jump to parent topicTasks

Description

The associative array of the tasks on the queue managed by the address.

Click to jump to top of pageClick to jump to parent topic_UQAddress Methods

The following are the _UQAddress methods.

Click to jump to top of pageClick to jump to parent topicacceptTask

Syntax

acceptTask(task, reason)

Description

Sends a request to the universal queue server to signal that the client has accepted the task.

Parameters

task

The task ID.

reason

The associated reason code.

Returns

None.

Click to jump to top of pageClick to jump to parent topicdequeueTask

Syntax

dequeueTask(task)

Description

Sends a request to the universal queue server to remove the task from its queue.

Parameters

task

The task ID.

Returns

None.

Click to jump to top of pageClick to jump to parent topic_UQAddress Class Callback Event Methods

The _UQAddress class inherits the onError callback event method from the _Address class.

See _Address Class Callback Event Method.

The following are the callback event methods used with a JSMCAPI universal queue address object. The callback event methods are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topiconAccepted

Syntax

onAccepted(event)

Description

Fires when the task is accepted.

Click to jump to top of pageClick to jump to parent topiconAcceptingTask

Syntax

onAcceptingTask(event)

Description

Fires as the task is being accepted.

Click to jump to top of pageClick to jump to parent topiconDequeueingTask

Syntax

onDequeueingTask(event)

Description

Fires as the task is being dequeued.

Click to jump to top of pageClick to jump to parent topiconNotify

Syntax

onNotify(event)

Description

Fires on task notification.

Click to jump to top of pageClick to jump to parent topiconTaskAdded

Syntax

onTaskAdded(event)

Description

Fires when the task is added to the addressed queue.

Click to jump to top of pageClick to jump to parent topiconTaskRemoved

Syntax

onTaskRemoved(event)

Description

Fired when the task is removed

Click to jump to top of pageClick to jump to parent topiconUnassigned

Syntax

onUnassigned(event)

Description

Fired when the task is unassigned.

Click to jump to top of pageClick to jump to parent topic_User Class Hierarchy

The _User class can be extended by other subclasses. The following flowchart shows the different subclasses, and how they interrelate.

_User class hierarchy

See Also

Buddy Class Constructor

User Class Constructor

Click to jump to top of pageClick to jump to parent topic_User Class Constructor

The following is the _User class constructor.

Click to jump to top of pageClick to jump to parent topic_User

Syntax

_User()

Description

Describes the base class of user/agent.

Parameters

None.

Returns

A _User object.

Click to jump to top of pageClick to jump to parent topic_User Class Fields

The following are the fields associated with the JSMCAPI _User class. These fields are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicagentID

Description

The agent's agent ID.

Type: string.

Click to jump to top of pageClick to jump to parent topiccaps

Description

The agent capabilities on each group.

Type: associative array.

Click to jump to top of pageClick to jump to parent topicid

Description

The agent's PeopleSoft user ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicname

Description

The agent's user name.

Type: string.

Click to jump to top of pageClick to jump to parent topicpresences

Description

The agent's presence on each group.

Type: associative array.

Click to jump to top of pageClick to jump to parent topicstates

Description

Agent state on each group.

Type: associative array, including the constants beginning with ST_*.

These constants must be accessed from an instantiated object.

Click to jump to top of pageClick to jump to parent topicST_LOGGEDIN

Description

The agent is logged in.

Click to jump to top of pageClick to jump to parent topicST_LOGGEDOUT

Description

The agent is logged out.

Click to jump to top of pageClick to jump to parent topicST_NOTREADY

Description

The agent is not ready.

Click to jump to top of pageClick to jump to parent topicST_READY

Description

The agent is ready.

Click to jump to top of pageClick to jump to parent topicST_UNKNOWN

Description

The agent's state is unknown.

Click to jump to top of pageClick to jump to parent topicST_WORKNOTREADY

Description

The agent is in the work not ready state.

Click to jump to top of pageClick to jump to parent topicST_WORKREADY

Description

The agent is in the work ready state.

Click to jump to top of pageClick to jump to parent topicstatistics

Description

Agent statistics for CTI.

Type: AgentStatistics object.

See Also

AgentStatistics Class Constructor.

Click to jump to top of pageClick to jump to parent topicstatistics1

Description

Agent statistics for the universal queue server.

Type: UserStatistics1 object.

See Also

UserStatistics1 Class Constructor.

Click to jump to top of pageClick to jump to parent topicstatistics2

Description

Agent statistics for the universal queue server.

Type: UserStatistcs2 object.

See Also

UserStatistics2 Class Constructor.

Click to jump to top of pageClick to jump to parent topicA2AChat Class Constructor

The following is the A2AChat class constructor.

Click to jump to top of pageClick to jump to parent topicA2AChat

Syntax

A2AChat(event,address,chatType)

Description

Creates an agent-to-agent chat object.

The chat is related to the A2AChatAddress. It does not extend Task as it is not generated or tracked by the universal queue server. Construction occurs inside the A2AChatAddress.

Parameters

event

Specify the event associated with the agent-to-agent chat.

address

Specify the address from A2AChatAddress.

chatType

Specify the chat type.

Returns

An agent-to-agent chat object.

Click to jump to top of pageClick to jump to parent topicA2AChat Class Fields

The following are the A2AChat fields.

Click to jump to top of pageClick to jump to parent topicaddress

Description

The address containing the agent-to-agent chat.

Type: A2AChatAddress object.

See Also

A2AChatAddress Class Constructor

Click to jump to top of pageClick to jump to parent topicagentID

Description

The associated agent's ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicagentName

Description

The associated agent's name.

Type: string.

Click to jump to top of pageClick to jump to parent topicappData

Description

The application data that is provided to the client with the notification event.

Type: AppData object.

See Also

AppData Class Constructor

Click to jump to top of pageClick to jump to parent topicchatType

Description

The type of chat, either A2AChat.TYPE_CONSULT or A2AChat.TYPE_ANSWER .

Type: string, with one of the following constants:

Value

Description

TYPE_ANSWER

The A2AChat type answer. This type is generated when another agent wants this agent to answer an A2AChat.

TYPE_CONSULT

The A2AChat type consult. This type is generated when this agent wants to consult another agent.

Example

The A2AChat.TYPE_* can only be accessed as in the following example:

var value = A2AChat.TYPE_CONSULT;

See Also

GLOBALS Class Fields

Click to jump to top of pageClick to jump to parent topicid

Description

The ID of this chat.

Type: string with PS_JR constant.

Click to jump to top of pageClick to jump to parent topicjr

Description

JournalRoute

Type: string.

Click to jump to top of pageClick to jump to parent topictype

Description

The task type, chat.

Type: string.

Click to jump to top of pageClick to jump to parent topicuniqueueId

Description

The unique ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicA2AChat Class Method

The following is the A2AChat class method.

Click to jump to top of pageClick to jump to parent topicgetURL

Syntax

getURL(defaultURL)

Description

Returns the URL for the given task.

Parameters

defaultURL

If not null, this value will override the generated base URL.

Returns

The URL associated with this task.

Click to jump to top of pageClick to jump to parent topicA2AChatAddress Class Constructor

The following is the A2AChatAddress constructor.

Click to jump to top of pageClick to jump to parent topicA2AChatAddress

Syntax

A2AChatAddress()

Description

Agent-to-agent chat address. Handles the creation of agent-to-agent chats for incoming and outgoing chat communication.

Parameters

None.

Returns

An A2AChatAddress object.

Click to jump to top of pageClick to jump to parent topicA2AChatAddress Class Fields

The A2AChatAddress class inherits the following fields from the _Address class:

See _Address Class Fields.

The following are the fields associated with the A2AChatAddress class.

Click to jump to top of pageClick to jump to parent topicid

Description

The address ID.

Type: string.

Click to jump to top of pageClick to jump to parent topictasks

Description

The associative array of A2AChats.

Type: associative array.

See Also

GLOBALS Class Fields

Click to jump to top of pageClick to jump to parent topicA2AChatAddress Class Method

The following is the A2AChatAddress class method:

Click to jump to top of pageClick to jump to parent topicinitiateChat

Syntax

initiateChat(agentId)

Description

Initializes the A2AChatAddress by creating an A2AChat task.

Parameters

agentId

The ID of the agent you wish to chat with.

Returns

None.

Click to jump to top of pageClick to jump to parent topicA2AChatAddress Class Callback Event Methods

The A2AChatAddress class inherits the onError callback event method from the _Address class.

See _Address Class Callback Event Method.

The following are the A2AChatAddress class callback methods:

Click to jump to top of pageClick to jump to parent topiconChatEnded

Syntax

onChatEnded(event)

Description

Fires when an agent-to-agent chat is closed.

Click to jump to top of pageClick to jump to parent topiconInitiatingChat

Syntax

onInitiatingChat(event)

Description

Fires when initiating a chat.

Click to jump to top of pageClick to jump to parent topiconNotify

Syntax

onNotify(event)

Description

Fires when receiving the event notification.

Click to jump to top of pageClick to jump to parent topicAgentStatistics Class Constructor

The following is the AgentStatistics class constructor.

Click to jump to top of pageClick to jump to parent topicAgentStatistics

Syntax

AgentStatistics()

Description

The agent statistics information.

Parameters

None.

Returns

An AgentStatistics object.

Click to jump to top of pageClick to jump to parent topicAgentStatistics Class Fields

The following are the AgentStatistics class fields.

Click to jump to top of pageClick to jump to parent topicaverageCallDuration

Description

The average call duration, in seconds, for an agent.

Type: string.

Click to jump to top of pageClick to jump to parent topicaverageHoldDuration

Description

The average hold duration, in seconds, for an agent.

Type: string.

Click to jump to top of pageClick to jump to parent topiccallsHandled

Description

The total number of calls handled by an agent.

Type: string.

Click to jump to top of pageClick to jump to parent topicdata

Description

An associative array of key value pairs that includes all agent statistics.

Type: associative array.

Click to jump to top of pageClick to jump to parent topicunavailableDuration

Description

The total time for which an agent is unavailable.

Type: string.

Click to jump to top of pageClick to jump to parent topicwaitDuration

Description

The total time an agent has to wait for a call.

Type: string.

Click to jump to top of pageClick to jump to parent topicAppData Class Constructor

The following is the AppData class constructor.

Click to jump to top of pageClick to jump to parent topicAppData

Syntax

AppData()

Description

The AppData object describes the key-value pairs of the data received on the agent-to-agent chat event.

Parameters

None.

Returns

Type: AppData object.

Click to jump to top of pageClick to jump to parent topicAppData Class Fields

The following are the AppData class fields.

Click to jump to top of pageClick to jump to parent topicdata

Description

An associative array of the data in name value pairs.

Type: associative array.

Click to jump to top of pageClick to jump to parent topicgroupId

Description

The group ID passed in by the notify event.

Type: string.

Click to jump to top of pageClick to jump to parent topicjr

Description

The JournalRoute.

Type: string.

Click to jump to top of pageClick to jump to parent topicquestion

Description

The question posed by the chat initiator.

Type: string.

Click to jump to top of pageClick to jump to parent topicstrData

Description

The raw application data.

Type: string.

Click to jump to top of pageClick to jump to parent topicsubject

Description

The subject of the chat.

Type: string.

Click to jump to top of pageClick to jump to parent topicuniqueId

Description

The unique ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicurl

Description

The URL passed in by the AppData.

Type: string with the following constant:

Value

Description

URL

The associated URL.

Click to jump to top of pageClick to jump to parent topicuserId

Description

The agent's user ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicusername

Description

The agent's user name.

Type: string.

Click to jump to top of pageClick to jump to parent topicwizUrl

Description

The chat wizard URL.

Type: string.

Click to jump to top of pageClick to jump to parent topicAppData Class Method

The following is the AppData class method.

Click to jump to top of pageClick to jump to parent topicaddKeyValue

Syntax

addKeyValue(kdy, value)

Description

Add the key value pair to the AppData object.

Parameters

key

The key.

value

The value.

Returns

None.

Click to jump to top of pageClick to jump to parent topicBuddy Class Constructor

The Buddy class extends the _User class.

See _User Class Constructor.

The following is the Buddy class constructor.

Click to jump to top of pageClick to jump to parent topicBuddy

Syntax

Buddy()

Description

Describes the buddy. An agent can register buddies and is notified of state changes.

Parameters

None.

Returns

A Buddy object.

Click to jump to top of pageClick to jump to parent topicBuddy Class Fields

The Buddy class inherits the following fields from the _User class:

See _User Class Constructor.

Click to jump to top of pageClick to jump to parent topicBuddy Class Callback Event Methods

The following are the Buddy class callback event methods.

Click to jump to top of pageClick to jump to parent topiconStat1

Syntax

onStat1(event)

Description

Fires when statistics1 is received.

Click to jump to top of pageClick to jump to parent topiconStat2

Syntax

onStat2(event)

Description

Fires when statistics2 is received.

Click to jump to top of pageClick to jump to parent topiconState

Syntax

onState(event)

Description

Fires when the state event is received.

Click to jump to top of pageClick to jump to parent topicCall Class Constructor

The Call class extends the Task class.

See Task Class Constructor.

The following is the Call class constructor.

Click to jump to top of pageClick to jump to parent topicCall

Syntax

Call(strCall)

Description

The Call object describes the call task information associated with the line.

Parameters

strCall

Specify the call to use with this object.

Returns

A Call object.

Click to jump to top of pageClick to jump to parent topicCall Class Fields

The Call class inherits the following fields from Task:

See Task Class Fields.

The following are additional Call class fields.

Click to jump to top of pageClick to jump to parent topicline

Description

The line object that is associated with this call.

Type: line object.

See Also

Line Class Constructor

Click to jump to top of pageClick to jump to parent topicstatistics

Description

Statistics associated with the call.

Type: CallStatistics object.

See Also

CallStatistics Class Constructor.

Click to jump to top of pageClick to jump to parent topicCallData Class Constructor

The following is the CallData class constructor.

Click to jump to top of pageClick to jump to parent topicCallData

Syntax

CallData()

Description

The CallData object describes the key-value pairs of the call data with the call object.

Parameters

None

Returns

A CallData object.

Click to jump to top of pageClick to jump to parent topicCallData Class Fields

The following are the CallData class fields:

Click to jump to top of pageClick to jump to parent topicani

Description

The ANI caller id.

Type: string.

Click to jump to top of pageClick to jump to parent topiccallId

Description

The call ID.

Type: string.

Click to jump to top of pageClick to jump to parent topiccallType

Description

The call type.

Type: string.

Click to jump to top of pageClick to jump to parent topicdata

Description

The call data.

Type: string.

Click to jump to top of pageClick to jump to parent topicdnis

Description

The DNIS callee ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicCallData Class Method

The following is the CallData class method.

Click to jump to top of pageClick to jump to parent topicaddKeyValue

Syntax

addKeyValue(key), value

Description

Add key value to the CallData object.

Parameters

key

The key.

value

The value.

Returns

None.

Click to jump to top of pageClick to jump to parent topicCallStatistics Class Constructor

The following is the CallStatistics class constructor.

Click to jump to top of pageClick to jump to parent topicCallStatistics

Syntax

CallStatistics()

Description

The call statistics information.

Parameters

None.

Returns

A CallStatistics object.

Click to jump to top of pageClick to jump to parent topicCallStatistics Class Fields

The following are the CallStatistics class fields.

Click to jump to top of pageClick to jump to parent topicdata

Description

An associative array of key-value pairs that includes all statistics.

Type: associative array.

Click to jump to top of pageClick to jump to parent topicholdTime

Description

Duration that the call is on hold.

Type: string.

Click to jump to top of pageClick to jump to parent topicqueueTime

Description

Duration that this call has been in the queue.

Type: string.

Click to jump to top of pageClick to jump to parent topictalkTime

Description

Duration that the call is established.

Type: string.

Click to jump to top of pageClick to jump to parent topicChat Class Constructor

The Chat class extends the Task class.

See Task Class Constructor.

The following is the Chat class constructor.

Click to jump to top of pageClick to jump to parent topicChat

Syntax

Chat(event, address)

Description

The Chat object describes the task information for tasks associated with the ChatAddress.

Parameters

event

The onNotify event.

address

The chat address.

Returns

A Chat object.

Click to jump to top of pageClick to jump to parent topicChat Class Fields

The Chat class inherits the following fields from Task class:

See Task Class Fields.

The following are the additional Chat class fields.

Click to jump to top of pageClick to jump to parent topicaddress

Description

The address containing the agent-to-agent chat.

Type: A2AChatAddress object.

See Also

A2AChatAddress Class Constructor

Click to jump to top of pageClick to jump to parent topicagentId

Description

The agent's ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicappData

Description

The application data that is provided to the client with the notification event.

Type: AppData object.

See Also

AppData Class Constructor

Click to jump to top of pageClick to jump to parent topiccustomerName

Description

The customer username.

Type: string.

Click to jump to top of pageClick to jump to parent topicgroupId

Description

The group ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicquestion

Description

The question for this chat.

Type: string.

Click to jump to top of pageClick to jump to parent topicsubject

Description

The subject of the chat.

Type: string.

Click to jump to top of pageClick to jump to parent topicChat Class Method

The Chat class extends the Task class.

See Task Class Constructor.

The following is the Chat class method.

Click to jump to top of pageClick to jump to parent topicgetUrl

Syntax

getUrl(defaultUrl)

Description

Returns the URL for the given Task

Parameters

defaultUrl

The default URL for this chat. If not null this value will override the generated base URL.

Returns

Returns the URL for the chat.

Click to jump to top of pageClick to jump to parent topicChatAddress Class Constructor

The ChatAddress class extends the _UQAddress class.

See _UQAddress Class Constructor.

The following is the ChatAddress class constructor.

Click to jump to top of pageClick to jump to parent topicChatAddress

Syntax

ChatAddress()

Description

Handles the creation of customer chat tasks.

Parameters

None.

Returns

A ChatAddress object.

Click to jump to top of pageClick to jump to parent topicChatAddress Class Fields

The ChatAddress class inherits the following fields from the _Address class:

See _Address Class Fields.

The ChatAddress class inherits the following field from the _UQAddress class:

tasks

See _UQAddress Class Fields.

Click to jump to top of pageClick to jump to parent topicChatAddress Class Methods

The ChatAddress class inherits the following methods from the _UQAddress class:

See _UQAddress Methods.

Click to jump to top of pageClick to jump to parent topicChatAddress Callback Event Methods

The ChatAddress class inherits the onError callback event method from the _Address class.

See _Address Class Callback Event Method.

The ChatAddress class inherits the following callback event methods from the _UQAddress class:

See _UQAddress Class Fields.

Click to jump to top of pageClick to jump to parent topicEmail Class Constructor

The Email class extends the Task class.

See Task Class Constructor.

The following is the email class constructor.

Click to jump to top of pageClick to jump to parent topicEmail

Syntax

Email(event)

Description

The Email object describes the task information for tasks associated with the EmailAddress.

Parameters

event

The notification event.

Returns

Returns an Email object.

Click to jump to top of pageClick to jump to parent topicEmail Class Fields

The Chat class inherits the following fields from Task class:

See Task Class Fields.

The following are the additional Email class fields:

Click to jump to top of pageClick to jump to parent topicagentId

Description

The agent's ID.

Click to jump to top of pageClick to jump to parent topicappData

Description

The application data that is provided to the client with the notification event.

Type: AppData object.

See Also

Task Class Fields

Click to jump to top of pageClick to jump to parent topicEmail Class Method

The following is the Email class method.

Click to jump to top of pageClick to jump to parent topicgetUrl

Syntax

getURL(defaultUrl)

Description

Returns the URL for the given task.

Parameters

defaultUrl

If not null this value will override the generated base URL.

Returns

The URL associated with this task.

Click to jump to top of pageClick to jump to parent topicEmailAddress Class Constructor

The EmailAddress class extends the _UQAddress class.

See _UQAddress Class Constructor.

The following is the EmailAddress class constructor.

Click to jump to top of pageClick to jump to parent topicEmailAddress

Syntax

EmailAddress()

Description

Handles the creation of email tasks.

Parameters

None.

Returns

An EmailAddress object.

Click to jump to top of pageClick to jump to parent topicEmailAddress Class Fields

The EmailAddress class inherits the following fields from the _Address class:

See _Address Class Fields.

The EmailAddress class inherits the tasks field from the _UQAddress class.

See _UQAddress Class Fields.

Click to jump to top of pageClick to jump to parent topicEmailAddress Class Methods

The EmailAddress class inherits the following fields from the _UQAddress class:

See _UQAddress Methods.

Click to jump to top of pageClick to jump to parent topicEmailAddress Callback Event Methods

The EmailAddress class inherits the onError callback event method from the _Address class.

See _Address Class Callback Event Method.

The EmailAddress class inherits the following callback event methods from the _UQAddress class:

See _UQAddress Class Callback Event Methods.

Click to jump to top of pageClick to jump to parent topicExtension Class Constructor

The Extension class extends the _Address class.

See _Address Class Constructor.

The following is the Extension class constructor.

Click to jump to top of pageClick to jump to parent topicExtension

Syntax

Extension(numOfLines)

Description

The Extension object describes the CTI address.

Parameters

numOfLines

Specify the number of lines for this extension.

Returns

An Extension object.

Click to jump to top of pageClick to jump to parent topicExtension Class Fields

The Extension class inherits the following fields from the _Address class:

See _Address Class Fields.

The following are the Extension class fields.

Click to jump to top of pageClick to jump to parent topicforwardMode

Description

The forward mode of the extension.

Type: forwardMode object.

See Also

ForwardMode Class Constructor

Click to jump to top of pageClick to jump to parent topicisDnd

Description

Flag for Do Not Disturb.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiclines

Description

An associative array of line objects.

Type: associative array.

Click to jump to top of pageClick to jump to parent topicnumOfLines

Description

The number of lines for this extension.

Type: number.

Click to jump to top of pageClick to jump to parent topicExtension Class Methods

The Extension class inherits the onError method from the Address class.

The following are the Extension class methods.

Click to jump to top of pageClick to jump to parent topiccancelDnd

Syntax

cancelDnd(reason)

Description

Cancel the DND (do not disturb).

Parameters

reason

The reason for DND cancellation.

Returns

None.

Click to jump to top of pageClick to jump to parent topiccancelForwardSet

Syntax

cancelForwardSet(reason)

Description

Cancel the forward.

Parameters

reason

The reason for cancelling the forward.

Returns

None.

Click to jump to top of pageClick to jump to parent topicforwardSet

Syntax

forwardSet(number, mode, reason)

Description

Forward the call to another number/extension.

Parameters

mode

The forward mode.

number

The number to which all calls will be forwarded.

reason

The reason to forward.

Returns

None.

Click to jump to top of pageClick to jump to parent topicgetDialingLine

Syntax

getDialingLine()

Description

Get the dialing line object.

Parameters

None

Returns

Returns a line object. Null if there is no dialing line.

See Also

Line Class Constructor

Click to jump to top of pageClick to jump to parent topicgetFreeLine

Syntax

getFreeLine()

Description

Get the free line object. A line is free if there is no activity on this line.

Parameters

None

Returns

Returns a line object. Null if there is no free line.

Click to jump to top of pageClick to jump to parent topicgetLineByConnectionId

Syntax

getLineByConnectionId(connectionID)

Description

Get the line object with the call.

Parameters

connectionId

The connection ID associated with a call.

Returns

Returns a Line object. Null if there is no line with that call.

See Also

Line Class Constructor

Click to jump to top of pageClick to jump to parent topicgetOffHookLine

Syntax

getOffHookLine()

Description

Get the offhook line object.

Parameters

None.

Returns

Returns a Line object. Null if there is no offhook line.

See Also

Line Class Constructor

Click to jump to top of pageClick to jump to parent topicsetDnd

Syntax

setDnd(event)

Description

Fires when setting DND (do not disturb).

Parameters

event

The event object.

Returns

None.

Click to jump to top of pageClick to jump to parent topicExtension Class Callback Event Methods

The following are the Extension class callback event methods.

Click to jump to top of pageClick to jump to parent topiconCancelingDnd

Syntax

onCancelingDnd(event)

Description

Fires when canceling DND (do not disturb).

Click to jump to top of pageClick to jump to parent topiconCancelingForward

Syntax

onCancelingForward(event)

Description

Fires when canceling forward.

Click to jump to top of pageClick to jump to parent topiconDnd

Syntax

onDnd(event)

Description

Fires when DND is selected.

Click to jump to top of pageClick to jump to parent topiconForwardCanceled

Syntax

onForwardCanceled(event)

Description

Fires on cancellation of forwarding.

Click to jump to top of pageClick to jump to parent topiconForwarded

Syntax

onForwarded(event)

Description

Fires when the extension is forwarded.

Click to jump to top of pageClick to jump to parent topiconForwarding

Syntax

onForwarding(event)

Description

Fires when forwarding.

Click to jump to top of pageClick to jump to parent topiconSettingDnd

Syntax

onSettingDnd(event)

Description

Fires when setting DND (do not disturb).

Click to jump to top of pageClick to jump to parent topicExtensionCaps Class Constructor

The following is the Extension class constructor.

Click to jump to top of pageClick to jump to parent topicExtensionCaps

Syntax

ExtensionCaps(strCaps)

Description

Describes the extension's capabilities.

Parameters

strCaps

A string comprising the extension's capabilities

Returns

An ExtensionCaps object.

Click to jump to top of pageClick to jump to parent topicExtensionCaps Class Fields

The following are the Extension class fields.

Click to jump to top of pageClick to jump to parent topiccanCancelDnd

Description

This extension can cancel DND (do not disturb).

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanDial

Description

This extension can dial out.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanFwdBusy

Description

This extension can forward calls if busy.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanFwdBusyNoAnswer

Description

This extension can forward calls if busy/no answer.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanFwdCancelForward

Description

This extension can cancel forward.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanFwdDefault

Description

This extension can forward.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanFwdNoAnswer

Description

This extension can forward if no answer.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanFwdUnconditional

Description

This extension can forward unconditionally.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanRefreshState

Description

This extension can refresh state.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanSetDnd

Description

This extension can set DND (do not disturb).

Type: boolean.

Click to jump to top of pageClick to jump to parent topicForwardMode Class Constructor

The following is the ForwardMode class constructor.

Click to jump to top of pageClick to jump to parent topicForwardMode

Syntax

ForwardMode()

Description

Describes various forward modes that can be used while setting the forwarding mode for an Address.

Parameters

None.

Returns

A ForwardMode object.

Click to jump to top of pageClick to jump to parent topicForwardMode Class Field

The following is the ForwardMode class field.

Click to jump to top of pageClick to jump to parent topicmode

Description

The current forwarding mode.

Type: string of the following constants.

Value

Description

BUSY

The BUSY forwarding mode.

BUSYNOANSWER

The BUSYNOANSWER forwarding mode.

DEFAULT

The DEFAULT forwarding mode.

NOANSWER

The NOANSWER forwarding mode.

NONE

No forwarding mode.

UNCONDITIONAL

The UNCONDITIONAL forwarding mode.

Click to jump to top of pageClick to jump to parent topicGenericAddress Class Constructor

The GenericAddress class extends the _UQAddress class.

The following is the GenericAddress class constructor.

Click to jump to top of pageClick to jump to parent topicGenericAddress

Syntax

GenericAddress()

Description

Handles the creation of generic tasks.

Parameters

None.

Returns

A GenericAddress object.

Click to jump to top of pageClick to jump to parent topicGenericAddress Class Fields

The GenericAddress class inherits the following fields from the _Address class.

See _Address Class Fields.

The GenericAddress class inherits the tasks field from the _UQAddress class.

See _UQAddress Class Fields.

Click to jump to top of pageClick to jump to parent topicGenericAddress Class Methods

The GenericAddress class inherits the following methods from the _UQAddress class:

See _UQAddress Methods.

Click to jump to top of pageClick to jump to parent topicGenericAddress Class Callback Event Methods

The GenericAddress class inherits the onError callback event method from the _Address class.

See _Address Class Callback Event Method.

The GenericAddress class inherits the following callback event methods from the _UQAddress class:

See _UQAddress Class Callback Event Methods.

Click to jump to top of pageClick to jump to parent topicGenericTask Class Constructor

The GenericTask class extends the Task class.

The following is the GenericTask class constructor

Click to jump to top of pageClick to jump to parent topicGenericTask

Syntax

GenericTask(event)

Description

The GenericTask object describes the generic task information for tasks associated with the GenericAddress object.

Parameters

event

The triggering event.

Returns

A GenericTask object.

Click to jump to top of pageClick to jump to parent topicGenericTask Class Fields

The GenericTask class inherits the following fields from the Task class:

See Task Class Fields.

The following are the additional GenericTask class fields.

Click to jump to top of pageClick to jump to parent topicagentId

Description

The agent's ID.

Returns a string.

Click to jump to top of pageClick to jump to parent topicappData

Description

The application data that is provided to the client with the notification event.

Type: AppData object.

See Also

AppData Class Constructor

Click to jump to top of pageClick to jump to parent topiccustomerName

Description

The customer username.

Type: string.

Click to jump to top of pageClick to jump to parent topicgroupId

Description

The group ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicquestion

Description

The question for this generic task.

Type: string.

Click to jump to top of pageClick to jump to parent topicsubject

Description

The subject of the generic task.

Type: string.

Click to jump to top of pageClick to jump to parent topicGenericTask Class Method

The following is the GenericTask class method.

Click to jump to top of pageClick to jump to parent topicgetUrl

Syntax

getUrl(defaultUrl)

Description

Returns the URL for the given task.

Parameters

If not null, this value will override the generated base URL.

Returns

Returns the URL for the given task.

Click to jump to top of pageClick to jump to parent topicGLOBALS Class Fields

The following are global fields, which may be accessed without instantiating an object. They are accessed as shown.

Click to jump to top of pageClick to jump to parent topicA2AChat.PS_JR

Description

The Journal Routing constant.

Example

A2AChat.PS_JR = "ps_jr";

Click to jump to top of pageClick to jump to parent topicA2AChat.TYPE_ANSWER

Description

The constant representing an A2AChat type of answer.

This type is generated when a different user wants this user to answer an A2AChat.

Example

A2AChat.TYPE_ANSWER = "answer";

Click to jump to top of pageClick to jump to parent topicA2AChat.TYPE_CONSULT

Description

The constant representing an A2AChat type of consult.

This type is generated when this user wants to consult a different user.

Example

A2AChat.TYPE_CONSULT = "consult";

Click to jump to top of pageClick to jump to parent topicServer.TYPE_CTI

Description

The constant representing a CTI server.

Example

Server.TYPE_CTI = "CTI";

Click to jump to top of pageClick to jump to parent topicServer.TYPE_UQ

Description

The UQ server type.

Example

Server.TYPE_UQ = "UQ";

Click to jump to top of pageClick to jump to parent topicTask.TYPE_A2ACHAT

Description

The constant representing an A2AChat.

Example

Task.TYPE_A2ACHAT = "A2ACHAT";

Click to jump to top of pageClick to jump to parent topicTask.TYPE_CHAT

Description

The constant representing a chat task.

Example

Task.TYPE_CHAT = "CHAT";

Click to jump to top of pageClick to jump to parent topicTask.TYPE_CTI

Description

The constant representing a CTI task.

Example

Task.TYPE_CTI = "CTI";

Click to jump to top of pageClick to jump to parent topicTask.TYPE_EMAIL

Description

The constant representing an email task

Example

Task.TYPE_EMAIL = "EMAIL";

Click to jump to top of pageClick to jump to parent topicTask.TYPE_GENERIC

Description

The constant representing a generic task

Example

Task.TYPE_GENERIC = "GENERIC";

Click to jump to top of pageClick to jump to parent topicGLOBALS Class Methods

The following are the GLOBALS class methods.

Click to jump to top of pageClick to jump to parent topicGLOBALS class methods

Syntax

initJSMCAPI()

Description

The initialization function of the JSMCAPI. This is the first function should be called by application.

Parameters

None.

Returns

None. Initializes JSMCAPI.

Click to jump to top of pageClick to jump to parent topicisValid

Syntax

isValid(obj)

Description

Obj can be any JavaScript object or literal. This method is a convenience method to check that an object is both not null and not undefined.

Parameters

obj

Obj can be any JavaScript object or literal.

Returns

Returns a boolean.

Returns true if an object is not undefined and not null.

Click to jump to top of pageClick to jump to parent topicGroup Class Constructor

The following is the Group class constructor.

Click to jump to top of pageClick to jump to parent topicGroup

Syntax

Group()

Description

The Group object describes the group information.

Parameters

None.

Returns

A Group object.

Click to jump to top of pageClick to jump to parent topicGroup Class Fields

The following are the Group class fields.

Click to jump to top of pageClick to jump to parent topicid

Description

The group ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicname

Description

The group name.

Type: string.

Click to jump to top of pageClick to jump to parent topicregistered

Description

True if the Group is registered on the server.

Type: boolean.

Click to jump to top of pageClick to jump to parent topicstatistics

Description

The group statistics for CTI.

Type: GroupStatistics object

See Also

GroupStatistics1 Class Constructor

Click to jump to top of pageClick to jump to parent topicstatistics1

Description

The group statistics for UQ server.

Type: GroupStatistics1 object.

See Also

GroupStatistics1 Class Constructor

Click to jump to top of pageClick to jump to parent topicstatistics2

Description

The group statistics for UQ server.

Type: GroupStatistics2 object.

See Also

GroupStatistics2 Class Constructor

Click to jump to top of pageClick to jump to parent topicGroup Class Callback Event Methods

The following are the Group class callback event methods.

Click to jump to top of pageClick to jump to parent topiconStat

Syntax

onStat(event)

Description

Fires when there is new statistics going to this group.

Click to jump to top of pageClick to jump to parent topiconStat1

Syntax

onStat1(event)

Description

Fires when statistics1 is received.

Click to jump to top of pageClick to jump to parent topiconStat2

Syntax

onStat2(event)

Description

Fires when statistics2 is received.

Click to jump to top of pageClick to jump to parent topiconTaskAdded

Syntax

onTaskAdded(event)

Description

Fires when there is task added to this group.

Click to jump to top of pageClick to jump to parent topiconTaskRemoved

Syntax

onTaskRemoved(event)

Description

Fires when a task is removed from this group.

Click to jump to top of pageClick to jump to parent topicGroupStatistics Constructor

The following is the GroupStatistics class constructor.

Click to jump to top of pageClick to jump to parent topicGroupStatistics

Syntax

GroupStatistics()

Description

The group statistics information.

Parameters

None.

Returns

A GroupStatistics object.

Click to jump to top of pageClick to jump to parent topicGroupStatistics Fields

The following are the GroupStatistics class fields.

Click to jump to top of pageClick to jump to parent topicdata

Description

Key value pairs that include all statistics.

Click to jump to top of pageClick to jump to parent topicnumberOfAbandoned

Description

Number of tasks that are abandoned.

Click to jump to top of pageClick to jump to parent topicnumberOfLoggedIn

Description

Number of agents that are logged in the queue.

Click to jump to top of pageClick to jump to parent topicnumberOfQueued

Description

Number of tasks that are queued.

Click to jump to top of pageClick to jump to parent topicqueuedWaitTime

Description

The average wait time, in seconds, of a queued task.

Click to jump to top of pageClick to jump to parent topicrelativeQueueLoad

Description

Relative queue load.

Click to jump to top of pageClick to jump to parent topicGroupStatistics1 Class Constructor

The following is the GroupStatistics1 class constructor.

Click to jump to top of pageClick to jump to parent topicGroupStatistics1

Syntax

GroupStatistics1(data)

Description

UQ Group statistics sent on group refresh 1.

Parameters

data

Statistical data from the UQ server.

Returns

A GroupStatistics1 object.

Click to jump to top of pageClick to jump to parent topicGroupStatistics1 Class Fields

The following are the GroupStatistics1 class fields.

Click to jump to top of pageClick to jump to parent topicmostRecentTaskDone

Description

The most recently done task in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicmostRecentTaskDoneData

Description

The data for the most recent task done.

Type: string.

Click to jump to top of pageClick to jump to parent topicmostRecentTaskEnqueued

Description

The most recently enqueued task in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicmostRecentTaskEnqueuedData

Description

The data for the most recently enqueued task.

Type: string.

Click to jump to top of pageClick to jump to parent topicnumAgentsAvailable

Description

Number of agents available in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicnumAgentsLoggedIn

Description

Number of agents logged in on the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicnumEscalation

Description

Number of escalated tasks in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicnumOverflow

Description

Number of overflowed tasks in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicnumTaskAccepted

Description

Number of tasks accepted in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicnumTaskDone

Description

Number of tasks done in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicnumTaskQueued

Description

Number of tasks queued in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicreasonFlag

Description

The reason flag for this GroupStatistics event.

Type: string.

Click to jump to top of pageClick to jump to parent topictaskTotalTimeInSystem

Description

The total time in the system.

Type: string.

Click to jump to top of pageClick to jump to parent topictimeSinceStart

Description

The time since start.

Type: string.

Click to jump to top of pageClick to jump to parent topicGroupStatistics2 Class Constructor

The following is the GroupStatistics2 class constructor.

Click to jump to top of pageClick to jump to parent topicGroupStatistics2

Syntax

GroupStatistics2(data)

Description

UQ Group statistics sent on group refresh 2.

Parameters

data

UQ server statistical data.

Returns

A GroupStatistics2 object.

Click to jump to top of pageClick to jump to parent topicGroupStatistics2 Class Fields

The following are the GroupStatistics2 class fields.

Click to jump to top of pageClick to jump to parent topicaverageTaskDuration

Description

The average task duration in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicaverageWaitTime

Description

The average wait time in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicoldestTask

Description

The oldest task in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topicrecentTask

Description

The most recent task in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topictimeElapsedOldestTask

Description

The time elapsed for the oldest task in the group.

Type: string.

Click to jump to top of pageClick to jump to parent topictimeElapsedRecentTask

Description

The time elapsed for the most recent task in the group.

Click to jump to top of pageClick to jump to parent topicLine Class Constructor

The following is the Line class constructor.

Click to jump to top of pageClick to jump to parent topicLine

Syntax

Line()

Description

The Line object describes the line of the extension. JSMCAPI only supports one extension with two lines and two extensions with one line in each.

Parameters

None.

Returns

A Line object.

Click to jump to top of pageClick to jump to parent topicLine Class Fields

The following are the Line class fields.

Click to jump to top of pageClick to jump to parent topiccall

Description

The Call object on the line.

Type: Call object.

See Also

Call Class Constructor

Click to jump to top of pageClick to jump to parent topiccaps

Description

The capabilities of the line.

Type: LineCaps object.

See Also

LineCaps Class Constructor

Click to jump to top of pageClick to jump to parent topicconnectionid

Description

The call connection ID on the line.

Type: string.

Click to jump to top of pageClick to jump to parent topicid

Description

The line ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicstate

Description

The line state.

Type: string with the following constants:

Value

Description

ST_DIALING

The dialing state.

ST_DROPPED

The dropped state.

ST_HELD

The held state.

ST_IDLE

The idle state.

ST_OFFHOOK

The offhook state.

ST_RINGING

The ringing state.

ST_TALKING

The talking state.

Click to jump to top of pageClick to jump to parent topicLine Class Methods

The following are the Line class methods.

Click to jump to top of pageClick to jump to parent topicalternate

Syntax

alternate(reason)

Description

Alternate a call.

Parameters

reason

The reason to alternate a call.

Returns

None.

Click to jump to top of pageClick to jump to parent topicanswer

Syntax

answer(reason)

Description

Answer a call.

Parameters

reason

The reason to answer a call.

Returns

None.

Click to jump to top of pageClick to jump to parent topicattachUserData

Syntax

attachUserDate(userdata, reason)

Description

Attach user data to a call.

Parameters

userdata

The user data to attach to the call.

reason

The reason to attach the user data.

Returns

None.

Click to jump to top of pageClick to jump to parent topicclear

Syntax

clear(reason)

Description

Clear a conference call.

Parameters

reason

The reason to clear the conference.

Returns

None.

Click to jump to top of pageClick to jump to parent topiccomplete

Syntax

complete(reason)

Description

Complete the two-step transfer/conference.

Parameters

reason

The reason to complete the two-step transfer/conference.

Returns

None.

Click to jump to top of pageClick to jump to parent topicconference

Syntax

conference(destination, reason, userdata, calldata)

Description

Conference a call.

Parameters

destination

The destination being invited into the conference.

reason

The reason to conference.

userdata

The user data to be attached.

calldata

The call data to be modified.

Returns

None.

Click to jump to top of pageClick to jump to parent topicconferenceSingle

Syntax

conferenceSingle(destination, reason, userdata, calldata)

Description

Single-step conference a call.

Parameters

destination

The destination being invited into the conference.

reason

The reason to conference.

userdata

The user data to be attached.

calldata

The call data to be modified.

Returns

None.

Click to jump to top of pageClick to jump to parent topicdial

Syntax

dial(number, reason, userdata)

Description

Dial out.

Parameters

destination

The destination being invited into the conference.

reason

The reason to conference.

userdata

The user data to be attached.

Returns

None.

Click to jump to top of pageClick to jump to parent topicdropParty

Syntax

dropParty(destination, reason)

Description

Drop a party in conference.

Parameters

destination

The destination being dropped from the conference.

reason

The reason to drop the party.

Returns

None.

Click to jump to top of pageClick to jump to parent topicgetAni

Syntax

getAni()

Description

Get the ANI.

Parameters

None.

Returns

Returns a string representing the ANI.

Click to jump to top of pageClick to jump to parent topicgetDescr

Syntax

getDescr()

Description

Get the description attached to the call on the line.

Parameters

None.

Returns

Returns a string.

Click to jump to top of pageClick to jump to parent topicgetDnis

Syntax

getDnis()

Description

Get the DNIS.

Parameters

None.

Returns

Returns a string.

Click to jump to top of pageClick to jump to parent topicgetReferenceId

Syntax

getReferenceId()

Description

Get the reference ID attached to the call on the line.

Parameters

None.

Returns

Returns a string.

Click to jump to top of pageClick to jump to parent topicgetUrl

Syntax

getUrl(defaultUrl)

Description

Get the URL for screen popup.

Parameters

defaultUrl

The default popup URL.

Returns

Returns a string.

Click to jump to top of pageClick to jump to parent topicgrabCall

Syntax

grabCall(destination, reason)

Description

Grab a call from the queue.

Parameters

destination

The destination to be grabbed.

reason

The reason for the grab.

Returns

None.

Click to jump to top of pageClick to jump to parent topichold

Syntax

hold(reason)

Description

Hold a call.

Parameters

reason

The reason to hold the call.

Returns

None.

Click to jump to top of pageClick to jump to parent topicpark

Syntax

park(destination, reason)

Description

Park a call.

Parameters

destination

The destination on which the call will be parked.

reason

The reason to park the call.

Returns

None.

Click to jump to top of pageClick to jump to parent topicreconnect

Syntax

reconnect(reason)

Description

Reconnect to the original party during two-step transfer/conference.

Parameters

reason

The reason to reconnect.

Returns

None.

Click to jump to top of pageClick to jump to parent topicrelease

Syntax

release(reason)

Description

Release a call.

Parameters

reason

The reason to release the call.

Returns

None.

Click to jump to top of pageClick to jump to parent topicretrieve

Syntax

retrieve(reason)

Description

Retrieve a held call.

Parameters

reason

The reason to retrieve the call.

Returns

None.

Click to jump to top of pageClick to jump to parent topictransfer

Syntax

transfer(destination, reason, userdata, calldata)

Description

Transfer a call.

Parameters

destination

The destination to which the call will be transferred.

reason

The reason to transfer.

userdata

The user data to be attached.

calldata

The call data to be modified.

Returns

None.

Click to jump to top of pageClick to jump to parent topictransferMute

Syntax

transferMute(destination, reason, userdata, calldata)

Description

Transfer mute a call.

Parameters

destination

The destination to which the call will be transferred.

reason

The reason to transfer.

userdata

The user data to be attached.

calldata

The call data to be modified.

Returns

None.

Click to jump to top of pageClick to jump to parent topicupdateCallData

Syntax

updateCallData(calldata, reason)

Description

Update call data to a call.

Parameters

calldata

The call data to update.

reason

The reason to update.

Returns

None.

Click to jump to top of pageClick to jump to parent topicLine Class Callback Event Methods

The following are the Line class callback event methods.

Click to jump to top of pageClick to jump to parent topiconAlternating

Syntax

onAlternating(event)

Description

Fires when alternating the call.

Click to jump to top of pageClick to jump to parent topiconAnswering

Syntax

onAnswering(event)

Description

Fires when answering the call.

Click to jump to top of pageClick to jump to parent topiconAttachingUD

Syntax

onAttachingUD(event)

Description

Fires when attaching user data.

Click to jump to top of pageClick to jump to parent topiconCallDataChanged

Syntax

onCallDataChanged(event)

Description

Fires when the call data on the call is changed.

Click to jump to top of pageClick to jump to parent topiconCapabilitiesChanged

Syntax

onCapabilitiesChanged(event)

Description

Fires when the capabilities changed.

Click to jump to top of pageClick to jump to parent topiconClearing

Syntax

onClearing(event)

Description

Fires when clearing the conference.

Click to jump to top of pageClick to jump to parent topiconCompleting

Syntax

onCompleting(event)

Description

Fires when completing the two-step transfer/conference.

Click to jump to top of pageClick to jump to parent topiconConferencing

Syntax

onConferencing(event)

Description

Fires when conferencing the call.

Click to jump to top of pageClick to jump to parent topiconDialing

Syntax

onDialing(event)

Description

Fires when there is an outgoing call.

Click to jump to top of pageClick to jump to parent topiconDropped

Syntax

onDropped(event)

Description

Fires when the call is released.

Click to jump to top of pageClick to jump to parent topiconError

Syntax

onError(event)

Description

Fires when there is error.

Click to jump to top of pageClick to jump to parent topiconGrabbing

Syntax

onGrabbing(event)

Description

Fires when grabbing a call from a queue.

Click to jump to top of pageClick to jump to parent topiconHeld

Syntax

onHeld(event)

Description

Fires when the call is on hold.

Click to jump to top of pageClick to jump to parent topiconHolding

Syntax

onHolding(event)

Description

Fires when holding the call.

Click to jump to top of pageClick to jump to parent topiconOffHook

Syntax

onOffHook(event)

Description

Fires when the line is off hook.

Click to jump to top of pageClick to jump to parent topiconOnHook

Syntax

onOnHook(event)

Description

Fires when the line is on hook.

Click to jump to top of pageClick to jump to parent topiconParking

Syntax

onParking(event)

Description

Fires when parking the call.

Click to jump to top of pageClick to jump to parent topiconPartyAdded

Syntax

onPartyAdded(event)

Description

Fires when a new call party coming.

Click to jump to top of pageClick to jump to parent topiconPartyChanged

Syntax

onPartyChanged(event)

Description

Fires when the call party has changed.

Click to jump to top of pageClick to jump to parent topiconPartyRemoved

Syntax

onPartyRemoved(event)

Description

Fires when a call party is removed.

Click to jump to top of pageClick to jump to parent topiconReconnecting

Syntax

onReconnecting(event)

Description

Fires when reconnecting the call.

Click to jump to top of pageClick to jump to parent topiconReleasing

Syntax

onReleasing(event)

Description

Fires when releasing the call.

Click to jump to top of pageClick to jump to parent topiconRetrieving

Syntax

onRetrieving(event)

Description

Fires when retrieving the call.

Click to jump to top of pageClick to jump to parent topiconRinging

Syntax

onRinging(event)

Description

Fires when there is an incoming call.

Click to jump to top of pageClick to jump to parent topiconTalking

Syntax

onTalking(event)

Description

Fires when the call is established.

Click to jump to top of pageClick to jump to parent topiconTransfering

Syntax

onTransfering(event)

Description

Fires when transferring the call.

Click to jump to top of pageClick to jump to parent topiconUpdatingCD

Syntax

onUpdatingCD(event)

Description

Fires when updating the call data.

Click to jump to top of pageClick to jump to parent topiconUserDataChanged

Syntax

onUserDataChanged(event)

Description

Fires when the user data attached on the call is changed.

Click to jump to top of pageClick to jump to parent topicLineCaps Class Constructor

The following is the LineCaps class constructor.

Click to jump to top of pageClick to jump to parent topicLineCaps

Syntax

LineCaps(strCaps)

Description

Describes the line's capabilities.

Parameters

strCaps

The line's capabilities.

Returns

A LineCaps object.

Click to jump to top of pageClick to jump to parent topicLineCaps Class Fields

The following are the LineCaps class fields.

Click to jump to top of pageClick to jump to parent topiccanAlternate

Description

The line has alternate capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanAnswer

Description

The line has answer capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanAttachUserDate

Description

The line has attach user data capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanClear

Description

The line has clear capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanComplete

Description

The line has complete capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanConference

Description

The line has conference capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanConferenceSingle

Description

The line has conference single capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanDropParty

Description

The line has drop party capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanHold

Description

The line has hold capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanPark

Description

The line has park capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanReconnect

Description

The line has reconnect capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanRelease

Description

The line has release capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanRetrieve

Description

The line has retrieve capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanTransfer

Description

The line has transfer capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanTransferMute

Description

The line has transfer mute capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanUpdateCallData

Description

The line has update call data capability.

Type: boolean.

Click to jump to top of pageClick to jump to parent topicMCEvent Class Constructor

The following is the MCEvent class constructor.

Click to jump to top of pageClick to jump to parent topicMCEvent

Syntax

MCEvent()

Description

The MCEvent will be passed to the application event handler.

Parameters

None

Returns

An MCEvent object.

Click to jump to top of pageClick to jump to parent topicMCEvent Class Fields

The following are the MCEvent class fields.

Click to jump to top of pageClick to jump to parent topicextension

Description

The extension associated with the event.

Type: Extension object.

See Also

Extension Class Constructor

Click to jump to top of pageClick to jump to parent topicgroup

Description

The group associated with the event.

Type: Group object.

See Also

Group Class Constructor

Click to jump to top of pageClick to jump to parent topicreason

Description

The reason associated with the event.

Type: Reason object.

See Also

Reason Class Constructor

Click to jump to top of pageClick to jump to parent topicuser

Description

The user associated with the event.

Type: User object.

See Also

User Class Constructor

Click to jump to top of pageClick to jump to parent topicMediaType Class Constructor

The following is the MediaType class constructor.

Click to jump to top of pageClick to jump to parent topicMediaType

Syntax

MediaType()

Description

Distinguishes between email and CTI media types.

Parameters

None.

Returns

A MediaType object.

Click to jump to top of pageClick to jump to parent topicMediaType Class Field

The following is the MediaType field.

Click to jump to top of pageClick to jump to parent topictype

Description

The media type.

Type: string with the following constants:

Value

Description

MT_EMAIL

The email media type.

MT_VOICE

The voice media type (CTI).

Click to jump to top of pageClick to jump to parent topicPSMC Class Constructor

The following is the PSMC class constructor.

Click to jump to top of pageClick to jump to parent topicPSMC

Syntax

PSMC()

Description

The global object that the application can access.

Parameters

None.

Returns

A PSMC object.

 

Click to jump to top of pageClick to jump to parent topicPSMC Class Fields

The following are the PSMC class fields.

Click to jump to top of pageClick to jump to parent topicrenserver

Description

The PSMC instance of the RenServer object.

Type: RenServer object.

See Also

RenServer Class Constructor

Click to jump to top of pageClick to jump to parent topicservers

Description

An associative array the different Servers objects, indexed by server ID.

Type: associative array.

See Also

Server Class Constructor

Click to jump to top of pageClick to jump to parent topicsessions

Description

An associative array that holds the different Session objects, indexed by server ID.

Type: associative array.

See Also

Session Class Constructor

Click to jump to top of pageClick to jump to parent topicPSMC Class Methods

The following are the PSMC class methods.

Click to jump to top of pageClick to jump to parent topiccloseSession

Syntax

closeSession(id)

Description

Closes the specified Session and Server object and deletes them.

Parameters

id

The ID of the REN server cluster for a UQ server, or the server ID for a CTI server.

Returns

None.

Click to jump to top of pageClick to jump to parent topicgetCallById

Syntax

getCallById(id)

Description

Retrieve the call object by the call ID.

Parameters

id

The call ID.

Returns

Type: Call object.

See Also

Call Class Constructor

Click to jump to top of pageClick to jump to parent topicgetLineById

Syntax

getLineById(id)

Description

Retrieve the line object by the line ID.

Parameters

id

The line ID.

Returns

Type: Line object.

See Also

Line Class Constructor

Click to jump to top of pageClick to jump to parent topicopenSession

Syntax

openSession(id)

Description

Creates the Session and Server objects for the PSMC.

Parameters

id

The ID of the REN server cluster for a UQ server, or the server ID for a CTI server.

Returns

None.

Click to jump to top of pageClick to jump to parent topicstart

Syntax

start()

Description

Start the JSMCAPI.

Parameters

None.

Returns

None.

Click to jump to top of pageClick to jump to parent topicstop

Syntax

stop()

Description

Stop the JSMCAPI.

Parameters

None.

Returns

None.

Click to jump to top of pageClick to jump to parent topicReason Class Constructor

The following is the Reason class constructor.

Click to jump to top of pageClick to jump to parent topicReason

Syntax

reason(code, desc)

Description

The Reason object carries the reason code and reason description.

Parameters

code

The reason code.

desc

The reason description.

Returns

Type: Reason object.

Click to jump to top of pageClick to jump to parent topicReason Class Fields

The following are the Reason class fields.

Click to jump to top of pageClick to jump to parent topiccode

Description

The reason code.

Type: string.

Click to jump to top of pageClick to jump to parent topicdesc

Description

The reason description.

Type: string.

Click to jump to top of pageClick to jump to parent topicRenServer Class Constructor

The following is the RenServer class constructor.

Click to jump to top of pageClick to jump to parent topicRenServer

Syntax

RenServer()

Description

The RenServer object describes the REN server cluster information.

Parameters

None.

Returns

A RenServer object.

Click to jump to top of pageClick to jump to parent topicRenServer Class Fields

The following are the RenServer class fields.

Click to jump to top of pageClick to jump to parent topicisRunning

Description

Flag containing the state of the REN server connection.

Type: boolean.

Click to jump to top of pageClick to jump to parent topicurl

Description

The REN server URL.

Type: string.

Click to jump to top of pageClick to jump to parent topicRenServer Class Callback Event Methods

The following are the RenServer class callback event methods.

Click to jump to top of pageClick to jump to parent topiconDown

Syntax

onDown(event)

Description

Fires when the REN server is down.

Click to jump to top of pageClick to jump to parent topiconUp

Syntax

onUp(event)

Description

Fires when the REN server is up.

Click to jump to top of pageClick to jump to parent topicServer Class Constructor

The following is the Server class constructor.

Click to jump to top of pageClick to jump to parent topicServer

Syntax

Server(serverId)

Description

The Server object describes the server information.

Parameters

serverId

The ID of the REN server cluster for a UQ server, or the server ID for a CTI server.

Returns

A Server object.

Click to jump to top of pageClick to jump to parent topicServer Class Fields

The following are the Server class fields.

Click to jump to top of pageClick to jump to parent topicid

Description

The server ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicinfo

Description

The server information string.

Type: string.

Click to jump to top of pageClick to jump to parent topicstate

Description

The server state.

Type: string with the following constants.

Value

Description

ST_INSERVICE

The server is in service.

ST_OUTOFSERVICE

The server is out of service.

Click to jump to top of pageClick to jump to parent topictype

Description

The type of server, either CTI or UQ.

Type: string with the following constants.

Value

Description

TYPE_CTI

The server is a CTI server.

TYPE_UQ

The server is a UQ server.

Example

The TYPE_* fields are global fields, which may be accessed without instantiating an object. They are accessed as shown in this example:

Server.TYPE_UQ = "UQ";

See Also

GLOBALS Class Fields

Click to jump to top of pageClick to jump to parent topicServer Class Callback Event Methods

The following are the Server class callback event methods.

Click to jump to top of pageClick to jump to parent topiconBroadcast

Syntax

onBroadcast(event)

Description

Fires when there is broadcast message.

Click to jump to top of pageClick to jump to parent topiconHbLost

Syntax

onHbLost(event)

Description

Fires when the server's heartbeat is lost.

Click to jump to top of pageClick to jump to parent topiconHbRecovered

Syntax

onHbRecovered(event)

Description

Fires when the server's heartbeat is recovered.

Click to jump to top of pageClick to jump to parent topiconInService

Syntax

onInService(event)

Description

Fires when the server changes state to in service.

Click to jump to top of pageClick to jump to parent topiconOutOfService

Syntax

onOutOfService(event)

Description

Fires when the server changes state to out of service.

Click to jump to top of pageClick to jump to parent topiconRestart

Syntax

onRestart(event)

Description

Fires when server restarts.

Click to jump to top of pageClick to jump to parent topicSession Class Constructor

The following is the Session class constructor.

Click to jump to top of pageClick to jump to parent topicSession

Syntax

Session(serverId)

Description

The Session object describes the session with the server.

Parameters

serverId

The ID of the REN server cluster for a UQ server, or the server ID for a CTI server.

Returns

Returns a Session object.

Click to jump to top of pageClick to jump to parent topicSession Class Fields

The following are the Session class fields.

Click to jump to top of pageClick to jump to parent topicaddresses

Description

The associative array of addresses that the session register.

Type: associative array.

Click to jump to top of pageClick to jump to parent topicbuddies

Description

The buddy hash table in this session.

Type: associative array

Click to jump to top of pageClick to jump to parent topicgroups

Description

The group hash table in this session.

Type: associative array.

Click to jump to top of pageClick to jump to parent topicid

Description

The session ID generated by the server.

Type: string.

Click to jump to top of pageClick to jump to parent topicserverId

Description

The serverId will be unique for every session. It is used to lookup the protocol objects.

Type: string.

Click to jump to top of pageClick to jump to parent topicstate

Description

The session state.

Type: string with the following constants.

Value

Description

ST_ACTIVE

The session is in the active state.

ST_CLOSED

The session is in the closed state.

ST_CLOSING

The session is in the closing state.

ST_IDLE

The session is in the idle state.

Click to jump to top of pageClick to jump to parent topicuser

Description

The current user for the session.

Type: User object.

See Also

User Class Constructor

Click to jump to top of pageClick to jump to parent topicSession Class Methods

The following are the Session class methods.

Click to jump to top of pageClick to jump to parent topicclose

Syntax

close()

Description

Close the session with the server.

Parameters

None.

Returns

None.

Click to jump to top of pageClick to jump to parent topicopen

Syntax

open()

Description

Open the session with the server.

Parameters

None.

Returns

None.

Click to jump to top of pageClick to jump to parent topicregisterAddress

Syntax

registerAddress(address)

Description

Register the address to the server so that the server will report all events that occur on this address.

Parameters

address

The address to be registered.

Returns

None.

Click to jump to top of pageClick to jump to parent topicregisterBuddy

Syntax

registerBuddy(buddy)

Description

Register the buddy to the JSMCAPI so that the JSMCAPI will report all state events that occur on this buddy.

Parameters

buddy

The buddy to be registered.

Returns

None.

Click to jump to top of pageClick to jump to parent topicregisterGroup

Syntax

registerGroup(group)

Description

Register the group to the server so that the server will report all events that occur on this group.

Parameters

group

The group to be registered.

Returns

None.

Click to jump to top of pageClick to jump to parent topicregisterUser

Syntax

registerUser(user)

Description

Register the user to the server so that the server will report all those events happened on this user.

Parameters

user

The user to be registered.

Returns

None.

Click to jump to top of pageClick to jump to parent topicstatPublish

Syntax

statPublish(userStat, groupStat)

Description

Sets the Statistics publishing levels for the UQ server.

Parameters

userStat

Either 0, 1, or 2 for UserStatistics publishing.

Specify 0 for no statistics publishing, 1 for Statistics1 publishing, and 2 for Statistics2 and Statistic1 publishing.

groupStat

Either 0, 1, or 2 for GroupStatistics publishing.

Specify 0 for no statistics publishing, 1 for Statistics1 publishing, and 2 for Statistics2 and Statistic1 publishing.

Returns

None.

Click to jump to top of pageClick to jump to parent topicunregisterAddress

Syntax

unRegisterAddress(address)

Description

Unregister the address from the server so that the server will not report any events about this address.

Parameters

address

The address to be unregistered.

Returns

None.

Click to jump to top of pageClick to jump to parent topicunregisterBuddy

Syntax

unregisterBuddy(buddy)

Description

Unregister the buddy from the JSMCAPI so that the JSMCAPI will not report any events about the buddy state change.

Parameters

buddy

The buddy to be unregistered.

Returns

 

Click to jump to top of pageClick to jump to parent topicunregisterGroup

Syntax

unregisterGroup(group)

Description

Unregister the group from the server so that the server will not report any events about this group.

Parameters

group

The group to be unregistered.

Returns

None.

Click to jump to top of pageClick to jump to parent topicunregisterUser

Syntax

unregisterUser(user)

Description

Unregister the user from the server so that the server will not report any events to this user.

Parameters

user

The user to be unregistered.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSession Class Callback Event Methods

The following are the Session class callback event methods.

Click to jump to top of pageClick to jump to parent topiconAddressRegistered

Syntax

onAddressRegistered(event)

Description

Fires when the address is registered by the session.

Click to jump to top of pageClick to jump to parent topiconAddressUnregistered

Syntax

onAddressUnregistered(event)

Description

Fires when the address is unregistered by the session.

Click to jump to top of pageClick to jump to parent topiconBuddyRegistered

Syntax

onBuddyRegistered(event)

Description

Fires when the buddy is registered by the session.

Click to jump to top of pageClick to jump to parent topiconBuddyUnregistered

Syntax

onBuddyUnregistered(event)

Description

Fires when the buddy is unregistered by the session.

Click to jump to top of pageClick to jump to parent topiconClosed

Syntax

onClosed(event)

Description

Fires when the session is closed.

Click to jump to top of pageClick to jump to parent topiconError

Syntax

onError(event)

Description

Fires when there is a session error.

Click to jump to top of pageClick to jump to parent topiconGroupRegistered

Syntax

onGroupRegistered(event)

Description

Fires when a group is registered by the session.

Click to jump to top of pageClick to jump to parent topiconGroupUnregistered

Syntax

onGroupUnregistered(event)

Description

Fires when a group is unregistered by the session.

Click to jump to top of pageClick to jump to parent topiconInfo

Syntax

onInfo(event)

Description

Fires when there is a session information event, such as the user is already logged in.

Click to jump to top of pageClick to jump to parent topiconOpened

Syntax

onOpened(event)

Description

Fires when the session is opened.

Click to jump to top of pageClick to jump to parent topiconUserRegistered

Syntax

onUserRegistered(event)

Description

Fires when the user is registered by the session.

Click to jump to top of pageClick to jump to parent topiconUserUnregistered

Syntax

onUserUnregistered(event)

Description

Fires when the user gets unregistered by the session.

Click to jump to top of pageClick to jump to parent topicTask Class Hierarchy

The Task class can be extended by other subclasses. The following flowchart shows the different subclasses, and how they interrelate.

Task class hierarchy

See Also

Call Class Constructor

Chat Class Constructor

Email Class Constructor

GenericAddress Class Constructor

Click to jump to top of pageClick to jump to parent topicTask Class Constructor

The following is the Task class constructor.

Click to jump to top of pageClick to jump to parent topicTask

Syntax

Task()

Description

Task is an abstract base class.

Parameters

None.

Returns

Type: Task object.

Click to jump to top of pageClick to jump to parent topicTask Class Fields

The following are the Task class fields.

Click to jump to top of pageClick to jump to parent topiccaseid

Description

The associated case ID.

Type: string.

Click to jump to top of pageClick to jump to parent topiccost

Description

The associated cost.

Type: string.

Click to jump to top of pageClick to jump to parent topiccustomerid

Description

The associated customer ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicgroup

Description

The associated group.

Type: string.

Click to jump to top of pageClick to jump to parent topicid

Description

The associated ID.

Type: string.

Click to jump to top of pageClick to jump to parent topiconStat

Description

The associated onStat.

Type: string.

Click to jump to top of pageClick to jump to parent topicpriority

Description

The associated priority.

Type: string.

Click to jump to top of pageClick to jump to parent topictype

Description

The associated type.

Type: string, one of the following:

Value

Description

TYPE_A2ACHAT

The A2AChat type.

TYPE_CHAT

The chat type

TYPE_CTI

The CTI type.

TYPE_EMAIL

The email type.

TYPE_GENERIC

The generic type.

Example

The TYPE_* fields are global fields, which may be accessed without instantiating an object. They are accessed as shown in this example:

Task.TYPE_GENERIC = "GENERIC";

See Also

GLOBALS Class Fields

Click to jump to top of pageClick to jump to parent topicurlAbs

Description

The associated absolute URL.

Type: urlAbs object.

Click to jump to top of pageClick to jump to parent topicurlRel

Description

The associated relative URL.

Type: urlRel object.

Click to jump to top of pageClick to jump to parent topicUser Class Constructor

The User class extends the _User class.

See _User Class Constructor.

The following is the User class constructor.

Click to jump to top of pageClick to jump to parent topicUser

Syntax

User(id, name, agentId, agentPassword)

Description

Describes the user/agent.

Parameters

id

The user ID.

name

The user name.

agentId

The agent ID.

agentPassword

The agent's password.

Returns

A User object.

Click to jump to top of pageClick to jump to parent topicUser Class Fields

The User class inherits the following fields from the _User class:

The following are the User class fields.

Click to jump to top of pageClick to jump to parent topicaddresses

Description

The addresses associated with this agent.

Type: associative array.

Click to jump to top of pageClick to jump to parent topicagentPassword

Description

The password for this agent.

Type: string.

Click to jump to top of pageClick to jump to parent topiclanguage

Description

The language for this agent.

Type: string.

Click to jump to top of pageClick to jump to parent topicregisteredAddresses

Description

The registered addresses for this user.

Type: associative array.

Click to jump to top of pageClick to jump to parent topicUser Class Methods

The following are the User class methods.

Click to jump to top of pageClick to jump to parent topicdisableMedia

Syntax

disableMedia(group, mediaType, extension, reason)

Description

Disable a media channel for an agent on a group/queue.

Parameters

group

The group (queue) on which to disable the specified media type.

mediaType

The media type to disable.

extension

The extension on which to disable the specified media type.

reason

The reason for disabling this media type.

Returns

None.

Click to jump to top of pageClick to jump to parent topicenableMedia

Syntax

enableMedia(group, mediaType, extension, reason)

Description

Enable a media channel for an agent on a group/queue.

Parameters

group

The group (queue) on which to enable the specified media type.

mediaType

The media type to enable.

extension

The extension on which to enable the specified media type.

reason

The reason for enabling this media type.

Returns

None.

Click to jump to top of pageClick to jump to parent topicisMediaEnabled

Syntax

isMediaEnabled(mediaType, group)

Description

Determines if the specified media type is enabled.

Parameters

mediaType

Specify the media type.

group

Specify the group.

Returns

Returns true if the media type is enabled.

Click to jump to top of pageClick to jump to parent topiclogin

Syntax

login(group, extension, reason)

Description

Log the user in to a queue.

Parameters

group

The group to which the user will log in.

extension

The extension.

reason

The reason for the login.

Returns

None.

Click to jump to top of pageClick to jump to parent topicloginUq

Syntax

loginUq(group)

Description

Log a user in to a UQ server queue.

Parameters

group

The group (queue) to which the user will login.

Returns

None.

Click to jump to top of pageClick to jump to parent topiclogout

Syntax

logout(group, extension, reason)

Description

Log the user out of the specified group (queue).

Parameters

group

The group from which the user will log out.

extension

The extension.

reason

The reason for the lout.

Returns

None.

Click to jump to top of pageClick to jump to parent topiclogoutUq

Syntax

logoutUq(group)

Description

Log the user out from the UQ server queue.

Parameters

group

The group (queue) from which to log the user out.

Returns

None.

Click to jump to top of pageClick to jump to parent topicregister

Syntax

register(extension, reason)

Description

Register an extension for the user.

Parameters

extension

The extension to be registered.

reason

The reason to register the extension.

Returns

None.

Click to jump to top of pageClick to jump to parent topicsetNotReady

Syntax

setNotReady(group, presence, extension, reason)

Description

Set the user state as not ready.

Parameters

group

The group on which the user is changing state.

presence

The presence in the new state.

extension

The extension that the user is changing state with.

reason

The reason to set not ready.

Returns

None.

Click to jump to top of pageClick to jump to parent topicsetPresence

Syntax

setPresence(group, presence, extension, reason)

Description

Set the presence for the current state.

Parameters

group

The group on which the user is changing presence.

presence

The presence for the state.

extension

The extension that the user is changing presence with.

reason

The reason to set the presence.

Returns

None.

Click to jump to top of pageClick to jump to parent topicsetPresenceUq

Syntax

setPresenceUq(group, presenceText, reason)

Description

Set the Presence for UQ servers.

Parameters

group

The group (queue) the user is changing their presence on.

presenceText

The new presence.

reason

The reason to set the new presence.

Returns

None.

Click to jump to top of pageClick to jump to parent topicsetReady

Syntax

setReady(group, presence, extension, reason)

Description

Set the user state as ready.

Parameters

group

The group on which the user is changing state.

presence

The presence for the state.

extension

The extension that the user is changing state with.

reason

The reason to set the state.

Returns

None.

Click to jump to top of pageClick to jump to parent topicsetWorkNotReady

Syntax

setWorkNotReady(group, presence, extension, reason)

Description

Set the user state as work not ready.

Parameters

group

The group on which the user is changing state.

presence

The presence for the state.

extension

The extension that the user is changing state with.

reason

The reason to set work not ready.

Returns

None.

Click to jump to top of pageClick to jump to parent topicsetWorkReady

Syntax

setWorkReady(group, presence, extension, reason)

Description

Set the user state as work ready.

Parameters

group

The group on which the user is changing state.

presence

The presence for the state.

extension

The extension that the user is changing state with.

reason

The reason to set work ready.

Returns

None.

Click to jump to top of pageClick to jump to parent topicunregister

Syntax

unregister(extension, reason)

Description

Unregister an extension for the user.

Parameters

extension

The extension to be unregistered.

reason

The reason to unregister the extension.

Returns

None.

Click to jump to top of pageClick to jump to parent topicUser Class Callback Event Methods

The following are the User class callback event methods.

Click to jump to top of pageClick to jump to parent topiconCapabilitiesChanged

Syntax

onCapabilitiesChanged(event)

Description

Fires when capabilities changed.

Click to jump to top of pageClick to jump to parent topiconCtiBusy

Syntax

onCtiBusy(event)

Description

Fires when the UQ server is notified that the CTI is busy.

Click to jump to top of pageClick to jump to parent topiconCtiClear

Syntax

onCtiClear(event)

Description

Fires when the UQ server is notified that the CTI is clear.

Click to jump to top of pageClick to jump to parent topiconDropped

Syntax

onDropped(event)

Description

Fires when user is dropped.

Click to jump to top of pageClick to jump to parent topiconError

Syntax

onError(event)

Description

Fires when an error occurs.

Click to jump to top of pageClick to jump to parent topiconInfo

Syntax

onInfo(event)

Description

Fires when an information event occurs. Currently only used on UQ server.

Click to jump to top of pageClick to jump to parent topiconLoggedIn

Syntax

onLoggedIn(event)

Description

Fires when the user is logged in.

Click to jump to top of pageClick to jump to parent topiconLoggedOut

Syntax

onLoggedOut(event)

Description

Fires when the user is logged out.

Click to jump to top of pageClick to jump to parent topiconLoggingIn

Syntax

onLoggingIn(event)

Description

Fires when the user is logging in.

Click to jump to top of pageClick to jump to parent topiconLoggingOut

Syntax

onLoggingOut(event)

Description

Fires when the user is logging out.

Click to jump to top of pageClick to jump to parent topiconMediaDisabled

Syntax

onMediaDisabled(event)

Description

Fires when a media type is disabled.

Click to jump to top of pageClick to jump to parent topiconMediaEnabled

Syntax

onMediaEnabled(event)

Description

Fires when a media type is enabled.

Click to jump to top of pageClick to jump to parent topiconNotReady

Syntax

onNotReady(event)

Description

Fires when a user state changes to not ready.

Click to jump to top of pageClick to jump to parent topiconPresenceChanged

Syntax

onPresenceChanged(event)

Description

Fires when the user's presence is changed.

Click to jump to top of pageClick to jump to parent topiconReady

Syntax

onReady(event)

Description

Fires when the user's state changes to ready.

Click to jump to top of pageClick to jump to parent topiconRegistered

Syntax

onRegistered(event)

Description

Fires when the address is registered.

Click to jump to top of pageClick to jump to parent topiconRegistering

Syntax

onRegistering(event)

Description

Fires when registering the address.

Click to jump to top of pageClick to jump to parent topiconSettingNotReady

Syntax

onSettingNotReady(event)

Description

Fires when setting the user's state to not ready.

Click to jump to top of pageClick to jump to parent topiconSettingPresence

Syntax

(event)

onSettingPresence

Description

Fires when setting presence for the current state.

Click to jump to top of pageClick to jump to parent topiconSettingReady

Syntax

onSettingReady(event)

Description

Fires when setting the user's state to ready.

Click to jump to top of pageClick to jump to parent topiconSettingWorkNotReady

Syntax

onSettingWorkNotReady(event)

Description

Fires when setting the user's state to work not ready.

Click to jump to top of pageClick to jump to parent topiconSettingWorkReady

Syntax

onSettingWorkReady(event)

Description

Fires when setting the user's state to work ready.

Click to jump to top of pageClick to jump to parent topiconStat

Syntax

onStat(event)

Description

Fires when statistics are received.

Click to jump to top of pageClick to jump to parent topiconStat1

Syntax

onStat1(event)

Description

Fires when statistics1 is received.

Click to jump to top of pageClick to jump to parent topiconStat2

Syntax

onStat2(event)

Description

Fires when statistics2 received.

Click to jump to top of pageClick to jump to parent topiconUnknown

Syntax

onUnknown(event)

Description

Fires when the user's state changes to unknown.

Click to jump to top of pageClick to jump to parent topiconUnregistered

Syntax

onUnregistered(event)

Description

Fires when the address gets unregistered.

Click to jump to top of pageClick to jump to parent topiconUnregistering

Syntax

onUnregistering(event)

Description

Fires when unregistering the address.

Click to jump to top of pageClick to jump to parent topiconWorkNotReady

Syntax

onWorkNotReady(event)

Description

Fires when the user's state to changes work not ready.

Click to jump to top of pageClick to jump to parent topiconWorkReady

Syntax

onWorkReady(event)

Description

Fires when the user's state changes to work ready.

Click to jump to top of pageClick to jump to parent topicUserCaps Class Constructor

The following is the UserCaps class constructor.

Click to jump to top of pageClick to jump to parent topicUserCaps

Syntax

UserCaps(strCaps)

Description

The UserCaps object describes the user capabilities.

Parameters

strCaps

The user capabilities.

Returns

A UserCaps object.

Click to jump to top of pageClick to jump to parent topicUserCaps Class Fields

The following are the UserCaps class fields

Click to jump to top of pageClick to jump to parent topiccanLogin

Description

Login capability of the user.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanLogout

Description

Logout capability of the user.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanRefreshState

Description

The refreshState capability of the user.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanSetNotReady

Description

The setNotReady capability of the user.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanSetPresence

Description

The setPresence capability of the user.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanSetReady

Description

The setReady capability of the user.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanSetWorkNotReady

Description

The setWorkNotReady capability of the user.

Type: boolean.

Click to jump to top of pageClick to jump to parent topiccanSetWorkReady

Description

The setWorkReady capability of the user.

Type: boolean.

Click to jump to top of pageClick to jump to parent topicUserData Class Constructor

The following is the UserData class constructor.

Click to jump to top of pageClick to jump to parent topicUserData

Syntax

UserData()

Description

The UserData object describes the key-value pairs of attached user data.

Parameters

None.

Returns

A UserData object.

Click to jump to top of pageClick to jump to parent topicUserData Class Fields

The following are the UserData class fields constants.

Click to jump to top of pageClick to jump to parent topicUserData Class Field Constants

Description

UserData class uses the following constants.

Value

Description

COMPONENT

The component.

DESCR

The description

ICSCRIPTPROGRAMNAME

The IC script program name.

ICTYPE

The IC type.

MARKET

The market.

MENU

The menu.

REFERENCEID

The reference ID

TARGET

The target.

URLABS

The absolute URL.

URLREL

The relative URL.

Click to jump to top of pageClick to jump to parent topicUserData Class Method

The following is the UserData class method.

Click to jump to top of pageClick to jump to parent topicaddKeyValue

Syntax

addKeyValue(key, value)

Description

Add the key-value pair to the UserData object.

Parameters

key

The key.

value

The value.

Returns

None.

Click to jump to top of pageClick to jump to parent topicUserStatistics1 Class Constructor

The following is the UseStatistics1 class constructor.

Click to jump to top of pageClick to jump to parent topicUserStatistics1

Syntax

UserStatistics1()

Description

UQ User statistics sent on user refresh 1.

Parameters

None.

Returns

A UserStatistics1 object.

Click to jump to top of pageClick to jump to parent topicUserStatistics1 Class Fields

The following are the UserStatistics1 class fields.

Click to jump to top of pageClick to jump to parent topicavailableCost

Description

The amount of unused work.

Click to jump to top of pageClick to jump to parent topicctiBusy

Description

Flag indicating that a user is engaged on CTI task.

Click to jump to top of pageClick to jump to parent topiccurrentQueue

Description

Current queue/group the User last logged into.

Type: string.

Click to jump to top of pageClick to jump to parent topicmostRecentTaskData

Description

Most recent task's data.

Type: string.

Click to jump to top of pageClick to jump to parent topicmostRecentTaskId

Description

Most recent task's ID.

Type: string.

Click to jump to top of pageClick to jump to parent topicnumTaskAccepted

Description

The number of tasks accepted by the user.

Type: string.

Click to jump to top of pageClick to jump to parent topicnumTasksDone

Description

The number of tasks done by the user.

Click to jump to top of pageClick to jump to parent topicnumTasksUnassigned

Description

The number of tasks unassigned by the user.

Type: string.

Click to jump to top of pageClick to jump to parent topicpresenceText

Description

The presence text for the user.

Type: string.

Click to jump to top of pageClick to jump to parent topicreasonFlag

Description

The reason flag for this event.

Type: string.

Click to jump to top of pageClick to jump to parent topicstate

Description

Current state of the User

Type: string.

Click to jump to top of pageClick to jump to parent topictimeInCurrentState

Description

Time in current state for the user.

Type: string.

Click to jump to top of pageClick to jump to parent topictimeSinceLoggedIn

Description

The time since the user logged in.

Type: string.

Click to jump to top of pageClick to jump to parent topicUserStatistics2 Class Constructor

The following is the UserStatistics2 class constructor.

Click to jump to top of pageClick to jump to parent topicUserStatistics2

Syntax

UserStatistics2()

Description

UQ User statistics sent on user refresh 2 event.

Parameters

None.

Returns

A UserStatistics2 object.

Click to jump to top of pageClick to jump to parent topicUserStatistics2 Class Fields

The following are the UserStatistics2 class fields.

Click to jump to top of pageClick to jump to parent topiccurrentQueue

Description

The current queue or group for the user.

Type: string.

Click to jump to top of pageClick to jump to parent topictimeIdle

Description

Idle time for the user.

Type: string.

Click to jump to top of pageClick to jump to parent topictimeInCurrentState

Description

The time in the current state for the user.

Type: string.

Click to jump to top of pageClick to jump to parent topictimeNotReady

Description

The time during which the user was in the not ready state.

Type: string.

Click to jump to top of pageClick to jump to parent topictimeSinceLogin

Description

The time since the user logged in.

Type: string.

Click to jump to top of pageClick to jump to parent topictotalTimeAvailable

Description

The total time during which the user has been in the available state.

Type: string.

Click to jump to top of pageClick to jump to parent topictotalTimeUnavailable

Description

The total time during which the user has been in the unavailable state.