@salesforce/scv-connector-base
Version:
Salesforce Service Cloud Connector Base
1,815 lines (399 loc) • 22.2 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: VendorConnector</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: VendorConnector</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>VendorConnector<span class="signature">()</span><span class="type-signature"></span></h2>
<div class="class-description">Class representing a VendorConnector</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="VendorConnector"><span class="type-signature"></span>new VendorConnector<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1307">line 1307</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="downloadLogs"><span class="type-signature"></span>downloadLogs<span class="signature">(logs)</span><span class="type-signature"></span></h4>
<div class="description">
Triggers a browser download for Vendor Logs
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>logs</code></td>
<td class="type">
<span class="param-type">Array.<String></span>
</td>
<td class="description last">Array of log messages.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1377">line 1377</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getAgentStatus"><span class="type-signature"></span>getAgentStatus<span class="signature">()</span><span class="type-signature"> → {Promise.<<a href="AgentStatusInfo.html">AgentStatusInfo</a>>}</span></h4>
<div class="description">
Get agent status
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1353">line 1353</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="AgentStatusInfo.html">AgentStatusInfo</a>></span>
</dd>
</dl>
<h4 class="name" id="getAudioDevices"><span class="type-signature"></span>getAudioDevices<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Returns a list of valid device IDs that can be used for the speaker and microphone devices.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1403">line 1403</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getContacts"><span class="type-signature"></span>getContacts<span class="signature">(filter, workItemId)</span><span class="type-signature"> → {Promise.<<a href="PhoneContactsResult.html">PhoneContactsResult</a>>}</span></h4>
<div class="description">
To get the Contacts for this workItem's transfer/other channel operation
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>filter</code></td>
<td class="type">
<span class="param-type"><a href="ContactsFilter.html">ContactsFilter</a></span>
</td>
<td class="description last">It has fields like the search term and contact Type</td>
</tr>
<tr>
<td class="name"><code>workItemId</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1396">line 1396</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="PhoneContactsResult.html">PhoneContactsResult</a>></span>
</dd>
</dl>
<h4 class="name" id="getSharedCapabilities"><span class="type-signature"></span>getSharedCapabilities<span class="signature">()</span><span class="type-signature"> → {Promise.<<a href="SharedCapabilitiesResult.html">SharedCapabilitiesResult</a>>}</span></h4>
<div class="description">
Get shared capabilities
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1411">line 1411</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="SharedCapabilitiesResult.html">SharedCapabilitiesResult</a>></span>
</dd>
</dl>
<h4 class="name" id="getTelephonyConnector"><span class="type-signature"></span>getTelephonyConnector<span class="signature">()</span><span class="type-signature"> → {Promise.<<a href="TelephonyConnector.html">TelephonyConnector</a>>}</span></h4>
<div class="description">
Gets the telephonyConnector
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1323">line 1323</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="TelephonyConnector.html">TelephonyConnector</a>></span>
</dd>
</dl>
<h4 class="name" id="handleMessage"><span class="type-signature"></span>handleMessage<span class="signature">(message)</span><span class="type-signature"></span></h4>
<div class="description">
Handle message from LWC/Aura component
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1369">line 1369</a>
</li></ul></dd>
</dl>
<h4 class="name" id="init"><span class="type-signature"></span>init<span class="signature">(connectorConfig)</span><span class="type-signature"> → {Promise.<<a href="InitResult.html">InitResult</a>>}</span></h4>
<div class="description">
Initialize the connector
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>connectorConfig</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1314">line 1314</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="InitResult.html">InitResult</a>></span>
</dd>
</dl>
<h4 class="name" id="logMessageToVendor"><span class="type-signature"></span>logMessageToVendor<span class="signature">(logLevel, message, payload)</span><span class="type-signature"></span></h4>
<div class="description">
Sends the logs with a logLevel and payload to the vendor connector.
Does a no-op, if not implemented.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>logLevel</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Log Level (INFO, WARN, ERROR)</td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Message to be logged</td>
</tr>
<tr>
<td class="name"><code>payload</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">An optional payload to be logged</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1388">line 1388</a>
</li></ul></dd>
</dl>
<h4 class="name" id="logout"><span class="type-signature"></span>logout<span class="signature">()</span><span class="type-signature"> → {Promise.<<a href="LogoutResult.html">LogoutResult</a>>}</span></h4>
<div class="description">
Logout from Omni
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1361">line 1361</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="LogoutResult.html">LogoutResult</a>></span>
</dd>
</dl>
<h4 class="name" id="onAgentWorkEvent"><span class="type-signature"></span>onAgentWorkEvent<span class="signature">(agentWork)</span><span class="type-signature"></span></h4>
<div class="description">
Sends non-voice agent work events to vendor such as work accepted, declined, etc
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>agentWork</code></td>
<td class="type">
<span class="param-type"><a href="AgentWork.html">AgentWork</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1332">line 1332</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setAgentStatus"><span class="type-signature"></span>setAgentStatus<span class="signature">(agentStatus, statusInfo, enqueueNextState)</span><span class="type-signature"> → {Promise.<<a href="GenericResult.html">GenericResult</a>>}</span></h4>
<div class="description">
Set agent status
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>agentStatus</code></td>
<td class="type">
<span class="param-type"><a href="Constants.html#.AGENT_STATUS">Constants.AGENT_STATUS</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>statusInfo</code></td>
<td class="type">
<span class="param-type">StatusInfo</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>enqueueNextState</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last">flag to determine if this status change request should be enqueued if neccessary</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="types.js.html">types.js</a>, <a href="types.js.html#line1344">line 1344</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="GenericResult.html">GenericResult</a>></span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ActiveCallsResult.html">ActiveCallsResult</a></li><li><a href="ACWInfo.html">ACWInfo</a></li><li><a href="AgentConfig.html">AgentConfig</a></li><li><a href="AgentConfigResult.html">AgentConfigResult</a></li><li><a href="AgentStatusInfo.html">AgentStatusInfo</a></li><li><a href="AgentVendorStatusInfo.html">AgentVendorStatusInfo</a></li><li><a href="AgentWork.html">AgentWork</a></li><li><a href="AudioDevicesResult.html">AudioDevicesResult</a></li><li><a href="AudioStats.html">AudioStats</a></li><li><a href="AudioStatsElement.html">AudioStatsElement</a></li><li><a href="CallInfo.html">CallInfo</a></li><li><a href="CallResult.html">CallResult</a></li><li><a href="Contact.html">Contact</a></li><li><a href="ContactsFilter.html">ContactsFilter</a></li><li><a href="ContactsResult.html">ContactsResult</a></li><li><a href="CustomError.html">CustomError</a></li><li><a href="DialOptions.html">DialOptions</a></li><li><a href="GenericResult.html">GenericResult</a></li><li><a href="HangupResult.html">HangupResult</a></li><li><a href="HidDevice.html">HidDevice</a></li><li><a href="HoldToggleResult.html">HoldToggleResult</a></li><li><a href="InitResult.html">InitResult</a></li><li><a href="LogoutResult.html">LogoutResult</a></li><li><a href="MuteToggleResult.html">MuteToggleResult</a></li><li><a href="ParticipantResult.html">ParticipantResult</a></li><li><a href="Phone.html">Phone</a></li><li><a href="PhoneCall.html">PhoneCall</a></li><li><a href="PhoneCallAttributes.html">PhoneCallAttributes</a></li><li><a href="PhoneContactsResult.html">PhoneContactsResult</a></li><li><a href="RecordingToggleResult.html">RecordingToggleResult</a></li><li><a href="SetAgentConfigResult.html">SetAgentConfigResult</a></li><li><a href="SetAgentStateResult.html">SetAgentStateResult</a></li><li><a href="SharedCapabilitiesResult.html">SharedCapabilitiesResult</a></li><li><a href="ShowStorageAccessResult.html">ShowStorageAccessResult</a></li><li><a href="SignedRecordingUrlResult.html">SignedRecordingUrlResult</a></li><li><a href="StateChangeResult.html">StateChangeResult</a></li><li><a href="StatsInfo.html">StatsInfo</a></li><li><a href="SuperviseCallResult.html">SuperviseCallResult</a></li><li><a href="SupervisedCallInfo.html">SupervisedCallInfo</a></li><li><a href="SupervisorHangupResult.html">SupervisorHangupResult</a></li><li><a href="TelephonyConnector.html">TelephonyConnector</a></li><li><a href="VendorConnector.html">VendorConnector</a></li><li><a href="VoiceCapabilitiesResult.html">VoiceCapabilitiesResult</a></li></ul><h3>Global</h3><ul><li><a href="global.html#CONNECTOR_CONFIG_EXCEPTION_FIELDS">CONNECTOR_CONFIG_EXCEPTION_FIELDS</a></li><li><a href="global.html#CONNECTOR_CONFIG_EXPOSED_FIELDS">CONNECTOR_CONFIG_EXPOSED_FIELDS</a></li><li><a href="global.html#CONNECTOR_CONFIG_EXPOSED_FIELDS_STARTSWITH">CONNECTOR_CONFIG_EXPOSED_FIELDS_STARTSWITH</a></li><li><a href="global.html#dispatchCustomError">dispatchCustomError</a></li><li><a href="global.html#dispatchError">dispatchError</a></li><li><a href="global.html#dispatchEvent">dispatchEvent</a></li><li><a href="global.html#dispatchEventLog">dispatchEventLog</a></li><li><a href="global.html#downloadData">downloadData</a></li><li><a href="global.html#downloadLogs">downloadLogs</a></li><li><a href="global.html#getErrorMessage">getErrorMessage</a></li><li><a href="global.html#getErrorType">getErrorType</a></li><li><a href="global.html#getLogs">getLogs</a></li><li><a href="global.html#initializeConnector">initializeConnector</a></li><li><a href="global.html#log">log</a></li><li><a href="global.html#publishError">publishError</a></li><li><a href="global.html#publishEvent">publishEvent</a></li><li><a href="global.html#publishLog">publishLog</a></li><li><a href="global.html#sanitizePayload">sanitizePayload</a></li><li><a href="global.html#setConnectorReady">setConnectorReady</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Tue Nov 25 2025 17:31:06 GMT-0500 (Eastern Standard Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>