| Developers Guide

| Developers Guide

  • Docs
  • API
  • Help
  • Blog

›Tutorials

Notes on Versions Released

  • Migrating & Updating
  • Updating to New Releases

Getting Started

  • Introduction
  • Installation
  • Quick Start

Main Concepts

  • Overview
  • Glossary
  • CMS
  • Dialog Engine
  • Actions & Hooks
  • Memory
  • Modules
  • NLU
  • Emulator

Advanced Guides

  • Debug
  • Configuration
  • Authentication Methods
  • Custom Module
  • Performances
  • Hosting
  • Version Control
  • Development Pipelines
  • Clustering

Channels

  • Website Embedding
  • Facebook Messenger
  • Telegram
  • Microsoft Teams
  • Converse API
  • Slack
  • Smooch (Sunshine Conversations)
  • FAQ

Tutorials

  • Deploying a cluster on Digital Ocean
  • How to act on an intent
  • Acting Proactively
  • Using Carousel Postback
  • How to use Slot Skill
  • How to use Call API Skill
  • Calling an API in a Custom Action
  • Shortlinks
  • Connecting your bot with your existing backend
  • Supported databases
  • Timeouts
  • Human in the loop
  • Jump To
  • Inter-bot Communication / Delegation
  • Contextual FAQ
  • Authenticate a user against a 3rd Party OAuth
  • Listening for file changes
  • Using a 3rd party NLU
  • Using the UiPath integration for Botpress

Pro Edition

  • About
  • Licensing
  • Configuring RBAC
  • Monitoring & Alerting
  • Bot Pipelines
  • Internationalization

How to act on an intent

Switch Case Method

Let's start by creating intents. We created book-flight, cancel-flight and get-prices.

On our entry node, we create transitions. Click on the Intent Is radio button and select the intent of your choice. We're leaving When condition is met empty for now, because we're going to manually link the nodes later on.

The entry node now looks like this:

To act when an intent is detected, we created a node for each transition and added some text to confirm our intentions.

Now when we test the bot, we get the expected result.

QNA Method

This method is the most basic of the three. The fact that we're not showing it first is because QNA uses something very similar the the Switch Case Method in the background. A QNA item is basically an intent.

We're modifying our flow and removing all transitions. QNA will "jump" to the flow / node of your choice.

In QNA, we create the flight booking questions.

Then the cancel flight questions.

And then we can test the bot.

This method is not considered best practice, but it does the job for quick demonstrations. However, we definitely recommend to use the first method if you have basic intents without any slots.

Slot Skill Method

Combining Switch Case and Slot Skill

The Slot Skill can be used in collaboration with the "Switch Case Method". For instance, an intent could have zero slots while another could have multiple.

For this example, we're adding a destination slot to the book-flight intent.

Then we create a new Slot Skill and select the destination slot.

We can now edit our confirmation message so that it confirms the actual destination.

The flow now looks like this:

When we test the conversation, we can see that the bot will confirm the flight booking destination.

Note: The Slot Skill use implicit intent matching in the background. So its not required to have a transition to a Slot Skill. In this case

Chaining

First we need to have an intent with multiple slots so that Slot Skill chaining is relevant.

When we try to extract multiple slots on the same intent, we want to chain our Slot Skills like this:

← Deploying a cluster on Digital OceanActing Proactively →
  • Switch Case Method
  • QNA Method
  • Slot Skill Method
    • Combining Switch Case and Slot Skill
    • Chaining
| Developers Guide
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Facebook Open Source
Copyright © 2021 Botpress Inc.