Advanced chatbot features
Serve several languages, use AI and your knowledge base, keep contacts, show a privacy notice, and call a chatbot from your own systems.
This page covers chatbot features beyond intents and replies. Each section says what Buni.ai does for you and what you still build in the flow.
Languages
Buni.ai works out which language each conversation is in and makes it available to your flow. It does not translate your replies for you.
How the language is decided
On every message, Buni.ai sets {{state.lang}} to a two-letter language code, such as en, fr or sw. It decides in this order:
- The person asked for a language, for example "French please", "kiswahili" or "reply in English". Requests for English, French, Kinyarwanda, Swahili and Portuguese are recognised.
- The language of this message, when the message is long enough to tell. Short replies such as "ok", "2" or a tapped button never switch the language.
- The language the conversation has been using.
- The language stored on the contact from an earlier conversation.
- English, when there is nothing else to go on.
The language is saved to the contact, so a returning person starts in the language they used last time.
Replying in the right language
Reply nodes send their text exactly as written. To serve several languages:
- Branch on the language. Put a Router after an intent with a path per language, for example
{{state.lang}}equalsfr, each leading to a Reply in that language, and a default path for everything else. - Tell an AI Agent which language to use. In an AI Agent prompt, include
{{state.lang}}and ask it to answer in that language. - Translate the handoff messages. The Live Chat node's Fallback tab has Other languages: set Language comes from to
${state.lang}and add a transfer message, fallback message and wait reminder per language code. Missing translations fall back to the base message.
In the Inbox, agents can translate a conversation they are working on. See AI drafts and translation.
Intents in several languages
Intent recognition uses a language model that treats your sample utterances as examples. Add sample utterances in each language you expect, and test each language in the simulator before relying on it. The Intent node's Locale field sets the intent's language variant.
AI answers and your knowledge base
An AI Agent node lets the bot answer open questions in its own words. Common uses in a chatbot:
- Answer from your documents. Attach knowledge base documents so the agent answers from your content rather than general knowledge.
- Handle the fallback. Connect your fallback intent to an AI Agent, so questions no intent covers still get an answer grounded in your documents.
- Call your systems. Give the agent access to APIs, integrations and data stores so it can look things up while it answers.
Keep a Live Chat path for questions the agent cannot answer.
Contacts
Each conversation creates or updates a contact for the person, keyed by their phone number or platform handle, and links the conversation to it. Use the Contact node to set more details, such as a name collected in a form, or to add the person to a group.
Privacy notice
In project Settings › Privacy, turn on Show a privacy notice to prepend a notice to the first message of each new conversation, on every channel. Because the bot records a contact on that first message, data-protection law generally expects people to be told at that point. See Privacy and data.
Conversations and state
- A conversation's state, including every
{{state.x}}value, is kept while the person keeps writing. After 30 minutes without a message, the next message starts a new session. - Values that must outlive a session belong in a Data Store or on the contact, not only in state.
- Intent parameters land in
{{state.variableName}}, wherevariableNameis the intent's output variable. See Where the values go.
Payments in a chat
The Collect Payment node requests a payment during the conversation: a mobile money prompt on the customer's phone, or a checkout link in the chat.
Satisfaction surveys
In project Settings › CSAT, choose a form to send when an agent resolves a conversation. See CSAT.
Learn from real conversations
In project Settings › General, turn on Use this project's conversations to suggest improvements. When you ask Buni to improve the flow, it can then use the messages the bot failed to understand. Only those messages are used, and nothing is shared with other projects or organizations.
Call the bot from your systems
Chatbot projects have a Settings › API Access tab for calling the project through the Buni.ai Public API. See Project API settings.