Embed an AI shopping chatbot
Add your workspace’s AI shopping assistant to an existing website with one script. Visitors can browse your published products, ask the product questions you configured, ask follow-up questions, and build a routine using selected products or AI suggestions. Replies use your workspace’s catalogue, AI instructions, enabled levels, visitor access policy and prepaid credits.
The assistant is AI, not a human support operator. It does not scrape the host website, import that website’s catalogue, or operate a checkout. Keep your workspace catalogue current through the dashboard or the authenticated external API. Prices and purchase links come from your published product data.
Configure and install
- Open Workspace → Chatbot.
- Add each exact HTTPS website origin, for example
https://www.example.com. Addhttps://example.comseparately if both serve your site. Paths, query strings, wildcards and trailing slashes are not allowed. - Choose the launcher text, title, welcome message, message placeholder, accent/text colors, position and edge offset. Choose contrasting colors for accessibility.
- Enable the chatbot and save. It is disabled by default.
- Copy the installation script from Install on your website at the top of the page and place it before
</body>, or install it with your tag manager. Load it only after any required analytics/storage consent.
<script async src="https://api.incele.ai/chatbot.js"
data-workspace="YOUR_WORKSPACE_ID"></script>
Use https://api.incele.xyz/chatbot.js and an XYZ workspace for testing. The environments have separate data and credits. A workspace ID identifies a public embed; it is not a private key. Never place an account integration key, MCP credential, or dashboard session in this script.
Changes apply when visitors reload the page. Disable the chatbot or remove an origin to stop new requests from that website. The existing workspace must remain active and visible. It requires a modern browser with JavaScript and HTTPS, with HTTP allowed only for the explicitly configured loopback addresses below.
Local development
Add the exact origin printed by location.origin, for example http://localhost:8787, enable the chatbot and save. HTTP is supported only for localhost, 127.0.0.1 and [::1]; other hosts require HTTPS. Each hostname, protocol and port is a separate origin. Allowing http://localhost:8787 does not allow http://localhost:8788 or http://127.0.0.1:8787.
Do not also enter bare localhost or localhost:8787: they are invalid, and any invalid line prevents the entire settings update. Do not add a path or trailing slash. Reload your local website after saving. A 403 with a CORS error usually means the chatbot is disabled, the saved origin does not match, or the workspace/environment is wrong; browsers intentionally cannot read a denied origin’s response.
Visitor experience
The responsive launcher opens an isolated iframe with two starting points: Product Guide and Routine Builder. Product Guide opens a searchable, paginated catalogue; select a product to see its ordered initial questions. Routine Builder follows the Beauty V1 guided flow: choose AI skin analysis (the first option) or the six-step questionnaire, review your skin type, sensitivity, concerns, ingredient sensitivities, age range and routine preference, then enter chat directly. Edit profile and Products stay pinned at the top; Products lets you optionally choose up to 20 products without adding a setup step. Take a photo with your camera or upload one. Camera access requires browser permission and a secure host page (HTTPS or localhost). The camera stops after capture, cancellation, navigation, closing the widget or backgrounding the page. Capture never uploads a photo automatically. Photo analysis requires explicit agreement, uses workspace credits, accepts JPEG/PNG/WebP photos up to 3 MB and is not a medical diagnosis. A failed analysis never invents a profile; you can use the questionnaire instead. Your reviewed profile is included with routine requests. Visitors can allow AI to suggest additional products and describe their goals or sensitivities in the message. The compact header provides back, new-chat, sign-in and close controls. The AI level selector is inside the chat input, hides while typing, and appears only when both levels are enabled. New chat clears the current conversation while keeping the current product or routine profile. Customers can sign in with an email verification code; after verification the user icon opens a signed-in account panel with an explicit Sign out button. This session belongs only to this workspace, not the management dashboard. Comprehensive AI requires sign-in. When only one AI level is enabled, the selector is hidden.
Guest requests retain the existing Turnstile verification, quotas and credit rules. A missing security configuration, insufficient credits, disabled level or restricted access policy can prevent a response. Product and routine requests spend the same credits as their hosted-website equivalents. Installation, visitor counts and opening the launcher do not spend AI credits. See credits and customer access.
Messages and product/routine cards are rendered as text; generated HTML is never executed. Purchase links open separately and permit HTTPS only. The first widget release supports text chat, catalogue browsing, product questions and routines; chat image attachments and social sign-in remain available through the supported hosted/customer experience APIs rather than the widget UI.
Content Security Policy
A host site with a CSP must permit the API origin in script-src, connect-src and frame-src, and permit the widget’s isolated launcher styles in its applicable style-src policy. For production the API origin is https://api.incele.ai; for testing it is https://api.incele.xyz. Merge these allowances with your existing policy. The installation script delegates camera access only to the API iframe. If your host has a restrictive Permissions-Policy, explicitly allow the relevant API origin for camera; microphone access is not requested. The iframe has its own restrictive CSP and Turnstile allowances. Successful security verification takes no visible space; an interactive challenge is displayed when needed. Browser extensions, consent managers or third-party storage restrictions may affect verification and persistence.
Do not set a sandbox on the host page that blocks scripts, form events, same-origin iframe storage or allowed popups. The supplied iframe sandbox is configured by the loader. The iframe's frame-ancestors policy permits only your saved origins. This origin policy limits browser embedding; it is not authentication for management operations or a guarantee against non-browser requests. All AI access controls still run on the server.
Analytics and privacy
The Chatbot analytics report on the Chatbot page provides date and website-origin filters, visitor estimates, chat opens, successful messages/AI replies, conversations, signed-in customers and product/routine replies, plus a daily table. Refresh chatbot analytics refreshes only this report. The default window is the last 30 days; queries support up to one year.
- Visitors are distinct browser identifiers in the selected range. Visits and opens are deduplicated per browser, origin and UTC day. These are estimates, not verified people or a count of every page load. Clearing/blocking browser storage affects counts.
- Messages/AI replies count successful chat operations, one user message and one reply per operation. Errors and photo analyses do not count as chat messages; successful photo analyses are still charged and recorded in workspace AI usage. Conversations count distinct signed conversation identifiers. Signed-in customers count unique authenticated users who received an AI reply.
- Widget reports store hashed browser/conversation identifiers, origin, event type, timestamps and an optional internal customer reference. Reports return aggregates, never customer IDs, session keys or message contents. No host page content, query strings or browsing paths are collected by widget analytics.
- AI processing and conversation storage still follow the platform’s normal customer experience and privacy rules. Explain this processing and your use of analytics/storage in your own privacy notice. Do not send unnecessary sensitive personal data. No third-party advertising tracker is installed by this script.
Browser visitor credentials are isolated by workspace and parent origin; they are never shared with the host script. If third-party storage is unavailable, the widget falls back to memory and sign-in may not survive a reload.
Agents and custom backends
Account integrations can use get_chatbot_settings (website:read), update_chatbot_settings (website:write) and get_chatbot_analytics (workspace:read), each with an explicit workspace ID and current ownership authorization. See the external API explorer for the authenticated contracts. Public widget routes are a limited opt-in customer surface, not a replacement for an integration credential.
Troubleshooting
- No launcher: check that the chatbot is enabled, the workspace is visible/active, the environment and workspace ID match, and the current
location.originexactly matches an allowed origin. Check the browser console/network for blocked CSP requests. - No products: publish ACTIVE products and check the workspace’s website access policy; private sites require customer sign-in.
- AI unavailable: check wallet credits, visitor AI permissions/quotas, enabled levels and Turnstile configuration. Comprehensive requires a signed-in customer.
- Sign-in cannot persist: allow iframe storage or sign in again after reopening/reloading. The host website cannot supply its account-management token as a customer token.