Skip to content

Inline

Embed the Shop Agent on a category, campaign or advice page. Shoppers can start the conversation directly in the page.

An embedded chair guide welcomes shoppers, offers help finding a chair for their desk and asks how long they sit. The text input sits below the greeting.

Add an empty, visible div before the Global script. The script finds it and initializes the agent in it.

Inline Shop Agent
<div id="neocom-inline"
data-neocom-type="shop-agent"
data-neocom-assistant-id="YOUR_ASSISTANT_ID"></div>
Attribute Value Description
data-neocom-type shop-agent Marks the container of an inline Shop Agent.
data-neocom-assistant-id your Assistant ID The agent to show, one per language or market. See Which ID do I need?

The id is only needed for custom CSS. The script selects the first visible annotated container. Use one inline mount per page. For hidden tabs or late insertion, mount after the container is visible.

The default height is 80vh unless your theme sets another; no CSS is required. Height, width and scroll offsets live in the theme under Basics › Inline layout in the Theme Builder; send the Backend JSON to the Neocom team. See the Theme reference.

Theme property Default What it does
basics.size.height 80vh Height of the inline agent, in px or vh.
basics.size.maxWidth 900px Maximum width of the conversation inside the container.
basics.size.offsetTop 0px Scroll offset on mobile. Set it to the height of your sticky header.
basics.size.md.offsetTop 0px Scroll offset on desktop.

The inline agent takes these values only from the Theme selected for your agent in the Admin Portal. An Embed theme on the same page does not affect it.

For a height the theme cannot express, size the container with CSS:

Optional container sizing
#neocom-inline { height: 500px; }
#neocom-inline > .neocom-widget-wrapper { height: 100% !important; }

The Global script initializes containers that exist when it loads. If the div is inserted later (new route, opened tab, lazy content), call Neocom.mountAdvisor() once it is visible:

After inserting the container
(function () {
function mountInlineAgent() {
Neocom.mountAdvisor();
}
if (window.Neocom) mountInlineAgent();
else window.addEventListener("neocomloaded", mountInlineAgent, { once: true });
})();

For subsequent client-side routes, keep the mounted container in a persistent part of the layout when possible. Test leaving and returning to the route. An existing assistant can prevent a second mount for the same conversation.

On small screens, the conversation starts in the page. Interacting with it can open the full-screen view. Select the minimize control to return to the inline placement. Test both actions with your sticky header and virtual keyboard.

The inline agent shows its Welcome message and suggested replies. Page-specific suggestions appear beside a chat bubble. To send a question from another storefront control, use AskAgent. Use display: "modal" when that control should open a full-screen conversation.

Check the setup with the verify step of the Quickstart.