How to add an AI chatbot to your Shopify store
Give shoppers instant answers about products, shipping and returns. Owlbee learns from your own store and installs with one snippet in your theme, so there is no app to install.
Before you start
- A trained Owlbee chatbot. Build it from your store's address and Owlbee reads your products, collections and policy pages.
- Your snippet, from Get Embed Code on the chatbot's page in your dashboard.
- Shopify admin access with permission to edit themes.
- If you use a paid theme, it must be purchased before Shopify lets you edit its code.
Add the snippet to your theme
-
Duplicate your theme (optional)
In Shopify admin go to Online Store, then Themes. Use the … button to make a duplicate as a backup before editing code.
-
Open the code editor
Next to your current theme, click the … button and choose Edit code.
-
Open theme.liquid
In the Layout folder, open
theme.liquid. -
Paste before the closing body tag
Find
</body>near the bottom of the file and paste your Owlbee snippet on the line just above it. Click Save.<div id="chatbot-YOUR-EMBED-CODE"></div> <script src="https://owlbee.ai/static/js/chatbot-embed.js"></script> <script> ChatbotEmbed.init({ embedCode: 'YOUR-EMBED-CODE', apiUrl: 'https://owlbee.ai/api/chat/YOUR-EMBED-CODE', containerId: 'chatbot-YOUR-EMBED-CODE', title: 'Ask us anything' }); </script> -
Check your store
Open your storefront in a private window. The chat button appears on every page of the online store.
Theme updates and checkout
The snippet lives in your current theme. Shopify keeps your edits through a theme update when they do not conflict, but if you switch themes or install a fresh copy, paste the snippet into the new theme's theme.liquid too. Checkout and thank-you pages do not load theme code, so the chatbot does not appear there.
Train it on your products and policies
Owlbee recognizes Shopify stores when it builds your chatbot. It reads your sitemap to see how many products and collections you have, samples products from across the store, and reads your shipping, returns and FAQ pages first, because those are what shoppers ask about most.
For a larger catalogue, export your products from Shopify, save the export as an Excel file and upload it to your chatbot. This works best for up to about 2,000 products. Owlbee tells you on the review screen when it could only read part of your catalogue.
What a Shopify chatbot is good at
Product questions
Sizes, materials, compatibility and comparisons, with a link to the product.
Shipping and returns
Answers straight from your policy pages, any time of day.
What shoppers ask
Top questions show which product details are missing from your pages.