[IMP] Livechat: chatbots 17.0

closes odoo/documentation#8306

Signed-off-by: Samuel Lieber (sali) <sali@odoo.com>
Co-authored-by: larm-odoo <121518652+larm-odoo@users.noreply.github.com>
Co-authored-by: ksc-odoo <73958186+ksc-odoo@users.noreply.github.com>
Co-authored-by: Sam Lieber (sali) <36018073+samueljlieber@users.noreply.github.com>
This commit is contained in:
jero-odoo 2024-03-21 14:28:43 -04:00
parent ee735a813f
commit c54584a3f0
7 changed files with 86 additions and 65 deletions

View File

@ -8,8 +8,8 @@ response, and lead them through a series of questions and answers the same way a
would. would.
Chatbots can be customized to fill various roles, from customer support, to creating leads, to Chatbots can be customized to fill various roles, from customer support, to creating leads, to
collecting contact information. The goal of the chatbot depends on the page of the website they are collecting contact information. The goal of each chatbot can vary based on several criteria,
assigned, and the messages included in the script, among other criteria. including the webpage where it is located, and the information it captures.
.. image:: chatbots/chatbot-visitor-view.png .. image:: chatbots/chatbot-visitor-view.png
:align: center :align: center
@ -19,25 +19,21 @@ Build a chatbot
=============== ===============
Before creating a new chatbot, the *Live Chat* application must first be installed on the database. Before creating a new chatbot, the *Live Chat* application must first be installed on the database.
This can be done directly from the :menuselection:`Apps` menu by searching for `Live Chat` in the This can be done directly from the :menuselection:`Apps` application, by searching for `Live Chat`
:guilabel:`search bar` and clicking :guilabel:`Install`. in the :guilabel:`Search...` bar, and clicking :guilabel:`Install`.
Alternatively, *Live Chat* can be installed and enabled by navigating to the :menuselection:`Website Once the *Live Chat* application has been installed on the database, go to :menuselection:`Live Chat
application --> Configuration --> Settings`, and checking the box labeled :guilabel:`Livechat`. Once app --> Configuration --> Chatbots`.
enabled, the database will refresh, and the *Live Chat* application is accessible.
Once the *Live Chat* application has been installed on the database, open it, and go to
:menuselection:`Configuration --> Chatbots`.
.. note:: .. note::
When the *Live Chat* app is installed, a sample chatbot is created, named *Welcome Bot*. This When the *Live Chat* app is installed, a sample chatbot is created, named *Welcome Bot*. This
chatbot has a pre-configured script that walks through a few basic steps, including asking for a chatbot has a preconfigured script that walks through a few basic steps, including asking for a
visitor's email address, and forwarding the conversation to an operator. visitor's email address, and forwarding the conversation to an operator.
*Welcome Bot* can be used as a starting point. The existing steps can be edited or removed, and *Welcome Bot* can be used as a starting point. The existing steps can be edited or removed, and
new steps can be added to customize the script, as needed. new steps can be added to customize the script, as needed.
*Welcome Bot* can be deleted (or archived). *Welcome Bot* can be deleted or archived, if necessary.
.. image:: chatbots/chatbot-welcome-bot.png .. image:: chatbots/chatbot-welcome-bot.png
:align: center :align: center
@ -52,35 +48,35 @@ the :guilabel:`Edit Image` icon in the upper right corner of the form to add a p
Chatbot scripts Chatbot scripts
--------------- ---------------
Once the new chatbot has been created and named, the next step is to create a script. Chatbot After the new chatbot has been created and named, the next step is to create a script. Chatbot
conversations follow an accompanying script. These scripts are comprised of lines of dialogue, each conversations follow an accompanying script. These scripts are comprised of lines of dialog, each
designed to either deliver or capture information. designed to deliver or capture information.
To create a chatbot script, navigate to the :guilabel:`Script` tab of the chatbot details page, and To create a chatbot script, click :guilabel:`Add a Line` in the :guilabel:`Script` tab of the
click :guilabel:`Add a Line` to open the :guilabel:`Create Script Steps` pop-up form. chatbot detail page, and a :guilabel:`Create Script Steps` modal appears.
This form must be filled out for each line of text (dialogue) that the chatbot could potentially
deliver during the conversation. This form must be filled out for **each** line of text (dialog) that the chatbot could deliver
during the conversation.
First, enter the content of the message in the :guilabel:`Message` field. Then, select an option First, enter the content of the message in the :guilabel:`Message` field. Then, select an option
from the :guilabel:`Step Types` drop-down menu. from the :guilabel:`Step Type` and :guilabel:`Only If` drop-down menus.
Step types Step types
~~~~~~~~~~ ~~~~~~~~~~
The :guilabel:`Step Type` selected depends on the intended purpose of the message. The available The :guilabel:`Step Type` selected depends on the intended purpose of the message. The available
options in the :guilabel:`Step Type` drop-down are listed below, as well as their use, and any options in the :guilabel:`Step Type` drop-down menu are detailed below:
additional information:
Text Text
**** ****
This step is used for messages where no answer is expected (or necessary). Text steps can be used This step is used for messages where no answer is expected or necessary. Text steps can be used for
for greetings and/or to deliver information. greetings, to offer resources, such as documentation, or provide links to specific web pages.
.. important:: .. important::
Text step types are only intended to deliver information, and do not allow for any visitor input. *Text* step types are only intended to deliver information, and do **not** allow for any visitor
As such, they need to be followed by additional steps to continue the conversation. input. As such, they **must** be followed by additional steps to continue the conversation.
Question Question
******** ********
@ -88,9 +84,20 @@ Question
This step asks a question and provides a set of answers. The visitor clicks on one answer, which This step asks a question and provides a set of answers. The visitor clicks on one answer, which
either leads to a new step in the conversation, or can lead to an optional link to a new webpage. either leads to a new step in the conversation, or can lead to an optional link to a new webpage.
Enter the question in the :guilabel:`Message` field. Then, under the :guilabel:`Answer` heading,
click :guilabel:`Add a Line` to create a blank answer line.
Proceed to enter the answer as it should appear to the visitor. To turn the answer into a link that
redirects the visitor when selected, add the URL to the answer line under the :guilabel:`Optional
Link` heading.
Repeat these steps for every answer to be included for the question.
Click :guilabel:`Save & Close` or :guilabel:`Save & New`.
.. tip:: .. tip::
It is helpful to add a catchall answer to question steps (ex: "Something else"). This helps It is helpful to add a catchall answer to question steps (e.g: `Something else`). This helps
visitors continue the conversation, even if their needs don't exactly fit with any of the other visitors continue the conversation, even if their needs do not exactly fit with any of the other
answers. answers.
Email Email
@ -99,7 +106,7 @@ Email
This step prompts visitors to provide their email address, which is stored and can be used by team This step prompts visitors to provide their email address, which is stored and can be used by team
members later to follow up with additional information. members later to follow up with additional information.
The only accepted inputs for this step type are email addresses that are in a valid format. If a The **only** accepted inputs for this step type are email addresses that are in a valid format. If a
visitor attempts to enter anything other than a valid email address, the chatbot responds with a visitor attempts to enter anything other than a valid email address, the chatbot responds with a
message stating it does not recognize the information submitted. message stating it does not recognize the information submitted.
@ -111,24 +118,26 @@ Phone
***** *****
Similar to email, this step type prompts the visitor to enter their phone number, which can be used Similar to email, this step type prompts the visitor to enter their phone number, which can be used
at a later time to follow up with additional information, or to schedule demos, and more. to follow up with additional information, schedule demos, and more.
.. warning:: .. warning::
Due to the vast number of formats used for phone numbers worldwide, responses to this step type Due to the vast number of formats used for phone numbers worldwide, responses to this step type
are **not** validated for formatting. are **not** validated for formatting, and can include both numbers and special characters.
Forward to Operator Forward to Operator
******************* *******************
This step forwards the conversation to an active live chat operator, so that they can continue This step forwards the conversation to an active live chat operator, so they can continue
assisting the visitor. As the conversation transcript is passed on to the operator they are able to assisting the visitor. As the conversation transcript is passed on to the operator, they can pick up
pick up where the chatbot left off. This not only saves time for all parties involved, it can also where the chatbot left off. This not only saves time for all parties involved, it can also help
help qualify conversations before they reach live human operators. qualify conversations before they reach live operators.
.. note:: .. note::
If no active operator is available on the channel, the chatbot continues the conversation with If no active operator is available on the channel, the chatbot continues the conversation with
the visitor. Therefore, additional steps should be added after this one to ensure that there is the visitor. Therefore, additional steps should be added after this one to ensure there is no
no abrupt end to the conversation. abrupt end to the conversation. The additional steps can both inform visitors about the lack of
available operators (e.g. `Uh-oh, it looks like none of our operators are available`) and
continue the conversation (e.g. `Would you like to leave your email address?`).
.. image:: chatbots/chatbot-no-operator.png .. image:: chatbots/chatbot-no-operator.png
:align: center :align: center
@ -137,42 +146,49 @@ help qualify conversations before they reach live human operators.
Free Input/Multi-Line Free Input/Multi-Line
********************* *********************
The free input step allows visitors to respond to questions without providing pre-written responses. The *free input* step allows visitors to respond to questions without providing pre-written
Information provided in these responses is stored in the chat transcripts. responses. Information provided in these responses is stored in the chat transcripts.
Choose between :guilabel:`Free Input` and :guilabel:`Free Input (Multi-Line)` depending on the type Choose between :guilabel:`Free Input` and :guilabel:`Free Input (Multi-Line)` depending on the type
and amount of information being requested from the visitor. and amount of information the visitor is asked to provide.
Create Lead Create Lead
*********** ***********
This step creates a lead in the *CRM* application. Select an option from the :guilabel:`Sales Team` This step creates a lead in the *CRM* application. Select an option from the :guilabel:`Sales Team`
drop-down to assign the created lead to a specific team. drop-down field that appears to assign the created lead to a specific team.
.. note::
This step is **only** available if the *CRM* application is installed on the database.
Create Ticket Create Ticket
************* *************
This step creates a :doc:`ticket </applications/services/helpdesk/overview/receiving_tickets>` in This step creates a :doc:`ticket <../../services/helpdesk/overview/receiving_tickets>` in
the *Helpdesk* application. Select an option from the :guilabel:`Helpdesk Team` drop-down to assign the *Helpdesk* application. Select an option from the :guilabel:`Helpdesk Team` drop-down field that
the created ticket to a specific team. appears to assign the created ticket to a specific team.
.. note::
This step is **only** available if the *Helpdesk* application is installed on the database.
Only if Only if
~~~~~~~ ~~~~~~~
Chatbot scripts operate on an if/then basis, which means the next question presented to the visitor Chatbot scripts operate on an if/then basis, which means the next question presented to the visitor
is determined by the answer they provide to the previous question. is determined by the answer provided to the previous question.
To continue the progression of the conversation, the form for a new step contains a field labeled To continue the progression of the conversation, the :guilabel:`Create Script Steps` form for a new
:guilabel:`Only If`. This field is where the progression of questions is defined. step contains a field labeled :guilabel:`Only If`. This field is where the progression of questions
is defined.
If a step is intended to follow all of the previous messages, this field can be left empty. However, If a step is intended to follow all of the previous messages, this field can be left empty. However,
if a message should **only** be sent conditionally, based on a previous response (or several if a message should **only** be sent conditionally, based on a previous response, or several
previous responses), those responses need to be added to this field. previous responses, those responses **must** be added to this field.
.. important:: .. important::
If there are any selections made in the :guilabel:`Only If` field, the step will **not** be shown If any selections are made in the :guilabel:`Only If` field, they must **all** be selected during
in a conversation unless **all** of the answers have been selected. Only include selections in the conversation *before* this step will be included. Only include selections in this field if
this field if they are necessary for this step to be displayed. they are necessary for this step to be displayed.
.. example:: .. example::
In the *Welcome Bot* script, a visitor can ask about pricing information. If the visitor selects In the *Welcome Bot* script, a visitor can ask about pricing information. If the visitor selects
@ -198,15 +214,14 @@ previous responses), those responses need to be added to this field.
Script testing Script testing
-------------- --------------
In order to ensure all visitors have a satisfactory experience with the chatbot, each message needs To ensure all visitors have a satisfactory experience with the chatbot, each message needs
to lead to a natural conclusion. Chatbot scripts should be tested to confirm there are no dead-ends, to lead to a natural conclusion. Chatbot scripts should be tested to confirm there are no dead-ends,
and to get an understanding of what the visitor sees when they interact with the chatbot. and to understand what the visitor sees when they interact with the chatbot.
.. important:: .. important::
If there is an answer or input provided by the visitor that is **not** assigned a corresponding If the visitor provides an answer, or input, that is **not** assigned a corresponding follow-up
follow-up response, the conversation stops (*dead-end*). Since the visitor cannot re-engage the response, the conversation stops (*dead-ends*). Since the visitor cannot re-engage the chatbot,
chatbot, they will have to re-start the conversation, by refreshing the chat window, or their they must restart the conversation by refreshing the chat window, or their browser.
browser.
To test the performance of a chatbot, first click on the :guilabel:`Test` button at the top-left of To test the performance of a chatbot, first click on the :guilabel:`Test` button at the top-left of
the chatbot script page. Then, upon being redirected to the testing screen, answer the chatbot the chatbot script page. Then, upon being redirected to the testing screen, answer the chatbot
@ -222,15 +237,21 @@ Add chatbot to a channel
After a chatbot has been created and tested, it needs to be added to a live chat channel. After a chatbot has been created and tested, it needs to be added to a live chat channel.
First, open the :menuselection:`Live Chat` application, and select the kanban card for a First, open the :menuselection:`Live Chat` application, find the Kanban card for the appropriate
:guilabel:`Channel`, or create a :doc:`new one </applications/websites/livechat>`. Click on the live chat channel, hover over it, and click the :guilabel:`⋮ (three dots)` icon to open the
:guilabel:`Channel Rules` tab. Then, open an existing rule, or create a new one by clicking drop-down menu. Click :guilabel:`Configure Channel` to open the channel detail form.
:guilabel:`Add a line`.
On the :guilabel:`Create Rules` pop-up detail form, choose the appropriate chatbot in the .. note::
:guilabel:`Chatbot` field. To create a new live chat channel, open the :menuselection:`Live Chat app` and click
:guilabel:`New`. See :doc:`Live Chat <../livechat>` for more information.
If the chatbot should **only** be active if there are no available live chat operators, check the Click on the :guilabel:`Channel Rules` tab. Then, open an existing rule, or create a new one by
clicking :guilabel:`Add a line`.
On the :guilabel:`Create Rules` modal, choose the appropriate chatbot in the :guilabel:`Chatbot`
field.
If the chatbot should **only** be active if there are no live chat operators available, check the
box labeled :guilabel:`Enabled only if no operator`. box labeled :guilabel:`Enabled only if no operator`.
.. image:: chatbots/chatbot-add-to-channel.png .. image:: chatbots/chatbot-add-to-channel.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 25 KiB