README
Botium Connector for Kore.ai Webhooks
This is a Botium connector for testing your Kore.ai chatbot.
Did you read the Botium in a Nutshell articles ? Be warned, without prior knowledge of Botium you won't be able to properly use this library!
How it works ?
Botium uses a Kore.ai Webhook channel to connect to your chatbot.
It can be used as any other Botium connector with all Botium Stack components:
Requirements
- Node.js and NPM
- a Kore.ai chatbot with Webhook channel enabled
- a project directory on your workstation to hold test cases and Botium configuration
Install Botium and Kore.ai Webhook Connector
When using Botium CLI:
> npm install -g botium-cli
> npm install -g botium-connector-koreai-webhook
> botium-cli init
> botium-cli run
When using Botium Bindings:
> npm install -g botium-bindings
> npm install -g botium-connector-koreai-webhook
> botium-bindings init mocha
> npm install && npm run mocha
When using Botium Box:
Already integrated into Botium Box, no setup required
Connecting your Kore.ai chatbot to Botium
You have to attach a Webhook channel to your Kore.ai chatbot:
- Follow the instructions, use syncronous interation mode, and HS256 algorithm for JWT token.
- From the Webhook configuration screen, copy those settings to the botium.json file:
- CLIENT ID
- CLIENT SECRET
- Webhook URL
- Don't forget to publish the webhook
Open the file botium.json in your working directory and add the Webhook settings.
{
"botium": {
"Capabilities": {
"PROJECTNAME": "<whatever>",
"CONTAINERMODE": "koreai-webhook",
"KOREAI_WEBHOOK_URL": "https://bots.kore.ai/chatbot/hooks/...",
"KOREAI_WEBHOOK_CLIENTID": "...",
"KOREAI_WEBHOOK_CLIENTSECRET": "..."
}
}
}
Botium setup is ready, you can begin to write your BotiumScript files.
Supported Capabilities
Set the capability CONTAINERMODE to koreai-webhook to activate this connector.
KOREAI_WEBHOOK_URL
The full Webhook URL from the Webhook configuration settings
KOREAI_WEBHOOK_CLIENTID
The CLIENT ID from the Webhook configuration settings
KOREAI_WEBHOOK_CLIENTSECRET
The CLIENT SECRET from the Webhook configuration settings
It is recommended to actually not add this to the botium.json file, but to use the environment variable BOTIUM_KOREAI_WEBHOOK_CLIENTSECRET instead
KOREAI_WEBHOOK_FROMID
If set, this userId will be used as sender. Otherwise, for each convo a new userId is generated.
KOREAI_WEBHOOK_TOID
If set, this userId will be used as receiver. Otherwise, for each convo a new userId is generated.
Open Issues and Restrictions
- Just text conversation and assertation is possible.
- Connector uses synch webhook API of Kore.ai. Always user has to start the conversation, and it is not possible to handle two following bot sections
- Channel specific responses are not supported
