API Docs for: 2.0.20133.2
Show:

ui.virtualAgent.SDK Class

Module: UI VirtualAgent
Parent Module: UI

An object resolved by the render() method to interact with the virtual agent component

Methods

endChat

()

Ends Chat with live agent in Virtual Agent

Example:

ui.virtualAgent.render(config).then(
    function(sdk) {
        // End the chat
        sdk.endChat();
    },
    function() {
        console.log("Unable to render virtual agent");
    });

sendMessage

(
  • message
)
Promise

Insert a message in the user's chat with virtual agent

Parameters:

  • message String

    A message to send to virtual agent

Returns:

Example:

ui.virtualAgent.render(config).then(
    function(sdk) {
        // Send a message to virtual agent
        sdk.sendMessage("Test message");
    },
    function() {
        console.log("Unable to render virtual agent");
    });

showFeedback

()

shows feedback in Virtual Agent

Example:

ui.virtualAgent.render(config).then(
    function(sdk) {
        // show virtual agent feedback
        sdk.showFeedback();
    },
    function() {
        console.log("Unable to render virtual agent");
    });

startOver

()

Resets Virtual Agent

Example:

ui.virtualAgent.render(config).then(
    function(sdk) {
        // Reset virtual agent and start over
        sdk.startOver();
    },
    function() {
        console.log("Unable to render virtual agent");
    });