Files
odoo_source/addons/im_livechat/security/ir.model.access.csv
T
Aurélien WarnonandPatrick Hoste ea680d8595 [IMP] im_livechat: introduce chatbot scripts
PURPOSE

This commit introduces a chatbot operator that works based on a user-defined
script with various steps.

SPECS

A im_livechat.chatbot.script can be defined on a livechat rule.
When a end-user reaches a website page that matches the rule, the chat window
opens and the script of the bot starts iterating through its steps.

The chatbot code is currently directly integrated with the existing livechat
Javascript code.
It defines extra conditions and layout elements to be able to automate the
conversation and register user answers.

AVAILABLE STEPS

A script is defined with several steps that can currently be one of the
following types:

"text"

A simple text step where the bot posts a message without expecting an answer
e.g: "Hello! I'm a friendly robot!"

"question_selection"

The bot will ask a question and suggest answers, the end-user will have to
click on the answer he chooses
e.g: "How can I help you?
  -> Create a Ticket
  -> Create a Lead
  -> Speak with a human"

"question_email"

That step will ask the end user's email address (and validate it)
The result is saved on the linked im_livechat.im_livechatchatbot.mail.message

"question_phone"

Same logic as the 'question_email' for a phone number
We don't validate the input this time as it's a complicated process
(requires country, ...)

"forward_operator"

Special type of step that will add a human operator to the conversation when
reached, which stops the script and allow the visitor to discuss with a
real person.

The operator will be chosen among the available operators on the
livechat.channel.

If there is no operator available, the script continues normally which allows
to automate an "answering machine" that will redirect the user in case no
operator is available.

e.g: "I'm sorry, no operator is available right now, please contact us by email
at 'info@company.com', we will try to respond as soon as possible!".
(Or even something more complex with multiple questions / paths).

"free_input_single"

Will ask the visitor for a single line of text.
This text is not saved anywhere else than in the conversation, but it's still
useful when combined with steps that create leads / tickets since those print
the whole conversation into the description.

"free_input_multi"

Same as "free_input_single" but lets the user input multiple lines of text.
The frontend implementation is made by waiting a few seconds (currently 10) for
either the next submitted message or the next character typed into the input.

This lets visitors explain their issue / question with multiple messages.
Which is very useful since new messages are sent every time you press "Enter".

LINKS

Task-2030386

Part-of: odoo/odoo#84000
Co-authored-by: Patrick Hoste <pko@odoo.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
2022-04-01 18:49:56 +02:00

1.7 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2access_livechat_channelim_livechat.channelmodel_im_livechat_channel1000
3access_livechat_channel_userim_livechat.channel.usermodel_im_livechat_channelim_livechat_group_user1110
4access_livechat_channel_managerim_livechat.channel.managermodel_im_livechat_channelim_livechat_group_manager1111
5access_livechat_support_report_channelim_livechat.report.channelmodel_im_livechat_report_channelim_livechat_group_manager1111
6access_livechat_support_report_operatorim_livechat.report.operatormodel_im_livechat_report_operatorim_livechat_group_manager1111
7access_livechat_channel_ruleim_livechat.channel.rulemodel_im_livechat_channel_rule1000
8access_livechat_channel_rule_userim_livechat.channel.rulemodel_im_livechat_channel_ruleim_livechat_group_user1110
9access_livechat_channel_rule_managerim_livechat.channel.rulemodel_im_livechat_channel_ruleim_livechat_group_manager1111
10access_chatbot_scriptchatbot.scriptmodel_chatbot_script1000
11access_chatbot_script_userchatbot.script.usermodel_chatbot_scriptim_livechat_group_user1111
12access_chatbot_script_stepchatbot.script.stepmodel_chatbot_script_step0000
13access_chatbot_script_step_userchatbot.script.step.usermodel_chatbot_script_stepim_livechat_group_user1111
14access_chatbot_script_answerchatbot.script.answermodel_chatbot_script_answer0000
15access_chatbot_script_answer_userchatbot.script.answer.usermodel_chatbot_script_answerim_livechat_group_user1111
16access_chatbot_message_allchatbot.messagemodel_chatbot_message0000
17access_chatbot_message_userchatbot.script.usermodel_chatbot_messageim_livechat_group_user1111