API Docs for: 2.0.20133.2
Show:

ui.chat.SDK Class

Module: UI Chat
Parent Module: UI

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

Item Index

Methods

sendMessage

(
  • message
)
Promise

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

Parameters:

  • message String

    A message to insert in the chat

Returns:

Example:

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

updateContext

(
  • properties
)
Promise

Update the current chat context

Parameters:

  • properties Object

    List of properties to update

Returns:

Example:

ui.chat.render(config).then(
    function(sdk) {
        // Update the current chat context
        sdk.updateContext({ foo: "bar" });
    },
    function() {
        console.log("Unable to render chat");
    });