Integration guide · Shopify

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

  1. 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.

  2. Open the code editor

    Next to your current theme, click the … button and choose Edit code.

  3. Open theme.liquid

    In the Layout folder, open theme.liquid.

  4. 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>
  5. 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.

Frequently asked questions

In Shopify admin open Online Store, Themes, Edit code, open theme.liquid in the Layout folder and paste your Owlbee snippet just above the closing body tag, then save.

Yes. Owlbee is not installed from the Shopify App Store. It works through a snippet in your theme, so it never needs access to your store admin or customer data.

Yes. Any plan that includes the Online Store lets you edit your theme code. Paid themes must be purchased before their code can be edited.

No. Owlbee answers from your store content and policies. For order status it can point customers to your order tracking page or contact details.

No. Shopify checkout and thank-you pages do not load theme code, so the chatbot appears on your storefront pages only.

Keep reading

Put your business knowledge to work

Build an AI chatbot from your own website in minutes. No coding needed.