OmniConnect JS API v24.2

The OmniConnect JS API provides methods that developers can map to those supplied by their telephony providers. Learn more in the OmniConnect JS API Overview and Vault Help.

Click the button below to download the Omniconnect JS API.

Download OmniConnect API

OmniConnect Methods

onConnecting()

Notifies Vault that there is an incoming call.

import { omniconnectEvent } from "./vault-medical-omniconnect-24.2.0-release10001.js";


// Incoming call/live chat
Function incoming() {
    omniconnectEvent.onConnecting()
}

onConnected()

Notifies Vault when an agent has connected to a call. Does not create a Conversation record.

Parameters

Name Type Description
metadataoptional Object The connected call metadata.

import { omniconnectEvent } from "./vault-medical-omniconnect-24.2.0-release10001.js";


// Call/live chat has been connected with agent
function connected() {
    omniconnectEvent.onConnected()
}

onAccepted()

Notifies Vault when an agent has accepted a call and creates a Conversation record.

Parameters

Name Type Description
metadataoptional Object The accepted call metadata.
import { omniconnectEvent } from "./vault-medical-omniconnect-24.2.0-release10001.js";


// Call/live chat has been accepted
function accepted() {
    omniconnectEvent.onAccepted()
}

onEnded()

Notifies Vault when an agent has ended a call and updates the Conversation record.

Parameters

Name Type Description
metadataoptional Object The ended call metadata.
import { omniconnectEvent } from "./vault-medical-omniconnect-24.2.0-release10001.js";


// Call/live chat has been completed
function ended() {
    omniconnectEvent.onEnded()
}

onDisconnect()

Notifies Vault when a call has been disconnected.

import { omniconnectEvent } from "./vault-medical-omniconnect-24.2.0-release10001.js";


// Call/live chat has been terminated
function terminated() {
    omniconnectEvent.onDisconnect()
}

onLogin()

Notifies Vault when a user has successfully authenticated and sets the AgentStatus.

Name Type Description
agentStatusoptional AgentStatus The user’s telephony status.
Allowed values are AgentStatus.AVAILABLE and AgentStatus.OFFLINE.
If not provided, the default is AgentStatus.OFFLINE.
import { omniconnectEvent, AgentStatus} from "./vault-medical-omniconnect-24.2.0-release10001.js";


// Authenticate user with OFFLINE agent status
function userAuthenticatedWithOfflineStatus() {
    omniconnectEvent.onLogin()
}


// Authenticate user with AVAILABLE agent status
function userAuthenticatedWithAvailableStatus() {
    omniconnectEvent.onLogin(AgentStatus.AVAILABLE)
}

onLogout()

Notifies Vault when an agent has logged out and sets the AgentStatus.

Name Type Description
agentStatusoptional AgentStatus The user’s telephony status.
Allowed values are AgentStatus.AVAILABLE and AgentStatus.OFFLINE.
If not provided, the default is AgentStatus.OFFLINE.
import { omniconnectEvent, AgentStatus} from "./vault-medical-omniconnect-24.2.0-release10001.js";


// Deauthenticate user with OFFLINE agent status
function deauthenticateUserWithOfflineAgentStatus() {
    omniconnectEvent.onLogout()
}


// Deauthenticate user with AVAILABLE agent status
function deauthenticateUserWithAvailableAgentStatus() {
    omniconnectEvent.onLogout(AgentStatus.AVAILABLE)
}

onAgentStatusChange()

Notifies Vault when an agent’s status has changed and sets the AgentStatus.

Parameters

Name Type Description
agentStatusrequired AgentStatus The user’s telephony status.
Allowed values are AgentStatus.AVAILABLE and AgentStatus.OFFLINE.
If not provided, the default is AgentStatus.OFFLINE.
import { omniconnectEvent, AgentStatus} from "./vault-medical-omniconnect-24.2.0-release10001.js";


// Agent status set to OFFLINE
function userStatusChangeToOffline() {
    omniconnectEvent.onAgentStatusChange()
}


// Agent status set to AVAILABLE
function userStatusChangeToAvailable() {
    omniconnectEvent.onLogin(AgentStatus.AVAILABLE)
}