How to Add an AI Chatbot to Shopify with Alee
Add an AI chatbot to Shopify in minutes. Embed Alee in theme.liquid, train it on your products, and capture leads and bookings from your store.
A chat bubble that actually knows your catalogue can answer "Does this come in XL?" or "What's your return window?" at 11pm without you lifting a finger. This guide shows you exactly how to add an Alee AI chatbot to a Shopify store, where to drop the embed in theme.liquid, how to train it on your products and policies, and how to turn chats into leads and bookings. No app-store install, no code beyond one line.
What you'll need before you start
- A Shopify store where you can edit the theme code (any plan that allows the Edit code option, which is most of them).
- An Alee account. The Free plan gives you 1 bot and 200 messages a month, which is plenty to test the full flow before you commit.
- Your store content handy: product pages, FAQ, shipping and returns policy, and any size or care guides.
Step 1: Create and train your bot in Alee
The chatbot is only as good as what it knows, so train it first.
- In your Alee dashboard, create a new bot and give it a name (for example "Store Assistant").
- Open the bot's Sources tab and click to add a source. Alee splits everything you add into chunks, turns each chunk into a vector embedding, and stores it in the bot's knowledge brain so answers stay grounded in your content.
- Add your store, ideally in this order:
- Sitemap / many pages at once — point Alee at your Shopify sitemap (
yourstore.com/sitemap.xml) so it crawls every product, collection, and page in one go. This is the fastest way to load a full catalogue. - Single URLs — add specific high-value pages (a hero product, your shipping page) if you only want a subset.
- PDFs & documents — upload size charts, care guides, or a returns policy PDF.
- YouTube videos — if you have product demos or unboxings, add them and Alee uses the transcript.
- Raw text / FAQ — paste anything not on a page yet: stock answers, dispatch timelines, COD availability, "Do you ship pan-India?" and so on.
- Let the crawl finish. You can re-crawl or add sources any time when you launch new products; the brain grows with your store.
Because every answer is grounded only in your content and self-checked before it's sent, the bot won't invent a discount or promise next-day delivery you don't offer. If something isn't in your sources, it says it doesn't know instead of hallucinating.
Step 2: Customise the bot for your brand
Open the bot's customise settings and set:
- Display name and welcome message — something like "Hi! Ask me about sizes, shipping or returns."
- Brand colour — match your Shopify theme so the bubble looks native.
- Avatar / launcher image — upload your logo or mascot.
- Suggested starter questions — pre-load the ones shoppers actually ask: "What's your return policy?", "How long does delivery take?", "Is this available in size M?".
- Bot persona / system prompt — set the tone and rules. For a store, tell it to be concise, always mention the relevant product page, and offer to collect an email when it can't fully answer.
On the Pro plan and above you can also remove the "Powered by" badge so the widget is fully white-label.
Step 3: Grab your embed snippet
In Alee, find the embed/install option for the bot and copy the single <script> line. It looks like one tag you paste once. That one line is all Shopify needs.
Step 4: Add the embed to theme.liquid
This is the part that puts the bubble on every page of your store. Editing theme.liquid (rather than a single template) means the chatbot appears site-wide: home, collections, product pages, cart, and checkout-adjacent pages.
- In Shopify admin, go to Online Store → Themes.
- On your live theme, click the ⋯ (three-dot) menu and choose Edit code.
- In the left file list, open Layout → `theme.liquid`.
- Scroll to the bottom of the file and find the closing
</body>tag. - Paste your Alee
<script>line on its own line just before</body>:
```liquid
<!-- Alee AI chatbot -->
{{ aleeembedscript }}
</body>
</html>
```
Replace {{ alee_embed_script }} with the actual script tag you copied from Alee. Putting it right before </body> keeps it out of the critical render path so it won't slow your store's first paint.
- Click Save.
- Open your storefront in a new tab (or an incognito window) and you should see the chat bubble. Ask it a test question like "What's your return policy?" to confirm it's pulling from your sources.
Tip: If you run multiple themes or are mid-redesign, add the snippet to each theme you intend to publish. The script lives in the theme, so a theme switch without the snippet means no bubble.
Product-page tips for ecommerce
The bubble works everywhere by default, but product pages are where it earns its keep.
- Train at the product level. Because you crawled the sitemap, each product description, variant, and spec is already in the brain. Keep your Shopify product descriptions detailed (materials, fit, dimensions, wash care) — the richer the page, the better the answers.
- Lean on starter questions. Set starters that map to buying objections: "Will this fit me?", "What's the delivery time to my pincode?", "Is COD available?". Shoppers click these far more than they type.
- Re-crawl after launches. New drop or restock? Add or re-crawl the source so the bot answers about it the same day.
- Use the persona to nudge to the page. Instruct the bot to always link back to the relevant product or collection page in its answer, so a question becomes a click toward checkout.
- Watch Top Questions. Alee's analytics surface a Top Questions list per bot. If "Do you have this in cotton?" keeps coming up, that's a signal to add a source or a product variant.
Capturing leads and bookings from chat
A store chatbot shouldn't just answer — it should collect.
- Lead capture in-chat. Alee can ask for name, email, and phone inside the conversation. Turn this on so an out-of-stock or pre-order question becomes a "notify me" lead instead of a lost sale.
- Push leads where you work. Send captured leads to a CRM, Google Sheets, or your email via a webhook, or automate with n8n. A simple Google Sheets webhook is the fastest setup for a small store.
- Share booking links. If you sell consults, fittings, or made-to-order pieces, have the bot share a booking link when someone asks "Can I get a video call before buying?".
- Triage and improve. Use the question-triage inbox to mark questions important, FAQ, or answered, and teach a better answer when the bot got something thin. Over a week or two this tightens up your most common pre-sale questions.
A quick worked example
Say you run a Jaipur-based apparel store. A shopper on a kurta product page at midnight asks, "Is this pure cotton and do you ship to Pune?" Alee retrieves the fabric detail from the product page and the shipping reach from your policy PDF, answers both, and links the size chart. The shopper then asks about a bulk order for a wedding. The bot doesn't have bulk pricing in its sources, so instead of guessing it says it'll have someone follow up and captures her name, email, and phone — which lands in your Google Sheet via webhook. You wake up to a qualified lead.
Going live and scaling up
Once the test bubble works, you're effectively live — the script is already on your published theme. As you grow:
- Move to Pro for 2 bots and badge removal, or Agency/Scale if you manage stores for clients and want to run several bots from one dashboard.
- For India, INR / UPI billing is on the way; you can run the Free plan in the meantime with no card.
- Explore the rest of what the widget can do in features, and browse more guides for deeper setups like CRM routing and n8n automations.
See the full list of step-by-steps in our tutorials, or compare options on Alee vs SiteGPT.
Frequently asked questions
Do I need to install a Shopify app to use Alee?
No. Alee is added with a single <script> line pasted into your theme's theme.liquid file, so there's no app to install and nothing in your Shopify app list to manage. It works the same way on any platform — Shopify, WordPress, Wix, and others.
Will the chatbot slow down my Shopify store?
Placed just before the closing </body> tag, the script loads after your page content, so it stays out of the critical render path. Repeat or similar questions are also served from a cache, so common answers come back instantly.
Can the chatbot make up prices or promise delivery times I don't offer?
No. Every answer is grounded only in the content you train it on and is self-checked for grounding before it's sent. If something isn't in your product pages or policies, the bot says it doesn't know rather than inventing an answer.
Ready to give your store a 24/7 assistant? [Start free with Alee](/signup) — 1 bot, 200 messages a month, no card needed.
Try it in your own Alee bot
Train it on your site, embed it anywhere, capture leads 24/7. Free to start, no card.