Chatbot Overview
Conversational Bots
Intents & Entities
Intelligent Bots
Kore.ai's Approach
Kore.ai Conversational Platform
Bot Concepts and Terminology
Natural Language Processing (NLP)
Bot Types
Bot Tasks
Starting with Kore.ai Platform
How to Access Bot Builder
Working with Kore.ai Bot Builder
Building your first Bot
Getting Started with Building Bots
Using the Dialog Builder Tool
Creating a Simple Bot
Release Notes
Latest Updates
Older Releases
Bot Builder
Creating a Bot
Design
Develop
Dialog Task
Working with User Intent Node
Working with the Dialog Node
Working with Entity Node
Supported Entity Types
Working with Composite Entities
Supported Time Zones
Supported Colors
Supported Company Names
Working with Message Nodes
Working with the Confirmation Nodes
Working with Service Node
Implementing Custom Authentication
Enabling 2-way SSL for Service nodes
Working with Script Node
Working with Agent Transfer Node
Working with WebHook Node
Defining Connections & Transitions
Managing Dialogs
Prompt Editor
Action & Information Task
Working with Action Tasks
Working with Information Tasks
Establishing Flows
Alert Tasks
Working with Alert Tasks
Managing Ignore Words and Field Memory
Knowledge Tasks
Knowledge Ontology
Building Knowledge Graph
Importing and Exporting Bot Ontology
Knowledge Extraction
Natural Language
Overview
Machine Learning
ML Model
Fundamental Meaning
Knowledge Graph Training
Traits
Ranking and Resolver
NLP Detection
NLP Settings and Guidelines
Bot Intelligence
Overview
Context Management
Session and Context Variables
Context Object
Dialog Management
Sub-Intents
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Default Conversations
Default Standard Responses
Channel Enablement
Test & Debug
Talking to Bot
Utterance Testing
Batch Testing
Recording Conversations
Publishing your Bot
Analyzing your Bot
Overview
Dashboard
Conversation Flows
Bot Metrics
Advanced Topics
Bot Authorization
Language Management
Collaborative Development
IVR Integration
Universal Bots
Defining
Creating
Customizing
Enabling Languages
Smart Bots
Defining
Sample Bots
Github
Asana
Travel Planning
Flight Search
Event Based Bot Actions
Bot Settings
Bot Functions
General Settings
PII Settings
Customizing Error Messages
Bot Management
Using Bot Variables
API Guide
API Overview
API List
API Collection
SDKs
SDK Overview
SDK Security
SDK App Registration
Kore.ai Web SDK Tutorial
Message Formatting and Templates
Mobile SDK Push Notification
Web Socket Connect & RTM
Using the BotKit SDK
Installing the BotKit SDK
BotKit SDK Configuration
Events for the BotKit SDK
Functions for the BotKit SDK
BotKit SDK Tutorial – Agent Transfer
BotKit SDK Tutorial – Flight Search Sample Bot
Using an External NLP Engine
Bot Administration
Bots Admin Console
User Management
Managing Users
Managing Groups
Managing Role
Bots Management
Enrollment
Inviting Users
Sending Bulk Invites to Enroll Users
Importing Users and User Data
Synchronizing Users from Active Directory
Security & Compliance
Overview
Using Single Sign-On
Cloud Connector
Analytics
Billing
How Tos
Context Switching
Using Traits
Live Agent Transfer
Schedule a Smart Alert
Configure Agent Transfer
  1. Home
  2. Docs
  3. Bots
  4. Advanced Topics
  5. Event Based Bot Actions

Event Based Bot Actions

Bot Events are triggered when specific actions occur during bot conversation or when specific events are triggered on bot channels.

For example, when a user clicks the Get Started button to initiate a chat with your FB Messenger bot, it triggers the Facebook Welcome event. You can use this event to customize the welcome greeting such as personalizing it with the user’s first and last names, capturing additional information from user and updating backend systems.

Bot Behavior

Developers can define bot behavior when an event is triggered using one of the following options:

Run a task

