Live Chat - Odoo 20 Community Book

The Channel Form

The button New opens the form of a channel. Its title is the name of the channel, and its four tabs hold the agents, the options, the rules and the widget. The button at the top reads Join Channel while the user is not part of the team and Leave Channel when the user is. A saved channel also shows the smart button Sessions, with the share of happy ratings, and the smart button Chatbots when the channel uses one.

Agents

The tab Agents lists the people who answer the chat. Each line shows the Agent, the Languages that the person speaks, the Expertise and the number of Ongoing Sessions. The link Add a line opens a window, Add: Agents, with the users who may be added, among them their login, role and status. In the example, Mitchell Admin and Marc Demo form the team.

odoo Development odoo Development

Join or Leave Channel (1). Puts the signed in user in the team or takes the user out.

Channel Name (2). The name shown in the list and in the reports. It is not shown to the visitor.

Agent (3). A user of the channel. A user needs to be online, which means active in Odoo during the last 30 minutes, to receive chats.

Expertise (4). The subjects of the agent, such as Discuss or Livechat, which are managed in the menu Expertise.

Ongoing Sessions (5). The number of conversations that the agent is handling now.

Agents Connected (6). Under the table, the count of agents who are online, and the number of ongoing sessions of the whole channel. The note beside them explains that an agent who is inactive in Odoo for more than 30 minutes is considered disconnected.

Options

The tab Options sets what the visitor reads and sees. The block Live Chat Button has the Notification Text, which is the small sentence shown next to the button, and the Button Colors. The block Live Chat Window has the Welcome Message, which is the first line of every chat, the Window Colors, and a Review Link. The Review Link is an optional address, which must start with http:// or https://. A visitor who gives a positive rating is taken to it, in a new tab, when the feedback is sent. It suits a company that wants happy customers to leave a public review. It is left empty in the example, with the text Do not redirect visitors. The block Session Limits has Sessions per Operator, which is Unlimited or Limited, and the box No Chats During Call, which keeps an agent who is on a call from receiving new conversations.

In the example, the notification reads Questions about oak? Chat with us. and the welcome message reads Hello! How can the Oakline team help you today?

odoo Development

Notification Text (1). The sentence next to the button.

Button Colors (2). The two colors of the button.

Welcome Message (3). The first message that the visitor sees.

Window Colors (4). The two colors of the chat window.

Review Link (5). An address, such as a page of public reviews, that opens in a new tab after a positive rating.

Sessions per Operator (6). The limit of chats that one agent handles at the same time. When it is set to Limited, a field Maximum Sessions appears.

No Chats During Call (7). Keeps an agent who is on a call out of the new chats.

Rules

The tab Rules decides on which pages the chat is shown. Each line has the Live Chat Button action, an optional Chatbot, a URL Regex and the Countries. The note under the table explains that a URL regex such as /shop matches any page that starts with /shop, that an empty field applies the rule to all pages, and that country rules need GeoIP on an own server.

odoo Development

A click on Add a line opens the window Create Rules. The field Live Chat Button has four choices: Show, which displays the button; Show with notification, which also displays the notification text next to it; Open automatically, which opens the chat window by itself; and Hide, which removes the button on the pages that match. The buttons Save and Close, Save and New and Discard finish the window. In the example, a rule shows the button with its notification on every page that starts with /shop, so a buyer who is looking at the products is invited to ask.

odoo Development odoo Development

The choice Open automatically adds a field, Time to Open, which is the number of seconds that the window waits after the page has loaded. The window opens by itself only once for each visitor, on a screen that is not a phone, while an agent is online and the visitor has no chat in progress. A visitor to whom the window has already opened once finds only the button on the next visit. The choice Hide removes the button on the pages that match. In the example, the shop opens the chat automatically and the jobs pages hide the button, because a person who looks for a job does not need the sales team. A chat that is already open stays on the screen when the visitor moves to a hidden page, and it ends only when the visitor closes it.

odoo Development odoo Development odoo Development odoo Development

The rules are read from the top, and the handle at the left of each line changes the order, so when two rules match the same page the one that is higher wins. The field Countries limits a rule to visitors from the chosen countries. For example, a rule that hides the button for Belgium and the United States hides it only for visitors who are located in these two countries. Odoo finds the country of a visitor with GeoIP, which an own server must have installed, and without it a rule that has countries is ignored. Odoo first looks for a rule that names the country of the visitor, and when there is none it uses the rules without countries. When a chatbot is chosen in a rule, a field Enable Chatbot decides when the bot answers: Always, Only when no operator is available, or Only when an operator is available. The first choice makes the bot welcome everybody, and the second lets it take over when the team is offline. On a small screen, the choice Open automatically behaves like Show, so a phone user is never interrupted by a window.

Widget

The tab Widget appears after the channel is saved. It explains how to put the chat on a site. For a website built with Odoo, the steps are to go to Website > Configuration > Settings, to turn on the feature Live Chat and to choose the channel, which section 3 shows. For any other website, the tab gives a block of code to add to the head of the pages, with an icon that copies it. Under it, a link of the form www.example.com/im_livechat/support/4 can be shared by email, so that a customer opens a page that holds only the chat.

odoo Development

How a Chat Reaches an Agent

When a visitor writes the first message, Odoo chooses one agent of the channel. Only agents who are online can be chosen, and an agent is online while the user is active in Odoo. Two settings of the tab Options narrow the choice further. With Sessions per Operator set to Limited, a field Maximum Sessions appears, with 10 as the starting value, and it must be greater than zero. An agent who already has that number of ongoing chats is not offered new ones until a chat ends, and the count only includes chats that had activity in the last 15 minutes. With No Chats During Call ticked, an agent who is on a call is skipped, and comes back when the call ends. When no agent remains, the button is not shown, which the next section explains.

Among the agents who are left, Odoo prefers the person who fits the visitor best. It looks first for an agent who speaks the language of the visitor and has the subjects that the chat needs, which are the expertise. If none exists, it relaxes the conditions step by step: the language with at least one subject, the language alone, then the country of the visitor with the subjects, and finally the subjects alone. Among equal candidates it picks the agent with the fewest ongoing chats, and it avoids giving two new chats to the same agent within two minutes when someone else can take the second. A visitor who comes back is sent to the agent who handled the previous chat, when that agent is free enough to take it. This is why the languages and expertise of the tab Agents are worth filling in.

WhatsApp