Cisco Spark Bot

You can use Now Assistant from inside Cisco Spark as a chatbot. Follow the instructions below to connect your Now Assistant installation with your Cisco Spark account.

If you're running Now Assistant in a local environment, you need to first make your web server publicly accessible.

1. Create a Spark Bot

Using your existing Spark account, navigate to https://developer.ciscospark.com/apps.html and click on the "+" icon.

Create Spark Bot

On the next page click on "Create a Bot". Give your Bot a user name and then take a note of it.

<my-now-assistant-bot>@sparkbot.io

From the next page take note of your Bot's Access Token which is needed on the next page.

Bot's Access Token

2. Create a Webhook

Go to https://developer.ciscospark.com/endpoint-webhooks-post.html and toggle the Test Mode switch to On.

Test Mode

Now carry out the following steps:

  1. Replace the string under Authorization with your Bot's Access Token
  2. Under name enter 'Now Assistant'
  3. Under targetURL use https://<your-servername>/botspark where <your-servername> is the public FQDN (or ngrok FQDN if you're using a tunnel)
  4. For resource enter 'messages'
  5. As the event enter 'created'

The placeholders of the input fields are almost the same shade of grey as text inputs. If you find the behavior unexpected, try and type anything.

The finished result should look like this:

Create Webhook

Test your inputs by clicking on the Run button. If the response code on the right is "200", we're good to go ahead.

Webhook Parameters Test

3. Configure Now Assistant bot settings

The endpoint used for Spark is protected from unauthorized use, so we will have to configure it to allow Spark bot requests, provided the correct token is present.

Open your Now Assistant in the browser and go to the following address:

http://<your-server-ip>/Admin/adenin.GateKeeper/GlobalSettings/adenin.GateKeeper.SparkBot

Taking the values from step 2, enter your Bot's Access Token and under Bot email address enter the username of your Spark Bot.

Spark Access Token Configuration

Click the checkmark button to save your changes.

4. Test functionality

Open your Cisco Spark client and click on the "+" icon and then Contact a Person.

Contact a Person

On the next screen enter your bot's username as described under step 2, e.g. <my-now-assistant-bot>@sparkbot.io.

Now you can start a conversation with your bot. Just enter the same phrases/questions you would enter into the search field in Now Assistant directly.

Chat with bot

If Now Assistant finds a result the bot will show you the Card's written answer, provided the respective Card is configured to be "Adaptive" in the Card Designer.

If the bot answers with "Please login once to your Now Assistant before using the bot." then the current Spark user either wasn't matched to a Now Assistant user, or they haven't logged in previously.