- Source:
Methods
(static) AgentLibrary#bargeIn(agentId, uii, monitorAgentId, callbackopt)
Barge in on a call, can hear all parties and be heard by all
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
agentId |
number | Agent Id of the current logged in agent | ||
uii |
string | UII of the active call you wish to monitor | ||
monitorAgentId |
number | UII Agent Id of the agent you wish to monitor | ||
callback |
function |
<optional> |
null | Callback function when barge in response received |
- Source:
(static) AgentLibrary#cancelDirectAgentXfer(targetAgentId)
Cancel the request to transfer directly to an agent
Parameters:
| Name | Type | Description |
|---|---|---|
targetAgentId |
number | Agent id to transfer the call to |
- Source:
(static) AgentLibrary#coach(agentId, uii, monitorAgentId, callbackopt)
Add a coaching session to the call, can hear all parties but only able to speak on agent channel
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
agentId |
number | Agent Id of the current logged in agent | ||
uii |
string | UII of the active call you wish to monitor | ||
monitorAgentId |
number | UII Agent Id of the agent you wish to monitor | ||
callback |
function |
<optional> |
null | Callback function when coaching session response received |
- Source:
(static) AgentLibrary#coldDirectAgentXfer(targetAgentId)
Transfer directly to an available agent from the directAgentXferList result
and terminate the current agents call session
Parameters:
| Name | Type | Description |
|---|---|---|
targetAgentId |
number | Agent id to transfer the call to |
- Source:
(static) AgentLibrary#coldXfer(dialDest, callerIdopt, sipHeadersopt, callbackopt)
Transfer to another number and end the call for the original agent (cold transfer).
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dialDest |
number | Number to transfer to | ||
callerId |
number |
<optional> |
"" | Caller Id for caller (DNIS) |
sipHeaders |
number |
<optional> |
[] | Name/Value header pairs |
callback |
function |
<optional> |
null | Callback function when cold transfer response received |
- Source:
(static) AgentLibrary#corporateDirColdXfer(dialDest, callerIdopt, sipHeadersopt, countryIdopt, callbackopt)
Transfer to another number and end the call for the original agent (cold transfer).
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dialDest |
number | Number to transfer to | ||
callerId |
number |
<optional> |
"" | Caller Id for caller (DNIS) |
sipHeaders |
number |
<optional> |
[] | Name/Value header pairs |
countryId |
number |
<optional> |
"" | Country Id for the dialDest |
callback |
function |
<optional> |
null | Callback function when cold transfer response received |
- Source:
(static) AgentLibrary#corporateDirWarmXfer(dialDest, callerIdopt, sipHeadersopt, countryIdopt, callbackopt)
Transfer to another number while keeping the original agent on the line (warm transfer).
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dialDest |
number | Number to transfer to | ||
callerId |
number |
<optional> |
"" | Caller Id for caller (DNIS) |
sipHeaders |
number |
<optional> |
[] | Name/Value header pairs |
countryId |
number |
<optional> |
"" | Country Id for the dialDest |
callback |
function |
<optional> |
null | Callback function when warm transfer response received |
- Source:
(static) AgentLibrary#directAgentXferList()
Get available list of agents available for Direct Transfer
- Source:
(static) AgentLibrary#dispositionCall(uii, dispId, notes, callback, callbackDTSopt, contactForwardNumberopt, surveyopt, externIdopt, leadIdopt, requestIdopt)
Send a disposition for an inbound or outbound call
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
uii |
string | UII (unique id) for call | ||
dispId |
string | The disposition id | ||
notes |
string | Agent notes for call | ||
callback |
boolean | Boolean for whether or not this call is a callback | ||
callbackDTS |
string |
<optional> |
"" | date time stamp if callback |
contactForwardNumber |
string |
<optional> |
null | Number for contact forwarding |
survey |
string |
<optional> |
null | The survey response values for the call. Format: survey = [ { label: "", externId: "", leadUpdateColumn: ""} ] |
externId |
string |
<optional> |
null | The external id associated with the lead for this call (only for Outbound Dispositions). |
leadId |
string |
<optional> |
null | The lead id associated with this call (only for Outbound Dispositions). |
requestId |
string |
<optional> |
null | The request id associated with a preview fetched lead (only for Outbound Dispositions). |
- Source:
(static) AgentLibrary#dispositionManualPass(dispId, notes, callback, callbackDTSopt, leadIdopt, requestIdopt, externIdopt)
Send a disposition for a manual pass on a lead
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dispId |
string | The disposition id | ||
notes |
string | Agent notes for call | ||
callback |
boolean | Boolean for whether or not this call is a callback | ||
callbackDTS |
string |
<optional> |
"" | date time stamp if callback |
leadId |
string |
<optional> |
null | The lead id |
requestId |
string |
<optional> |
null | The request key for the lead |
externId |
string |
<optional> |
null | The external id of the lead |
- Source:
(static) AgentLibrary#getCampaignDispositions(campaignId, callbackopt)
Get a list of all campaign dispositions for given campaign id
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
campaignId |
string | Id for campaign to get dispositions for | ||
callback |
function |
<optional> |
null | Callback function when campaign dispositions response received |
- Source:
(static) AgentLibrary#getScript(scriptId, version, callbackopt)
Requests a script object based on given id
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
scriptId |
number | Id of script | ||
version |
number | The version number of the script, if the current loaded script version matches, just return current script. Otherwise, fetch new version of script. | ||
callback |
function |
<optional> |
null | Callback function when warm transfer response received |
- Source:
(static) AgentLibrary#hangup(sessionIdopt, resetPendingDisp,)
Sends a hangup request message
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
sessionId |
string |
<optional> |
"" | Session to hangup, defaults to current call session id |
resetPendingDisp, |
boolean | reset pendingDisp to false, in case of bad reconnect |
- Source:
(static) AgentLibrary#hold(holdState, callbackopt)
Place a call on hold
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
holdState |
boolean | Whether we are putting call on hold or taking off hold - values true | false | ||
callback |
function |
<optional> |
null | Callback function when hold response received |
- Source:
(static) AgentLibrary#holdSession(holdState, sessionId, callbackopt)
Place a specified session of a call on hold
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
holdState |
boolean | Whether we are putting call on hold or taking off hold - values true | false | ||
sessionId |
integer | string | session id of the call to place on hold | ||
callback |
function |
<optional> |
null | Callback function when hold response received |
- Source:
(static) AgentLibrary#internationalColdXfer(dialDest, callerIdopt, sipHeadersopt, countryIdopt, callbackopt)
Transfer to another number and end the call for the original agent (cold transfer).
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dialDest |
number | Number to transfer to | ||
callerId |
number |
<optional> |
"" | Caller Id for caller (DNIS) |
sipHeaders |
number |
<optional> |
[] | Name/Value header pairs |
countryId |
number |
<optional> |
"" | Country Id for the dialDest |
callback |
function |
<optional> |
null | Callback function when warm transfer response received |
- Source:
(static) AgentLibrary#internationalWarmXfer(dialDest, callerIdopt, sipHeadersopt, countryIdopt, callbackopt)
Transfer to another number while keeping the original agent on the line (warm transfer).
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dialDest |
number | Number to transfer to | ||
callerId |
number |
<optional> |
"" | Caller Id for caller (DNIS) |
sipHeaders |
number |
<optional> |
[] | Name/Value header pairs |
countryId |
number |
<optional> |
"" | Country Id for the dialDest |
callback |
function |
<optional> |
null | Callback function when warm transfer response received |
- Source:
(static) AgentLibrary#manualOutdial(destination, callerId, ringTimeopt, countryIdopt, queueIdopt)
Sends a manual outdial request message
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
destination |
string | Number to call - ANI | ||
callerId |
number | Number displayed to callee, DNIS | ||
ringTime |
number |
<optional> |
60 | Time in seconds to ring call |
countryId |
string |
<optional> |
'USA' | Country for the destination number |
queueId |
number |
<optional> |
'' | Queue id to tie manual call to |
- Source:
(static) AgentLibrary#manualOutdialCancel(uii)
Cancels a manual outdial request by UII.
Parameters:
| Name | Type | Description |
|---|---|---|
uii |
string | UII of manual call request, the UII is returned in the EARLY_UII notification. |
- Source:
(static) AgentLibrary#monitor(agentId, uii, monitorAgentId, callbackopt)
Add a silent monitor session to a call, can hear all channels but can't be heard by any party
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
agentId |
number | Agent Id of the current logged in agent | ||
uii |
string | UII of the active call you wish to monitor | ||
monitorAgentId |
number | UII Agent Id of the agent you wish to monitor | ||
callback |
function |
<optional> |
null | Callback function when silent monitor response received |
- Source:
(static) AgentLibrary#pauseRecord(record, callbackopt)
Pause call recording
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
record |
boolean | Whether we are recording or not | ||
callback |
function |
<optional> |
null | Callback function when pause record response received |
- Source:
(static) AgentLibrary#previewDial(requestId, leadPhoneopt)
Sends a preview dial request to call lead based on request id and (optional) lead phone.
Call previewFetch method first to get request id.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
requestId |
number | Pending request id sent back with lead, required to dial lead. | ||
leadPhone |
number |
<optional> |
"" | Lead phone number. Only needed if there are multiple numbers loaded for given lead. |
- Source:
(static) AgentLibrary#previewFetch(searchFieldsopt, callbackopt)
Sends a message to fetch preview dialable leads
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
searchFields |
array |
<optional> |
[] | Array of objects with key/value pairs for search parameters e.g. [ {key: "name", value: "Geoff"} ] |
callback |
function |
<optional> |
null | Callback function when preview fetch completed, returns matched leads |
- Source:
(static) AgentLibrary#record(record, callbackopt)
Toggle call recording based on passed in boolean true | false
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
record |
boolean | Whether we are recording or not | ||
callback |
function |
<optional> |
null | Callback function when record response received |
- Source:
(static) AgentLibrary#rejectDirectAgentXfer(targetAgentId)
Reject a presented direct agent transfer, if WARM requesting agent will be notified to try again,
if COLD a voicemail will be left for the target agent
Parameters:
| Name | Type | Description |
|---|---|---|
targetAgentId |
number | Agent id to receive the voicemail |
- Source:
(static) AgentLibrary#requeueCall(queueId, skillId, maintain, callbackopt)
Requeue a call
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
queueId |
number | Queue Id to send the call to | ||
skillId |
number | Skill Id for the requeued call | ||
maintain |
boolean | Whether or not to maintain the current agent | ||
callback |
function |
<optional> |
null | Callback function when requeue response received |
- Source:
(static) AgentLibrary#safeModeCall(requestId, leadPhoneopt)
Sends a TCPA Safe call request to call lead based on request id and (optional) lead phone.
Call safeModeFetch method first to get request id.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
requestId |
number | Pending request id sent back with lead, required to dial lead. | ||
leadPhone |
number |
<optional> |
"" | Lead phone number. Only needed if there are multiple numbers loaded for given lead. |
- Source:
(static) AgentLibrary#safeModeFetch(searchFieldsopt, callbackopt)
Sends a message to fetch safe mode dialable leads
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
searchFields |
array |
<optional> |
[] | Array of objects with key/value pairs for search parameters e.g. [ {key: "name", value: "Geoff"} ] |
callback |
function |
<optional> |
null | Callback function when safe mode fetch completed, returns matched leads |
- Source:
(static) AgentLibrary#safeSearchLeads(searchFieldsopt, callbackopt)
Pull back Safe Mode leads that match search criteria
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
searchFields |
array |
<optional> |
[] | Array of objects with key/value pairs for search parameters e.g. [ {key: "name", value: "Geoff"} ] |
callback |
function |
<optional> |
null | Callback function when safe mode fetch completed, returns matched leads |
- Source:
(static) AgentLibrary#saveScriptResult(uii, scriptId, jsonResult)
Saves the results from a script
Parameters:
| Name | Type | Description |
|---|---|---|
uii |
string | The UII of the call the script results belong to |
scriptId |
number | Id of script |
jsonResult |
object | JSON object of script results, name/value pairs |
- Source:
(static) AgentLibrary#searchLeads(searchFieldsopt, callbackopt)
Pull back leads that match search criteria
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
searchFields |
array |
<optional> |
[] | Array of objects with key/value pairs for search parameters e.g. [ {key: "name", value: "Geoff"} ] |
callback |
function |
<optional> |
null | Callback function when lead search completed, returns matched leads |
- Source:
(static) AgentLibrary#setCallNotes(notes, callbackopt)
Set agent notes for a call
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
notes |
string | Agent notes to add to call | ||
callback |
function |
<optional> |
null | Callback function when call notes response received |
- Source:
(static) AgentLibrary#voicemailDirectAgentXfer(targetAgentId)
Send the direct agent transfer straight to voicemail, avoid any attempts to connect to the target agent
Parameters:
| Name | Type | Description |
|---|---|---|
targetAgentId |
number | Agent id to receive the voicemail |
- Source:
(static) AgentLibrary#warmDirectAgentXfer(targetAgentId)
Transfer directly to an available agent from the directAgentXferList result and stay on the call
Parameters:
| Name | Type | Description |
|---|---|---|
targetAgentId |
number | Agent id to transfer the call to |
- Source:
(static) AgentLibrary#warmXfer(dialDest, callerIdopt, sipHeadersopt, callbackopt)
Transfer to another number while keeping the original agent on the line (warm transfer).
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dialDest |
number | Number to transfer to | ||
callerId |
number |
<optional> |
"" | Caller Id for caller (DNIS) |
sipHeaders |
number |
<optional> |
[] | Name/Value header pairs |
callback |
function |
<optional> |
null | Callback function when warm transfer response received |
- Source:
(static) AgentLibrary#warmXferCancel(dialDest)
Cancel a warm transfer
Parameters:
| Name | Type | Description |
|---|---|---|
dialDest |
number | Number that was transfered to |
- Source: