Conversational AI
  • Introduction
  • Getting started
    • Getting started
    • Adding content to your bot
    • Capture information with entities
    • Capture information with input validation
    • Reusing intents with context
    • Flow navigation with variables
    • Adding new users to your account
  • Understanding users
    • Natural Language Processing (NLP)
      • NLP threshold
      • NLP Import & Export
      • Train your bot with actual user messages
      • NLP Dashboard & NLP Improve
      • Synonym entities
      • System entities
      • Supported languages
      • Intent templates
    • Expression generator
    • Context
    • Multi-language bots
  • Bot answers
    • Bot dialogs
      • Message components
      • Go To
      • Input Validation
      • Action
      • Translations
    • Conversations
    • Analytics
      • User flow
    • Publishing your bot
    • Events
    • Reuse flows
    • Settings
      • Variables
  • Integrations
    • API integration
      • Advanced API integrations
    • Chat message structure for API's
    • Retrieving data from Airtable (GET)
    • Sending data to Airtable (POST)
    • Human handover & live chat
      • #Interact
      • RingCentral Engage Digital
      • Genesys Cloud
      • Help Scout
      • Zendesk Chat
      • Intercom
      • Sparkcentral (beta)
      • Offloading Webhook
  • Channels
    • Channels
    • Facebook Messenger
      • Facebook Admin Removal
      • Facebook Webview Whitelisting
    • WhatsApp Business API
    • Google Assistant
    • Webhook Channel API
    • Chat widget
    • Phone & voice
    • Workplace from Facebook
    • Sinch Conversation API (beta)
  • Tips & Best practices
    • How to NLP
    • Creating diverse expressions
    • Why is my bot not responding the way I want it to?
    • What makes a good chatbot?
    • How to recognize a returning bot user
    • Gathering user feedback
    • Using time in your chatbot
Powered by GitBook
On this page

Was this helpful?

  1. Bot answers

Reuse flows

PreviousEventsNextSettings

Last updated 4 years ago

Was this helpful?

For a lot of bots built on Chatlayer.ai the answer to a question a user has depends on some information you know about that customer. This information, such as which type of customer you are, which sort of subscription you have, etc, can be gathered through an API, but also directly in the flow itself.

For example:

In this flow the answer a customer gets depends on the type of customer they are. However, the customer type is important for the answer to a lot of different questions a user might have. We don't want to build the same "customer type question" logic every time the user asks a question like this. Instead we want to create that in one place.

In this tutorial you will be learning how to create a reusable flow, how to trigger it, and how to return to the original point in the flow.

  • Create a bot dialog that links to the intent that needs a specific answer. Link this bot dialog with a Go To to the flow you want to reuse. Add a variable of type "bot dialog", give it a name such as "reuseFlow", and a bot dialog to return to once the flow is finished.

  • Create the flow you want to reuse, and gather the variables you need from the customer

  • Add the end of your flow, add a new Action bot dialog, and add a "Go to variable bot dialog" plugin. Fill in the bot dialog variable to return to in this flow

  • When a user reaches this part of the flow, they will return to the original bot dialog that was defined in the reuseFlow variable.

The flow used in the example above looks like this:

You can create two types of variables in Chatlayer.ai: text variables, that allow you to store data on the session of the user, and bot dialog variables, that allow you to store a variable. Read more about variables .

here