Select a Dialog task (Standard or Hidden ) to be invoked when the event triggers. Once the event is triggered, the dialog starts executing. If it is interrupted because of other intent detections, the Hold and Resume settings come into play. During execution, if the selected Dialog is not published in the bot, the event is discarded.

In some cases, the Dialog may not be available to the user during a conversation for various reasons such as the task is not yet published or suspended or simply not assigned to the user. In such cases, the bot throws an error message that the task is not currently available for execution. Developers can preempt such situations by testing the bot in Debug mode. Debug Console shows full details about the error, including the reason for the nonavailability of the task.

Run a script

Define a JavaScript to run when the event triggers. The script can make use of all applicable components such as session, context objects, bot variables, and bot functions. You can also fix the code using the Debug mode.

Show a message

Define a simple or advanced message to the user when the event triggers. It supports all messaging formatting features available in the Bots Platform, including multiple messages with channel override options. Also, developers can define language-specific messages.

Learn more about message formatting and templates.

Event Types

You can configure the following events to trigger responses:

Event Trigger
Welcome Event On receiving the first message from the user from any channel.
Facebook Welcome Event On receiving Welcome Event from Facebook Messenger. This event takes precedence over Welcome Event if both are configured for a bot.
Telegram Welcome Event On receiving Welcome Event from Telegram. This event takes precedence over Welcome Event if both are configured for a bot.
On Connect Every time a user invokes Web / Mobile SDK
Task Execution Failure
(Available post v6.40 release)
On encountering an error in dialog task execution like:

  • an error in the execution of the bot,
  • service call failure,
  • unable to reach the server
  • error in invoking agent node in case of Human agent transfer,
  • KT Task failures,
  • Webhook node failures,
  • Dialog related to a sub-dialog node not available,
  • exceptions in parsing the bot message.

Configuring a Bot Event

Follow these steps to configure a bot event:

  1. On the bot main menu, from Natural Language > Default Conversations select Event Handlers.
  2. On the Events page, select one of the events. The Event Configuration window slides open.
  3. Select one of these options to define how to proceed when the selected event is detected:
    • Initiate Task,
    • Run Script,
    • Show Message.

Additional Notes

Task Execution Failure Event

  • This event is available from v6.40 release.
  • By default, this event is always enabled with Show Message option. This event cannot be disabled.
  • This bot-level behavior can be overridden for specific tasks by defining task-specific failure event from the dialog task settings. Refer here for how.

Welcome Event

Users can initiate bot conversations in varied ways, from a simple greeting to directly expressing an intent or asking an FAQ. To facilitate a scope for the developer to customize the bot response based on the user choice, the Welcome event comes with additional options when you choose Initiate Task or Show Message as the event configurations. For example, if the first user utterance maps to a bot task, should the bot execute the event-based task or the user intent first?
As a developer, you can define the bot priority when the user starts the bot conversation with a greeting, task, or FAQ from the options listed below:

Event Configuration Options
Initiate Task
  • Greetings / Small Talk
    • Respond to greetings or small talk and initiate Welcome Event dialog
    • Discard user message and initiate Welcome Event dialog
  • FAQ
    • Respond to FAQ and initiate Welcome Event dialog
    • Discard user message and initiate Welcome Event dialog
  • Task
    • Initiate user requested task and discard Welcome Event dialog
    • Initiate Welcome Event dialog and add user requested task to Follow-up Intents

If the Task is unavailable to the user for any reasons such as the task is not yet published or suspended or simply not assigned to the user, in such cases, the bot throws an error message that the task is not currently available for execution.

Show Message
  • Greetings / Small Talk
    • Respond to greetings or small talk and display Welcome Event message
    • Respond to greetings or small talk and discard Welcome Event message
  • FAQ
    • Respond to FAQ and display Welcome Event message
    • Respond to FAQ and discard Welcome Event message
  • Task
    • Display Welcome Event message and run user requested task
    • Discard Welcome Event message and run user requested task
Note: The Bot Builder platform no longer supports Welcome Message. If you have defined a Welcome Message in previous versions of the platform, the upgraded version automatically creates a corresponding Welcome event and On Connect event to ensure backward compatibility.
Menu