Tiledesk Developer Hub
WebsiteCommunityTutorialsGet started
  • Introduction
  • Community
  • Ask for Support
  • Public Roadmap and Changelog
  • Tutorials
  • Widget
    • Widget SDK
    • Javascript API: Methods
    • Javascript API: Attributes
    • Javascript API: Listeners/Events
    • Widget Authentication
    • Widget Angular integration
    • Widget React integration
    • Widget for Android with WebView
    • Widget for iOS with WKWebView
    • Widget for Flutter with WebView
    • Widget for React with WebView
    • Widget for Wix Website platform
    • Tutorials
      • Hide widget
      • Show/Hide widget programmatically
      • Force widget loading without user interaction
      • Mobile positioning
      • Custom size (width/height)
      • Installing widget on selected pages
    • Conversation Embedded Apps
      • Payment App Tutorial
      • Prechat form App Tutorial
    • Advanced
      • Preset the Widget on a specific Department
      • Authentication Flow
      • Widget protocol specs
      • Prechat Form JSON specs
      • Prevent multiple conversations
      • Old versions
        • Web SDK v4
  • External Chatbot
    • Introduction
    • Hello World tutorial
    • Chatbot to Human handoff
    • Send Text Buttons
    • Advanced Tutorials
      • Introduction
      • Tutorial 1 - Dialogflow as external chatbot
      • Tutorial 2 - Buttons and images
      • Tutorial 3 - Automatic human handoff with fallback intent
      • Tutorial 4 - Explicit Human handoff with user intent
      • Tutorial 5 - Gracefully handling operating hours during handoff
      • Generate Dialogflow Google Credentials file
    • Rasa tutorials
      • Rasa Tutorial 1 - Rasa as external chatbot
  • Resolution bot
    • Introduction
    • Quickstart
    • Webhook service
    • Rich messages
    • Tutorials
      • Chatbot chooser (multilanguage)
      • Department chooser
      • Order info (webhook)
  • APIs
    • REST APIs
      • Introduction
      • Authentication
      • Requests
      • Leads
      • Messages
      • Activities
      • Projects
      • Team
      • User
      • Analytics
      • Canned responses
      • Tags
      • Events
      • Jwt
      • Labels
      • Images
      • Files
      • Segments
      • Chatbots
      • Knowledge Bases
        • Knowledge Base
        • Contents
        • Question & Answer
      • Management Api
        • Departments
        • Groups
    • NodeJS SDK
    • Webhooks
      • Subscriptions
    • Conversation Messages APIs tips
    • Realtime API
    • JWT Authentication
      • JWT Custom authentication Tutorial
    • Tutorials
      • REST API
        • Sending and receiving messages with Tiledesk APIs
        • PHP Tiledesk REST API example
        • Import multiple messages into Tiledesk using REST APIs from third party app
      • Webhooks
        • Custom Request assignment
        • Request transcript on close
  • Apps
    • Build Custom App - Quick start
    • External Channels integration flow diagram
    • Telegram integration tutorial
  • Dashboard & AgentChat SDK
    • Dashboard SDK
    • Agent Chat SDK
  • Architecture
    • Architecture overview
    • Components list
    • Bot Design diagram
    • Multi Channel Message Flow
  • Installation
    • Installation
    • Running Tiledesk using Docker Compose
    • Running Tiledesk with Kubernetes using Helm
    • Choosing Hardware
  • Configuration
    • Chat21 channel configuration
    • Email parameters and templates configuration
    • Configure the logging system
Powered by GitBook
On this page
  • Create a new Project
  • Create the Language-Chooser chatbot
  • Create a chatbot for English and Spanish
  • Create the backend on Replit
  • Develop the 'choosing' logic. Let's fork!
  • Let's run

Was this helpful?

  1. Resolution bot
  2. Tutorials

Chatbot chooser (multilanguage)

PreviousTutorialsNextDepartment chooser

Last updated 1 year ago

Was this helpful?

This tutorial will guide you to develop a simple language chooser chatbot.

Goal of this chatbot is to choose the next chatbot based on the language of the end-user.

In Tiledesk you can add a chatbot to any Department, moving to humans only when needed. Sometimes you can't add a static chatbot to a Department because you developed specialized chatbots for each language. The solution is to have a static chatbot in the Department that understands the end-user language and then applies a query to discover the best chatbot that suits the user language.

Create a new Project

To use Tiledesk APIs or integrate your own chatbots is mandatory to signup a new user on . Then go to the console, available on the following link

After signup please follow the proposed wizard to create your first Tiledesk project

We choosed "Multilanguage Chatbot" as Project name:

image

As soon as you create the project you will be redirected to the project home (for this tutorial you can jump the last step, relative to the widget installation).

Create the Language-Chooser chatbot

As first step we will create the Language Chooser chatbot. Select the chatbot icon on the left menu, then press the "ADD BOT" button:

Choose "Resolution bot" as type:

Set "Chooser" as the chatbot name and leave the other settings with their default value. Press "CREATE BOT":

When asked, choose "Activate bot". In this manner the new chatbot is immediatly available as soon as someone starts a new conversation.

Create a chatbot for English and Spanish

Let's create a couple of chatbots for English and Spanish.

Again, choose ADD BOT, the "Resolution bot", and choose a name for our first chatbot, "English bot". Choose English from the language dropdown menu.

In the intents list, select the "start" intent, and modify the reply so we understand that everything works fine in multi-language configuration.

The same for Spanish:

With the Spanish salutation message:

This is the final chatbots list, with the Chooser bot and the two English and Spanish chatbots.

Create the backend on Replit

Develop the 'choosing' logic. Let's fork!

https://replit.com/@tiledesk/chooser-chatbot#index.js

Refer to section "SELECT LANGUAGE FOR RESOLUTION BOTS" because we are using the Resolution bot for this example.

The endpoint is the app.post('/lang_select_resolutionbot'...

NOTE: There is also another tutorial with similar code but designed for external chatbots (that is, your custom chatbots).

The code is explained in the following picture:

Now you must connect this endpoint to the Chooser bot. Go in the Chooser bot view, enable Fullfilment and set the url corresponding to your forked replit. In our case the url is the following:

{YOUR-REPLIT-APP-ENDPOINT}/lang_select_resolutionbot

Let's run

To run simply choose the "Simulate visitor" button on top of the console. Set your browser language to "Spanish" or "English", then reload the page with the specific language and start a new conversation. The Chooser chatbot will do his task, choosing the right bot for you!

See you on our next tutorial!

Do you have suggestions on this article? Please send us your feedback writing an email to info@tiledesk.com

image
image
image
image
image
image
image
image
image

To integrate an external bot, we'll need a web application endpoint where all the chatbot's requests will be forwarded. We'll use the service to fast create our own NodeJS web application endpoint.

image

*

image

If you have any problems do not esitate to write us on our !

Repl.it
Community forum
Tiledesk
https://panel.tiledesk.com/v3/dashboard
image