Skip to content

Latest commit

 

History

History
189 lines (122 loc) · 9.37 KB

File metadata and controls

189 lines (122 loc) · 9.37 KB

Mattermost ServiceNow Virtual Agent Plugin

Table of Contents

License

See the LICENSE file for license rights and limitations.

Overview

This plugin integrates the ServiceNow Virtual Agent in Mattermost. It is created using the official Virtual Agent Bot API documentation which can be found here. For a stable production release, please download the latest version from the Plugin Marketplace and follow the instructions to install and configure the plugin.

Features

  • This plugin supports sending the below fields to the Virtual Agent through Mattermost:

    1. Text messages

      image

    2. File attachments

      image

    3. Date/Time

      image

      image

  • Handling/Displaying the following types of responses from the Virtual Agent:

    1. OutputText

      image

    2. OutputImage

      image

    3. OutputLink

      image

    4. Picker/Dropdown

      image

    5. OutputCard

      image

Note- For sending file attachments to the Live Agent other than an image, you need to have ServiceNow version greater than or equal to "San Diego Patch 4". Also, the link of the file attachment sent to the Virtual Agent/Live Agent will be expired in 15 minutes.

Basic Knowledge

Installation

  1. Go to the releases page of this GitHub repository and download the latest release for your Mattermost server.
  2. Upload this file on the Mattermost System Console > Plugins > Management page to install the plugin. To learn more about how to upload a plugin, see the documentation.
  3. Enable the plugin from System Console > Plugins > ServiceNow Virtual Agent.

Setup

Connecting to ServiceNow

  • Send any direct message to servicenow-virtual-agent. Note- If servicenow-virtual-agent is not visible in your DMs, click on the plus(+) icon on the right side of "Direct Messages" and search for servicenow-virtual-agent.

    image

  • You will get a response with a link to connect your ServiceNow account.

    image

  • Click on that link. If it asks for login, enter your instance credentials and click Allow to connect your account.

Development

Setup

Make sure you have the following components installed:

Building the plugin

Run the following command in the plugin repo to prepare a compiled, distributable plugin zip:

make dist

After a successful build, a .tar.gz file in /dist folder will be created which can be uploaded to Mattermost. To avoid having to manually install your plugin, deploy your plugin using one of the following options.

Deploying with Local Mode

If your Mattermost server is running locally, you can enable local mode to streamline deploying your plugin. Edit your server configuration as follows:

{
    "ServiceSettings": {
        ...
        "EnableLocalMode": true,
        "LocalModeSocketLocation": "/var/tmp/mattermost_local.socket"
    }
}

and then deploy your plugin:

make deploy

You may also customize the Unix socket path:

export MM_LOCALSOCKETPATH=/var/tmp/alternate_local.socket
make deploy

If developing a plugin with a web app, watch for changes and deploy those automatically:

export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_TOKEN=j44acwd8obn78cdcx7koid4jkr
make watch

Deploying with credentials

Alternatively, you can authenticate with the server's API with credentials:

export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_USERNAME=admin
export MM_ADMIN_PASSWORD=password
make deploy

or with a personal access token:

export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_TOKEN=j44acwd8obn78cdcx7koid4jkr
make deploy