How to add an AI chatbot to your Shopify store

Shoppers ask the same things before they buy: when will it arrive, can I return it, does it come in blue? An AI chatbot answers from your store’s own pages and policies, instantly.

A Shopify store product page for a linen table lamp with the chat open, answering “When will my order arrive?”: orders ship in 1–2 days and delivery takes 3–5 working days.

Every unanswered pre-sale question is a potential abandoned cart. An AI chatbot for Shopify answers them on the spot, from your shipping policy, returns policy, product pages and FAQ, and collects contact details when a shopper wants a follow-up.

Step 1: set up your chatbot

  1. Create a chatbot in askAgent.
  2. Add your store's address so it can read your pages, including your policy pages.
  3. Upload anything that isn't on the site: a sizing guide, wholesale terms, an FAQ file.
  4. Write short instructions, for example: “Be friendly and brief. If someone has a problem with an existing order, ask for their email and order number so the team can help.”
  5. Test it, then copy your snippet from the Embed code tab.

Step 2: add the snippet to your theme

Shopify's theme code editor with layout/theme.liquid selected and the askAgent script line pasted just above the closing body tag. Labels: Online Store, Themes, Edit code; paste above the closing body tag, then save.
One line in theme.liquid puts the chat on every page of your store.
  1. In Shopify admin, go to Online Store → Themes.
  2. Next to your current theme, open the … menu and choose Edit code.
  3. Under Layout, open theme.liquid.
  4. Find </body> near the end of the file and paste your snippet just above it.
  5. Click Save and open your store. The chat bubble appears on every page.

Step 3: allow your domains

In askAgent, add every address shoppers use: your custom domain (with and without www) and your …myshopify.com address if you preview the store there.

What to teach it for a store

  • Shipping: processing time, delivery times by region, costs and free-shipping thresholds.
  • Returns and exchanges: the window, condition rules, who pays return shipping.
  • Products: sizing, materials, care and compatibility, often best as a simple document.
  • Payments: accepted methods, instalments, cash on delivery if you offer it.

The chatbot answers from your documents and pages; it doesn't look up individual orders. For order problems, have it collect the shopper's email and order number so your team can follow up. Details shared in the chat end up in your leads list.

On WordPress instead? See AI chatbot for WordPress.

Your answers are already written. Put them to work.

Upload what you have, paste one line of code, and your AI chatbot starts answering visitors today.