How to add a chatbot on Shopify
Create a no-code AI chatbot for free.
Having a chatbot on your Shopify store is one of the easiest ways to engage with new and existing customers. Chatbots give your store visitors easy access to information related to your brand, products, and services. And an AI-powered chatbot can give your store the extra hands you need to address customer concerns, even outside store hours.
This guide will walk you through on how to install a chatbot like ChatAgents to your store.
Step 1. Create your chatbot
This step will depend on your chatbot provider. For ChatAgents, you can build one in a few minutes through our getting started guide.
Step 2. Copy your chatbot's embed code
Have your embed code ready on the side. For ChatAgents, follow these steps:
- From the dashboard, go to Agent Channels > Website.
- Toggle Enable Embed.
- Click Copy Code.
Step 3: Log in to your Shopify Admin
-
Log in to your store's admin account.
-
On the left-hand side, click Online Store.
-
Under Themes, click the three dots (⋯) next to your active theme.
-
Select Edit code.
Step 4: Paste your embed code
-
In the list of theme files, scroll down and find the theme.liquid file under the Layout folder.
-
Click to open theme.liquid .
-
Find the closing
</body>
tag — usually near the bottom of the file. -
Paste your embed code just before the
</body>
tag -
Click Save.
Step 5: Preview your store
Once saved, open your Shopify storefront in a new tab. You should now see your chatbot widget appear in the bottom-right corner of the page.
If the chatbot doesn't show up:
-
Double-check that you pasted the code above closing
</body>
tag -
Make sure the chatbot is active in your ChatAgents dashboard
-
Confirm that Authorization for logged-in users is turned off (unless you're using a secure token)
Restrict access to logged-in users (optional)
Give your chatbot the ability to answer account-related concerns.
View the full guide (recommended only for technical users).