Chatbots (Third-Party)¶
Set up a connection to a third-party chatbot that talks to your customers before (or instead of) an agent. If you want to build a bot directly in Daktela instead, use Decision trees.
Chatbot connections are available for web chat, Facebook Messenger, Instagram DM, SMS, Viber and WhatsApp, and are set up separately for each channel.
To set up chatbots, go to Settings β Routings β your channel β Chatbots (e.g. Settings β Routings β Web chats β Chatbots). You will see an overview of your chatbots.
Click the Title of a chatbot to open its details or click Add new to create a new one. The chatbot details will open.
Warning
When you are done creating or editing a chatbot, click Save to return to the chatbot overview and make sure to click the Apply configuration changes button in the top right corner.

For web chats, it will take a few minutes for the changes to take effect on your website. If you want to see them immediately, open your website in a new incognito mode window.
Chatbot Details¶
Set up your chatbot in the Sandbox column. If you are editing a chatbot, you can compare your new settings to those currently in use in the Production column.
Title: enter a title.
Description: enter a description.
Fallback: select where the conversation should be routed if the Callback URL is not available.
Callback URL: enter the endpoint where data from the chatbot should be sent. Filled in automatically β you do not need to change it.
Chatbot URL: enter the URL of your chatbot.
Send start message: forward the client initialisation message (if it exists) as part of the first chatbot request.
Send attachments: send the structure of any attachments the client sends.
Send customFields: select the custom input fields that should be sent to the chatbot.
Structure of Data Sent to the Chatbot¶
- message = message object
- interaction = interaction object
- ? = if empty, null is sent
'?name' => '{{message.name}}',
'?time' => '{{message.time_created}}',
'?direction' => '{{message.direction}}',
'conversation.name' => '{{interaction.name}}',
'conversation.title' => '{{interaction.title}}',
'conversation.time' => '{{interaction.time}}',
'conversation.response_url' => '{{config.callback}}?hash={{interactionHash}}',
'text' => '{{text}}',
'attachments' => object array, each object contains: 'title', 'type', 'size', 'link'
'quickreply.name' => value from the button, the button text is not sent
'conversation.customFields' => object array, each object contains: 'title', 'name', 'value'
'referer' => {{interaction.options.referer}} (web chat only)
Example 1 β text message and a list of attachments:
POST chatbotURL
{
"name": "messages_62fe1518a9820077126134",
"time": "2022-08-18 12:31:52",
"direction": "IN",
"conversation": {
"name": "web_62fe14acd567e380992326",
"title": "",
"time": "2022-08-18 12:30:04",
"response_url": "https://XXX.daktela.com/external/web/api/chatbotUpdate?hash=b9f68fa377263e8f3018a405f25f44add10fab4c",
"customFields": [
{
"name": "number",
"title": "Number we want to know",
"value": "22"
},
{
"name": "...",
"title": "....",
"value": "...."
}
]
},
"text": "xxx",
"attachments": [
{
"link": "https://xxx.daktela.com/external/web/chat_file.php?accessToken=on87q29oq60q02nqo6nr3oo7s5r7r607&chat=web_62fe14acd567e380992326&mapper=chatsMessage&name=29",
"title": "Name of screenshot.png",
"type": "image/png",
"size": "122221"
},
{
"link": "...",
"type": "....",
"size": "...."
}
],
"referer": "https://xxx.com/demo/chat.html"
}
Example 2 β pressed quick reply button:
POST chatbotURL
{
"name": "messages_62fe1518a9820077126134",
"time": "2022-08-18 12:31:52",
"direction": "IN",
"conversation": {
"name": "web_62fe14acd567e380992326",
"title": "",
"time": "2022-08-18 12:30:04",
"response_url": "https://XXX.daktela.com/external/web/api/chatbotUpdate?hash=b9f68fa377263e8f3018a405f25f44add10fab4c",
"customFields": []
},
"quickreply": {
"name": "quickReplyName1"
},
"referer": "https://xxx.com/demo/chat.html"
}
Expected Structure of Received Data¶
'conversation.name' β interaction name
'hash' β identifies into which conversation the incoming message belongs
'text' β incoming message
'transfer' β name of queue where the conversation should be transferred
'quickreply' β object array, each object contains 'text' and 'value' attributes β corresponds to 'suggestedAnswers' in our application
'button' β object array, each object contains 'text' and 'url' attributes β a <a href class=button> button sent in the message
Example response:
POST https://XXX.daktela.com/external/web/api/chatbotUpdate
{
"conversation": {
"name": "web_62fe14acd567e380992326"
},
"text": "textMessage",
"button": [
{
"text": "xxx.com",
"url": "https://xxx.com/api/"
},
{
"text": "...",
"url": "...."
}
],
"quickreply": [
{
"name": "quickReplyName1",
"text": "Quick reply Name 1"
},
{
"name": "....",
"text": "...."
}
],
"queue": "10001",
"hash": "b9f68fa377263e8f3018a405f25f44add10fab4c"
}