The information provided below is relevant to Dialogflow.
Set the location or region of your Dialogflow agent. This setting is optional if your agent location is set to global.
Trigger the Dialogflow Welcome Intent for new visitors. The option Settings > Messages > Welcome message must be active.
Send the user details of the registration form and email rich messages to Dialogflow.
Include the Dialogflow Intents into the saved replies. To access the saved replies option, go to Settings > Admin > Saved replies.
If you haven't created a chatbot yet, follow the instructions below to create your first one. The creation and management of your Dialogflow chatbot is handled entirely by Dialogflow. There are a lot of tutorials online that can help you create and configure your Dialogflow bot.
The following actions give the chatbot the ability to interact with the website autonomously on behalf of the user. To use an action go to Dialogflow, edit an Intent, and add a new Custom Payload response with the following syntax: { "ACTION-NAME": ACTION-VALUE }.
Action code | Description |
---|---|
{ "human-takeover": true } |
Disable the chatbot for 5 minutes, notify agents, and leave the conversation marked as unread. |
{ "disable-bot": true } |
Disable the chatbot for 5 minutes. |
{ "redirect": "URL" } |
Redirect the user to the given URL. Add the value "new-window": true to open the URL in a new window. |
{ "open-article": ID } |
Open the article with the given ID. |
{ "transcript": true } |
Generate the conversation transcript as a text file and download it. Set it to email to send the transcript to the user's email, add the value message: "Your message" to include a message in the email. |
{ "tags": ["Tag 1", "Tag 2"] } |
Assign tags to a conversation. |
{ "department": ID } |
Change or set the conversation department and notify the agents. |
{ "agent": ID } |
Change or set the agent assigned to the conversation and notify the agent. |
{ "send-email": { "recipient": "active_user", "message": "", "attachments": [] } } |
Send an email to the active user or agents. Attachments syntax: [["name", "link"], ["name", "link"],...]}. Recipient value can be active_user or agents. |
{ "update-user": true } |
Tells the admin area to update the user of the active conversation. Use this action in combination with other actions to update the user details of the admin area in real-time. |
{ "archive-chat": true } |
Archive the chat and send the close message if active. |
{ "update-user-details": { "email": "", "last_name": "", "first_name": "", "extra": { "phone": ["+123456789", "Phone"] }}} |
Update the details of the active user. You can update all details, including first_name, last_name, email, user_type, password You can update the user extra details, like the phone number, by entering the values into the extra key, the values must use the following syntax: "slug": [value, "label"]. Download an example here. To upload an Intent go to the Intents area and click the 3-dots menu icon on the top-right, then click Upload Intent. Start the conversation by sending the message "start". |
{ "update-user-language": "$language" } |
Update the user language, and the chatbot language if multilingual chatbots feature is active, to match the language requested by the user. The Dialogflow Entity value for the language is represented by the parameter $language. |
The fulfillment data sent to your webhook URL is like below:
{
"responseId": "4a58fc4f...",
"queryResult": { "queryText": "fullfilment",
"parameters": [],
"allRequiredParamsPresent": true,
"fulfillmentText": "Example",
"fulfillmentMessages": [{
"text": {
"text": ["Response"]
}
}],
"outputContexts": [{
"name": "projects/giis.ai...",
"parameters": {
"no-input": 0,
"no-match": 0
}
}],
"intent": {
"name": "projects/giis.ai...",
"displayName": "Fullfilment"
},
"intentDetectionConfidence": 1,
"languageCode": "en"
}, "originalDetectIntentRequest": {
"payload": {
"support_board": {
"conversation_id": "3002",
"user_id": "3777"
}
}
},
"session": "projects/example/agent/sessions/3777-3002"
}
The payload and session fields contain the ChatBot user ID and conversation ID.
When searching for a matching intent, Dialogflow scores potential matches with an intent detection confidence, also known as the confidence score. These values range from 0.0 (completely uncertain) to 1.0 (completely certain). Specify a value ranging from 0.1 to 1.0. Any answer provided by Dialogflow that is less than this value will not be considered. If you are utilizing Dialogflow alongside your OpenAI chatbot that is trained using your resources, it is recommended to configure the value as 0.81.
Knowledge Base are automatically enabled. Knowledge Base is a feature that gives your chatbot the ability to search within documents (such as a PDF) or web pages to find an answer. To create your first Knowledge Base, go to cloud.google.com/dialogflow/docs/knowledge-connectors
The full Dialogflow JSON response is automatically saved in the database, sb_messages, column payload.
Sometimes Dialogflow gives incorrect answers due to similar questions with different subjects. To solve this, you can instruct ChatBot to ignore an Intent if specific keywords are not present in the user's message. Here's how you can do it:
User attachments are sent to Dialogflow by appending the attachments to the message details in the following format:
[name:file-name.ext,url:URL,extension:file-extension]Example:
[name:archive.zip,url:https://Chatbot.inc/archive.zip,extension:zip] [name:license.pdf,url:https://Chatbot.inc/license.pdf,extension:pdf]
To allow the chatbot to send attachments, add a Custom Payload response and insert this JSON code:
{ "attachments": [["name", "YOUR-LINK"], ["name", "YOUR-LINK"], ["name", "YOUR-LINK"]]}Replace "name" with the actual name of the attachment to display and replace "YOUR-LINK" with the actual URL of the file. Images attachments are displayed automatically as images.
To allow Dialogflow to send rich messages, simply enter the rich message shortcode into the TEXT RESPONSE field or add a new Custom Payload response and insert this JSON code: { "rich-message": "shortcode" }. Replace "shortcode" with the rich message shortcode, to have a valid JSON code you need to replace all " chars with \". To obtain the shortcodes or to learn how to create a rich message, please click here.
When the user interacts with rich messages via the ChatBot chat (e.g. by clicking a button), the rich message response is sent to Dialogflow in the following format: ID|response, or ID if the rich message type is registration, email, follow up, in this case the rich message values are sent as array in the queryParams['payload'] key. ID is the rich message ID, which can be set by adding the attribute id="YOUR-ID" to the shortcode. If no ID has been set, a random ID will be used instead. response is the input or selection of the user. To block Dialogflow from replying to a rich message add a new intent with ID as the only user expression and no response.
If the user is interacting with the chatbot via a messaging app (e.g. WhatsApp), the response of the rich message does not contain the rich message ID and Dialogflow contexts must be used to allow Dialogflow to understand which Intent to activate for a specific rich message response.
To create a sequential survey like the one of the demo you need to enter the Rich message ID in the Training phrases, check the example below.
The feature Artificial Intelligence > Google > Multilingual checks if there is a Dialogflow agent in the user's language and activate it.
The automatic translation feature automatically translates user messages into agent language and agent messages into user language. To enable it check the option Settings > Artificial Intelligence > Automatic translation and complete the synchronization process. The multilingual via translation feature also requires these steps.
The feature at Settings > Artificial Intelligence > Multilingual via translation automatically translates user messages into the default language of Dialogflow or OpenAI, and translates Dialogflow or OpenAI messages into the language spoken by the user. Additionally, this feature translates all text displayed within the chat, such as the chatbot's rich messages, registration forms, and pop-up notifications. To enhance performance and minimize translation costs, the translations are automatically integrated into the translation files. Combine this feature with the language detection feature for optimal results.
Detect the language of the user' messages and change the user language and Dialogflow agent language accordingly, if available, otherwise, show a fallback message. You can use the following merge fields in the message: {language_name}.
The Google search features give your chatbot the ability to search for answers on Google and your website and automatically correct misspelled user questions. To start using it, follow the steps below.
In the case where Dialogflow is unable to find the appropriate response to the user's message, this function verifies if there are any spelling errors. If any such errors exist, Dialogflow is prompted again with the correctly spelled version of the message for an accurate response. Although it has a lower priority, this feature can still work together with the OpenAI Dialogflow spelling correction feature.
The Entities setting analyze the user's message and recognize and extract entities like cities, events, dates, and more. Use it to exclude invalid results returned by Google search. To enable this setting follow the steps below.