Global

Members

(constant) CONNECTOR_CONFIG_EXCEPTION_FIELDS

Fields in the connector configuration that are NOT logged.
Source:

(constant) CONNECTOR_CONFIG_EXPOSED_FIELDS

Fields in the connector configuration that are logged.
Source:

(constant) CONNECTOR_CONFIG_EXPOSED_FIELDS_STARTSWITH

Fields that starts with string in the connector configuration that are logged.
Source:

Methods

dispatchCustomError(error, eventType)

Dispatch a telephony integration error to Salesforce
Parameters:
Name Type Description
error CustomError Error object representing the custom error
eventType string The event that caused this error, ex: constants.MESSAGE_TYPE.ACCEPT_CALL
Source:

dispatchError(errorType, error, eventType)

Dispatch a telephony integration error to Salesforce
Parameters:
Name Type Description
errorType string Error Type, ex: constants.ErrorType.VOICE.MICROPHONE_NOT_SHARED
error object Error object representing the error
eventType string The event that caused this error, ex: constants.MESSAGE_TYPE.VOICE.ACCEPT_CALL
Source:

dispatchEvent(eventType, payload, registerLog)

Dispatch a telephony event to Salesforce
Parameters:
Name Type Default Description
eventType String event type, i.e. constants.EVENT_TYPE.VOICE.CALL_STARTED
payload Object event payload
registerLog Boolean true optional argument to not register the event
Source:

dispatchEventLog(eventType, payload, isError)

Dispatch a telephony event log to Salesforce
Parameters:
Name Type Description
eventType String event type, i.e. constants.EVENT_TYPE.VOICE.CALL_STARTED
payload Object event payload
isError Boolean error scenario
Source:

downloadData(data, fileName, fileType)

Download data as a file.
Parameters:
Name Type Description
data object
fileName string
fileType string
Source:

downloadLogs()

Download the logs as a file
Source:

getErrorMessage(e)

Gets the error message from the error object
Parameters:
Name Type Description
e object Error object representing the error
Source:

getErrorType(e)

Gets the error type from the error object
Parameters:
Name Type Description
e object Error object representing the error
Source:

getLogs()

Source:
Returns:
a deep copy of the logs array

initializeConnector(connector)

Initialize a vendor connector
Parameters:
Name Type Description
connector VendorConnector
Source:

log(logMessage, logLevel, logSourceopt)

Log a message at a custom level.
Parameters:
Name Type Attributes Description
logMessage object
logLevel string
logSource string <optional>
Source:

publishError(param)

Publish a telephony error to Salesforce
Parameters:
Name Type Description
param object
Properties
Name Type Description
eventType "LOGIN_RESULT" | "LOGOUT_RESULT" | "CALL_STARTED" | "QUEUED_CALL_STARTED" | "CALL_CONNECTED" | "HANGUP" | "PARTICIPANT_CONNECTED" | "PARTICIPANT_ADDED" | "PARTICIPANTS_SWAPPED" | "PARTICIPANTS_CONFERENCED" | "MESSAGE" | "MUTE_TOGGLE" | "HOLD_TOGGLE" | "RECORDING_TOGGLE" | "AGENT_ERROR" | "SOFTPHONE_ERROR" Event type to publish.
error object Error object representing the error
Source:

publishEvent(param)

Publish an event to Sfdc. The event payload will be verified to be the correct type before being published.
Parameters:
Name Type Description
param object
Properties
Name Type Description
eventType "LOGIN_RESULT" | "LOGOUT_RESULT" | "CALL_STARTED" | "QUEUED_CALL_STARTED" | "CALL_CONNECTED" | "HANGUP" | "PARTICIPANT_CONNECTED" | "PARTICIPANT_ADDED" | "PARTICIPANTS_SWAPPED" | "PARTICIPANTS_CONFERENCED" | "MESSAGE" | "MUTE_TOGGLE" | "HOLD_TOGGLE" | "RECORDING_TOGGLE" Event type to publish
payload object Payload for the event. Must to be an object of the payload class associated with the EVENT_TYPE else the event is NOT dispatched
registerLog boolean Boolean to opt out of registering logs for events LOGIN_RESULT - GenericResult LOGOUT_RESULT - LogoutResult CALL_STARTED - CallResult QUEUED_CALL_STARTED - CallResult CALL_CONNECTED - CallResult HANGUP - CallResult PARTICIPANT_CONNECTED - ParticipantResult PARTICIPANT_ADDED - ParticipantResult PARTICIPANTS_SWAPPED - HoldToggleResult PARTICIPANTS_CONFERENCED - HoldToggleResult MESSAGE - object MUTE_TOGGLE - MuteToggleResult HOLD_TOGGLE - HoldToggleResult RECORDING_TOGGLE - RecordingToggleResult
Source:

publishLog(param)

Publish an event or error log to Salesforce
Parameters:
Name Type Description
param object
Properties
Name Type Description
eventType string Any event type to be logged
payload object Any payload for the log that needs to be logged
isError boolean
Source:

sanitizePayload(payload)

Sanitizes the object by removing any PII data
Parameters:
Name Type Description
payload object
Source:

(async) setConnectorReady()

Notify Salesforce that the connector is ready
Source: