Optional
areChecks if any agents are online and can connect to a user when they become available. This does not necessarily mean that an agent is immediately available; when a chat is started, the user may still have to wait for an agent to become available. The callback function ServiceDeskCallback.updateAgentAvailability is used to give the user more up-to-date information while they are waiting for an agent to become available.
The message that contains the transfer_info object that may be used by the service desk, so it can perform a more specific check.
True if some agents are available or false if no agents are available. This may also return null which means the availability status of agents is unknown or the service desk doesn't support this information.
Tells the service desk to terminate the chat.
Additional info that may be provided as part of ending the chat.
Returns a Promise that resolves when the service desk has successfully handled the call.
Optional
filesIndicates that the user has selected some files to be uploaded but that the user has not yet chosen to send them to the agent. This method can use this as an opportunity to perform any early validation of the files in order to display an error to the user. It should not actually upload the files at this point. If the user chooses to send the files to the agent, they will be included later when #sendMessageToAgent is called.
This method may be called multiple times before a user sends the files.
If there are errors in the files, this method should use ServiceDeskCallback#setFileUploadStatus to update the status with an error message. The user will not be able to upload any files until any files in error are removed.
Optional
getReturns a name for this service desk integration. This value should reflect the service desk that is being integrated to (e.g. "genesys web messenger"). This information will be reported to IBM and may be used to gauge interest in various service desks for the possibility of creating fully supported out-of-the-box implementations.
This value is required for custom service desks and may have a maximum of 40 characters.
Optional
reconnectThis will be called when the service desk is first initialized and it is determined that the user was previously connected to an agent. This function should perform whatever steps are necessary to reconnect the user. Web chat will assume the user is permitted to send messages and is connected to the same agent when this function resolves.
true to indicate that the reconnect was successful.
Optional
screenTells the service desk that the user has requested to stop sharing their screen.
Sends a message to the agent in the service desk. Note that the message text may be empty if the user has selected files to upload and has not chosen to include a message to go along with the files.
The message from the user.
The unique ID of the message assigned by the widget.
Additional data to include in the message to the agent.
Returns a Promise that resolves when the service desk has successfully handled the call.
Instructs the service desk to start a new chat. This will be called when a user requests to connect to an agent and web chat initiates the process (typically when the user clicks the button on the "Connect to Agent" card). It will make the appropriate calls to the service desk to start the chat and will make use of the callback to inform web chat when an agent joins or messages are received.
This may be called multiple times by web chat. If a user begins a chat with an agent, ends the chat and then begins a new chat with an agent, this function will be called again.
If the integration is unable to start a chat (such as if the service desk is down or no agents are available) then this function should throw an error to let web chat know that the chat could not be started.
The areAnyAgentsOnline function is called before this function is called and is called as soon as a "connect_to_agent" message has been received from the assistant. This determines if the "Connect to Agent" card should be displayed to the user or if the "no agents are available" message configured in the skill should be shown instead.
The original server message response that caused the connection to an agent. It will contain specific information to send to the service desk as part of the connection. This can include things like a message to display to a human agent.
Additional configuration for startChat.
Returns a Promise that resolves when the service desk has successfully started a new chat. This does not necessarily mean that an agent has joined the conversation or has read any messages sent by the user.
Optional
updateInforms the service desk of a change in the state of the web chat that is relevant to the service desks. These values may change at any time.
Optional
userInforms the service desk that the user has read all the messages that have been sent by the service desk.
Returns a Promise that resolves when the service desk has successfully handled the call.
Optional
userTells the service desk if a user has started or stopped typing.
If true, indicates that the user is typing. False indicates the user has stopped typing.
Returns a Promise that resolves when the service desk has successfully handled the call.
This is the public interface for a human agent service desk integration. This is the interface between the chat widget and the implementation of the human agent interface with one of the various supported service desks.