↑↓ selectEnter openEsc close

    1. Elbuz
    2. Website chat
    3. How to set up the chat widget on your website

    How to set up links from the chat to products and articles

    4 min readUpdated

    The Elbuz chat builds product and article links from the site address, language prefix and SEO URL, so a shopper who opened the chat on the Russian version of your site lands on the /ru/ product page, not the main one.

    When you need this:

    • Main language without a prefix, the second with /ru/ — the {site_url}/{language_code}/{url} template gets both right.
    • Chat products open on the wrong page — a template swaps the catalog address for your site's.
    • Products came from another site or marketplace — the link comes from that source.

    Where to start: “Links” tab → “Product URL template” → paste a template.

    What you can configure

    Templates take effect at once: the chat builds a link every time it shows a product or article, so the new address appears in the very next reply. You don't need to update the index or the code on your site.

    Site address

    The “Site address” field is on the “Setup” tab, in the “Site” card. It provides {site_url} in templates and, if there's no product template, the start of the product link. Enter the full address with https://: a trailing slash does no harm, the chat removes it.

    An empty address gives relative links like /smartfon-galaxy. They work on the site where the chat is installed, but not in messengers or emails. The video consultant SDK doesn't work without this address either: a warning appears on the “Avatar” tab.

    How to build a product link

    The chat builds product links from the “Product URL template” field. A template is an address in which the parts that differ for each product are written as macros in curly braces.

    Product URL template macros
    MacroWhat it's replaced withExample
    {site_url}“Site address” from the “Setup” tabhttps://myshop.com
    {language_code}the SEO prefix of the language of the page where the chat is open, from “Directories → Languages”. It isn't a language code: the main language's prefix is usually emptyru or nothing
    {url}the product's SEO URL from the catalogsmartfon-galaxy-a57
    {external_url}the product link from an external source (below)https://rozetka.com.ua/…
    {product_ext_url}the product card's “Link” field as is, unchangedthe full address from the card

    The typical template is {site_url}/{language_code}/{url}. The chat removes the double slashes you get when the prefix is empty: https://myshop.com//smartfon becomes https://myshop.com/smartfon.

    An empty template doesn't turn links off: the chat takes the site address and the product's SEO URL — https://myshop.com/smartfon. Such a link never has a language prefix, so a multilingual site needs a template.

    Template links are used by the product name and photo on chat product cards, the product card at the bottom of the conversation and AI replies in Telegram and Viber.

    The “Link templates” card: product, article and image templates, external source
    1Product template
    2Article template
    3External source
    4Image template
    1. The macros are explained under the field.
    2. The link the AI gives in its reply.
    3. The source code and template ID, for a link to the product in the source.
    4. The photo path from the catalog is put into the template.

    How language prefixes work

    {language_code} is the language's SEO prefix, the same one as in the prefix field in “Directories → Languages”. The chat takes the prefix of the language of the page where the chat is open; if a specific language is selected in “AI reply language”, it takes that language's prefix. The “Automatic: language of the customer's message” option doesn't change the prefix: a shopper on a Ukrainian page who writes in Russian gets a link without /ru/. A product's {url} SEO URL is the same in all languages; only the prefix differs.

    What the {site_url}/{language_code}/{url} template gives
    Conversation languagePrefix in “Languages”Link
    Ukrainian (main)emptyhttps://myshop.com/smartfon
    Russianruhttps://myshop.com/ru/smartfon

    Prefixes update in the widget automatically: every time you save a language in “Directories → Languages”, and every time the widget form is saved. Changed a prefix or added a language — there's nothing else to do.

    Article links

    When the AI finds the answer in an article, it adds a link to it to the reply. The address is built by the “Article URL template”:

    • {site_url}, {language_code} — the same as for products;
    • {url} — the article's SEO URL; if the article was imported from a full link, that link is kept;
    • {article_id} — the article number, for sites that build the address from the number.

    An empty template equals {site_url}/{url} — also without a language prefix. How to give the AI articles is explained in the article about the chat knowledge base.

    Links from another site or marketplace

    If products were imported from another site, each one has a link to its source — the source code, the template number and the product's link there. To make the chat use that link:

    1. Fill in “Source code (source_code)” and “Source template ID (source_id)”. Both fields are required: with only one, the link isn't looked up.
    2. Put {external_url} in “Product URL template”.

    A product without a link to this source gets a regular link to your site — from the site address and the product's SEO URL, as with an empty template.

    Along with the link, the chat takes the product's ID in the source from the same record: that's what the “Buy” button code receives (product data in event code).

    Product photo links

    “Product image URL template” has one macro — {image}, the image path from the catalog. An example for OpenCart: https://myshop.com/image/{image}. The template applies to both the main photo on the product card and the gallery.

    With an empty template, the chat takes the photo from Elbuz cloud storage, and if it isn't there, the original photo link when it starts with https://. Otherwise the photo may not open: then fill in the template. A product without a photo is shown with a placeholder.

    Cart link

    The “Store pages” card has one field — “Cart link”. When a shopper adds a product to the cart, a “Go to cart” link to this address appears below the product list. The address must start with https://, http:// or /, otherwise there's no link.

    Choosing a “CMS ID” with “Site address” filled in puts that CMS's standard cart address into an empty field; the app replaces a filled-in field only with your consent (choosing a CMS).

    Store API

    The “Store API” card connects the chat to the Elbuz Smart Assistant module on your store's side. Through it, the chat recognizes a shopper signed in to their account on the site and gets their order statuses at the moment they ask.

    • “Shop API URL” — the module address; for OpenCart it ends with route=extension/module/elbuz_smart_assistant;
    • “Shop API Secret” — the signing key, the same here and in the module;
    • “Generate” — a new random 64-character key. It's saved when you close the window or change another field, and right after that the old key in the module stops working.
    The “Store API” card: the store module address, the key and the Generate button
    1Shop API URL
    2Shop API Secret
    3Generate
    1. The address of the Elbuz Smart Assistant module on the store side.
    2. The key, the same here and in the module. Hidden in the screenshot.
    3. A new 64-character key; the old one in the module stops working.

    While the address or key is empty, the AI can't answer order questions in the text chat. In a store on Elbuz CMS, both fields are filled in automatically, and the key reaches the store every time the form is saved. What exactly the shopper sees about orders is covered in the article about the smart assistant.

    The key gives access to your customers' data. Don't send it in emails or show it in screenshots.

    Scenarios

    Main language without a prefix, the second one with /ru/

    What to set up. In “Directories → Languages”, leave the Ukrainian prefix empty and set ru for Russian. In “Product URL template” and “Article URL template” — {site_url}/{language_code}/{url}.

    What you get. A shopper who opened the chat on a Ukrainian page gets myshop.com/smartfon, and on a Russian page — myshop.com/ru/smartfon.

    The catalog was imported from a marketplace, and the product pages are there

    What to set up. The source code and source template ID, and {external_url} in the product template.

    What you get. The product name and photo in the chat lead to the product page in the source; a product without a link to the source leads to its own page on your site.

    A store on Elbuz CMS

    What to set up. Nothing: the site address, language prefixes, store pages and store API are filled in when the widget is connected.

    What to do when a link leads to the wrong place

    What you see and what to do about it
    What you seeWhyWhat to do
    A shopper from a Russian page lands on the Ukrainian product pageThe template is empty or lacks {language_code}, or Ukrainian is selected in “AI reply language”Set {site_url}/{language_code}/{url} (prefixes)
    The link leads to the site's home pageThe product has no SEO URL in the catalogFill in the product's SEO URL or use {product_ext_url}
    Product photos don't openThe photo isn't in cloud storage, and the photo template is emptyFill in “Product image URL template” (photos)
    There's no “Go to cart” line“Cart link” is empty or doesn't start with https:// or /Enter the full cart address
    The AI doesn't answer about orders“Shop API URL” or “Shop API Secret” is empty, or the keys here and in the module differCheck both fields against the store module (API)

    FAQ

    Why isn't the language prefix in the link ua or ru?

    It isn't a language code but the SEO prefix from “Directories → Languages”. An empty prefix for the main language is normal: the link comes out without it (prefixes).

    Can a product have different SEO URLs for different languages?

    No. A product has one address in the catalog; language versions differ only by prefix. If your site uses different addresses per language, use {product_ext_url} or {external_url} in the template.

    The shopper writes in Russian, but the link leads to the Ukrainian page. Why?

    The prefix in the link follows the language of the page where the chat is open. “AI reply language” set to “Automatic” changes only the reply language, not the link (prefixes).

    Where to find it and who has access

    Menu
    Directories → Categories → “Catalog tools” → “Widget settings - Smart Assistant” → “Links” tab
    Site address
    the same form, “Setup” tab → “Site” card
    Language prefixes
    Directories → Languages, the SEO prefix field of each language
    Prepare
    the site address, language prefixes, the cart address

    Related topics

    Was this article helpful?

    Missing a feature? Tell us.

    We will add it for free if other users need it too.

    If only you need it, we will agree on it separately.

    Article contents

    Suggest an improvement

    Try Elbuz free