Add an AI chatbot to Shopify with one line in theme.liquid
No app install, no permission grants, no theme rewrite. Train it on your product, shipping and returns pages and it answers shoppers in their own language — citing the page it read.
<script src="https://customerbot.co/script.js" data-bot-id="YOUR_BOT_ID"></script>The install, in full
- 1
Create the assistant and copy your bot ID
Sign up, paste your store URL and let it crawl. When the assistant is created you get a snippet with your own bot ID already filled in.
- 2
Open your theme code
In Shopify admin go to Online Store → Themes, then Actions → Edit code on the theme you are using. Duplicate the theme first if you would rather test on a copy.
- 3
Open layout/theme.liquid
This is the file wrapped around every page of the storefront, which is why one edit here covers product pages, collections, cart and the blog at once.
Layout └── theme.liquid ← this one
- 4
Paste the tag before </body>
Scroll to the bottom of the file. Put the snippet on its own line immediately above the closing body tag, then Save.
</main> <script src="https://customerbot.co/script.js" data-bot-id="YOUR_BOT_ID"></script> </body> </html>
- 5
Reload the storefront
The launcher appears in the corner you configured. Nothing else in the theme changes, and removing it later is deleting one line.
Six things to train it on first
A store crawl picks up everything, which is not always what you want. Start with the pages that answer money and delivery questions; add the rest once you have seen what visitors actually ask.
How crawling and re-training worksShipping policy page
Delivery times and zones — the most-asked pre-purchase question.
Returns & refunds page
Window length, condition rules, who pays return postage.
Product pages
Materials, dimensions, care, variants. Crawl the collection in bulk.
Size guide PDF
Uploaded as a document so the tables are readable, not just linked.
FAQ page
Whatever you already wrote to stop these emails the first time.
Q&A pairs
The five answers you retype every week, in your exact wording.
Fewer permissions, fewer moving parts
| Script tag | Typical embedded app | |
|---|---|---|
| Install | One line in theme.liquid | App install, permission grants, embed block |
| Storefront permissions | None — it is a script on your own page | Usually read access to products, orders, customers |
| Removal | Delete the line | Uninstall, then hunt the leftover theme code |
| Live order data | Via an API tool you configure and control | Often built in, at the cost of broader access |
A word on speed
The tag goes at the bottom of the body deliberately: the browser has already parsed and painted your product page before it fetches the widget. It is served from a CDN and does not block rendering. Put it in the head and you will undo that, so leave it where the instructions put it.
Shopify-specific questions
Do I need to install a Shopify app?
No. CustomerBot is a script tag on your own storefront, so there is no app install, no permission grant and nothing in your Shopify admin to uninstall later. Removing it is deleting one line from theme.liquid.
Will it slow my store down?
The widget script is small, served from a CDN and loaded after your page content because the tag sits at the bottom of the body. It does not block rendering. If you are chasing a Core Web Vitals score, this is not the thing that will move it.
Can it look up a customer’s order?
Yes, if you give it an endpoint. Describe your order-lookup API in a sentence and CustomerBot generates the tool definition; the assistant then calls it mid-conversation, asks for the order number and reads the status back. You decide what that endpoint exposes.
Does it work with Online Store 2.0 themes?
Yes. theme.liquid exists in every Shopify theme, 2.0 included. If you prefer, you can also add it through a custom Liquid block in the theme editor — the tag is the same either way.
What about my checkout pages?
Shopify controls checkout and does not let you inject scripts into it on standard plans. Put the assistant on the storefront where the pre-purchase questions actually happen; that is where the deflection and the recovered sales are.
Can it match my theme?
Primary, secondary and background colours, light or dark mode, launcher position and size, launch animation, avatar, header title and subtitle, placeholder and welcome copy are all configurable. On the Pro plan the CustomerBot watermark is removed.
Two minutes to a store that answers back
Crawl your storefront on the free plan and ask it your own returns policy before you touch theme.liquid.
Start free