Skip to main content

AI chat on the storefront

The AI chat module puts a consultant widget on every page of the shop. It answers shoppers from the shop's own data — catalogue, stock, delivery and payment terms, site pages, order status — and hands the conversation over to a manager the moment a human is needed. The manager replies from the admin panel and the answer appears in the same chat window the shopper already has open.

What the shopper sees

  • A chat button in the bottom corner (left or right, in the colour you chose) with the greeting you wrote. The greeting is shown before any question and costs nothing.
  • Answers in the language of the question; product answers carry real links to the product card or the search results, so a "yes, I'll take it" ends in the cart, not in a questionnaire.
  • When the order form is enabled, the bot can offer a short name + phone form for the product under discussion — it works like "buy in one click" and the order lands in the normal orders list with the status "New".
  • Order status by order number and phone; a logged-in customer sees their own orders without re-typing the phone.
  • A "Call me" / "I need a manager's call" option and, after a handoff, the notice "Your request has been passed to a manager. The reply will appear here, in this window." Once a manager is on the line, the header says so and offers a "back to the bot" link.
  • If credits run out or the gateway is unreachable, the shopper sees your unavailability message instead of an error.

The chat widget on the storefront

Conversation history and the customer id live on the server only; the browser sends nothing but the question. A new tab continues the same conversation.

Where to configure it

Settings → AI chat (consultant) (/admin/ai-chat). The page opens with a Readiness card — four checks that must all be green before the widget will talk:

AI chat settings page

CheckWhat it means
Module enabledthe ai_chat module itself is on
headless_api activethe bot reads shop data only through this module's commerce adapter
Commerce adapter availablethe adapter answers
Walletthe shop's credit balance; Top up leads to the wallet

Below it, the Statistics card counts dialogs (total and today), handoffs and credits spent.

Widget

SettingMeaning
Show on sitethe master switch; off after installation, so a fresh install never spends the wallet on its own
Titlethe header of the chat panel
Greetingfirst message, shown before any question (free)
Input placeholderhint text in the message field
Positionright or left corner
Colouraccent colour of the button and panel

Behaviour

SettingMeaning
Instructions for the consultantyour own rules (working hours, wholesale only via a manager, …). They are added to the built-in rules but cannot override them: the bot never invents prices, stock or delivery times — it reads them from the shop
What the bot can doa checkbox per tool: product search, product card, stock by variant, category tree, delivery/payment/contacts, site-page search, order status, waybill tracking, the logged-in customer's orders, the in-chat order form, handoff to a manager. An unticked tool does not exist for the bot. Everything except the order form and the handoff is read-only
Hand over to a managercreate a thread in the dialogs and a CRM task when the shopper asks for a person
Order right in the chatshow the name + phone form for the chosen product
Unavailability messagewhat the shopper sees when credits are gone or the gateway is down

Limits

SettingDefaultMeaning
Dialog memory12previous turns kept in context; more is smarter and more expensive, because the history is sent every time
Steps per answer6how many times the bot may query shop data for one answer — a ceiling against a looping search quietly burning credits
Messages per session per hour40protection of the wallet against automated spam

The Dialogs button (/admin/ai-chat/dialogs) lists every conversation with its last activity, number of turns, credits spent, customer (id or guest) and whether it was handed to a manager; a row opens the transcript.

Handoff to a manager, both directions

  1. The shopper asks for a person (or the bot decides it cannot help, or the shopper asks the bot to place an order for them). With Hand over to a manager on, the module opens a thread in Messenger (dialogs) (/admin/messenger) tagged Site chat, with the transcript, and creates a CRM task.
  2. From that moment the shopper's messages go straight to the thread and do not call the AI model — so they cost no credits. The thread shows an unread counter.
  3. A manager opens the thread and types a reply. Nothing is "sent" anywhere: the reply is stored, and the widget picks it up itself every few seconds while the panel is open. The shopper sees it as coming from "Manager" — the operator's login name is never shown.
  4. The shopper can return to the bot at any time with the "back to the bot" link in the panel header.

Dialogs list with handoff marks

No notification yet

A handoff produces an unread thread in Messenger and a CRM task — no e-mail, SMS or Telegram alert to the manager. Someone has to be watching the dialogs.

What it needs

  • Four packages, not one: the ai_chat module, headless_api (the adapter the bot reads through), messenger (manager replies) and ai_content (the AI gateway). A missing one means a silent widget or an error instead of an answer. All are installed from the module store; ai_chat is a paid, licensed package.
  • Credits in the shop's wallet (Settings → Wallet). Every bot answer is charged to the wallet through the artexgroup.org AI gateway. You do not enter your own AI key anywhere — a key in a public widget would be visible to anyone. Current prices are shown in the store and the wallet, not here.
What the bot can touch

The list under "What the bot can do" is the complete list of what the module may do to the shop. It reads through the commerce adapter only; the in-chat order form is the single action that writes — and it writes a normal order, visible in the orders list like any other.