Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Go to Haptik Website
  • Contact Us
  • Home

What are the dos and don'ts for building a multilingual bot on Haptik?

Written by Soham Amburle

Updated on August 26th, 2022

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
    Build Deploy Analyse Manage Account Bot Deactivation
  • Bot Building
    Essentials Smart Skills Steps User Messages Bot Responses Entities Connections Customisations User feedback collection Testing Whatsapp Bots NLU Bot Maintenance
  • Smart Agent Chat
    Set up Admin Settings MyChats Section (Agent Inbox) Live Traffic Section Teams Section Archives Section Analytics Plans on Smart Agent Chat
  • Conversation Design
    Design Basics Design Guides Designing for Platforms Designing WhatsApp Bots
  • Developer Guides
    Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
  • Deployment
    Web SDK WhatsApp Facebook Instagram Sunshine Conversation LINE Google Business Messages Telegram MS Teams Bot as an API iOS SDK Android SDK
  • External Agent Tool Setup
    Zendesk Chat Salesforce Service Cloud Freshchat Zoho NICE CXOne Gorgias
  • Analytics & Reporting
    Intelligent Analytics
  • Notifications
    SMS Notifications Success Measurement
  • Commerce Plus
    Catalog Integration Bot Building Guide Channel Deployments Unified ML Pipeline Documentation
  • Troubleshooting Guides
    Error Messages FAQs
  • Release Notes
+ More

Dos for multilingual bots

  • Once the bot is ready in English, then you can add languages from the Edit bot option.

Don'ts for multilingual bots

  •  Do not add User Messagesin languages other than English.
  •  In the case of Words and Phrases entity, do not add dictionary in languages other than English.

Limitation

There is a Limitation to Multilingual bots. 

When the user initiates the chat with the bot with just one Non-English word, the bot won't be able to detect what the user intends, and it would lead to a Bot Break, or the Bot might respond with a Smart Assist, depending on how it is configured. 

On the other hand, the bot would comprehend a Non-English sentence very well at the initiation of the chat, since the bot would have enough information to understand what that sentence is, and what the user is requesting.

Example: 

  • If the user initiates the chat with Oi, which means Hi in Portuguese, the bot won't be able to understand what the user intends to say, as Oi might have many meanings and it is not clear as to what meaning implies here.
  • But on the contrary, if the user initiates the chat with Oi preciso de ajuda, which means Hi I need help. In this case, the bot has enough information to understand what the user intends to say.
  • The bot would respond accordingly and would give a befitting response in the chat.

Solution

There is a solution for this limitation. 

  • Here, you would have to add a Smart Skill "Language Switcher" in the bot and link it with all the languages your bot supports.
  • Open the static step "language change detect" and open the bot responses.
  • Open the entity "language_switch_detection", and take the backup of the dictionary.
  • Create a new "Words and Phrases" type of entity, and upload this backup in its dictionary. 
  • Configure your response, and you are done.

So every time the user would initiate the chat with Non-English words, this Language Detection step would get triggered, and it would identify the language.

Once, the language has been identified, the bot would understand the meaning as well as the intent of the message, and accordingly, the bot would give the response to the user. 

Example: 

  • In the image shown below, you can see the user has typed Hola, which means Hi in Spanish, after which the bot asked the user which language the user wants to switch to?
  • In the Message Log, you can see that the user message Spanish triggered the language change detect step, which later triggered the lang code step, and it detected the language to be Spanish.
  • Once the bot has detected the language, it gave a response as Tu idioma ha sido cambiado a español, which means Your language has been changed to Spanish.
  • So you see, this saved the chat, and the language detection step avoided the Bot break situation.
Delete

Note:

Another way of deploying a multilingual bot on your website is by setting the language of the bot through lang_code, as shown In the code.

You can add this script to the webpage where your multilingual bot has been deployed. 

<script>
      let changed_language = localStorage.getItem("bot_language")
      let lang_code = ['en','fr'] // Add more languages supported by the chatbot in future
      let sPageURL = window.location
      sPageURL = decodeURI(sPageURL);
      let sURLVariable = sPageURL.split('/')[3];
      if (sURLVariable != null && sURLVariable != changed_language && (lang_code.indexOf(sURLVariable) >= 0)){
        localStorage.setItem("bot_language", sURLVariable);
        document.addEventListener('haptik_sdk', function() {
          HaptikSDK.changeLanguage(sURLVariable)
        });
      }
      else if ((lang_code.indexOf(sURLVariable) == -1) && changed_language != 'en') {
        localStorage.setItem("bot_language", 'en');
        document.addEventListener('haptik_sdk', function() {
        HaptikSDK.changeLanguage('en')
        }); 
      }
  </script>

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • How to build Multilingual bots?
  • How to build voice bots?

Platform

  • Conversation Studio
  • Smart Skills
  • Advanced NLU
  • Intelligent Analytics
  • Omnichannel
  • Smart Agent Chat
  • Enterprise Security
  • Integrations

Solutions

  • Conversational Commerce
  • Lead Generation
  • Customer Care
  • WhatsApp
  • Conversational IVR
  • Google Business Messages

Industries

  • Retail/ E-Commerce
  • Financial Services
  • Travel & Hospitality
  • Telecom

Knowledge

  • ROI Calculator
  • Reports & Research
  • Case Studies
  • Webinars
  • ISAT
  • Tech Blog
  • Business Blog
  • Resources
  • Haptik v/s Yellow
  • Haptik v/s Liveperson
  • Haptik v/s IBM Watson
  • Haptik v/s Verloop
  • Conversations on AI

Company

  • Why Haptik
  • About Us
  • Careers
  • News & Media
  • Awards & Recognition
  • Contact Us
  • Partnerships
  • Investor Relations

Subscribe

Sign up to recieve the latest updates

Find us on

  • Twitter-footer
  • Linkedin-footer
  • YT-footer
  • Insta-footer
  • G2-footer
  • Facebook-footer

Knowledge Base Software powered by Helpjuice

Copyright © jio Haptik Technology Limited 2021 | Data Security & Privacy Policy | GDPR

North America | Asia Pacific | Africa | enterprise@haptik.ai

Definition by Author

0
0