Feedback

  • Contents
 

PureConnect Widget Extensions

This topic describes widget extensions that are specific to PureConnect. They are in addition to the functions described in the PureEngage Genesys Widgets and Genesys Widgets Extensions documentation.

The following functions can be called from within a custom extension for PureConnect Widgets. Note that the "service" object is obtained in a custom extension by invoking CXBus.registerPlugin("pluginName"). Also, If you use custom attributes, the server prefixes attribute names with WebTools_.

WebChatService.setSpeechStormCustomData

This function takes in a custom object that is sent to the SpeechStorm plugin for use with MicroApps. The parameter cannot contain complex objects – it must be a flat key-value pair object.

Example:

service.command("WebChatService.setSpeechStormCustomData", {
    parameter1: "value1",
    parameter2: "value2"
});

WebChatService.setChatRoutingContexts

This function takes in an array of objects that define the routing contexts for a chat. This function must be called prior to a chat being started.

Example:

service.command("WebChatService.setChatRoutingContexts", [
    {
        context: "skill1",
        category: "skills"
    },
    {
        context: "skill2",
        category: "skills"
    },
]);

WebChatService.setChatAdditionalAttributes

This function takes in a dictionary of string/string pairs.  This function allows a custom extension to set additional Interaction Attributes on a PureConnect chat.  This function must be called prior to a chat being started.

Example:

service.command("WebChatService.setChatAdditionalAttributes", {
    attributeName1: "attributeValue1",
    attributeName2: "attributeValue2",
});

WebChatService.setBotCustomParameters

This function takes in a dictionary of string/string pairs.  This function allows a custom extension to set custom parameters on a Bot chat.  This function must be called prior to a chat being started.

Example:

service.command("WebChatService.setBotCustomParameters", {
    attributeName1: "attributeValue1",
    attributeName2: "attributeValue2",
});

WebChatService.clearBotCustomParameters

This function takes no parameters and clears the value provided in WebChatService.setBotCustomParameters.  This function is automatically called when a chat is started, but is also provided for convenience if a custom extension needs it.

Example:

service.command("WebChatService.clearBotCustomParameters");

WebChatService.setBotName

This function provides an API to allow the customization of the bot name.

Example:

service.command("WebChatService.setBotName", {
    botName: "Alex"
});

WebChatService.setChatNotes

This function takes in an object that defines notes that should be set on a PureConnect chat.  This function must be called prior to a chat being started.

Example:

service.command("WebChatService.setChatNotes", {
    notes: "notes"
});