Add the Allinaa chatbot to a Shopify store

Written by the Allinaa team · Updated

On Shopify, the usual place for a script that should run on every storefront page is your theme's main layout file, and that is where the Allinaa assistant goes. It is one line, pasted once, and it takes effect on every storefront page that uses that layout.

Before you start: copy your embed code

Create your Allinaa account at bot.allinaa.com/start using your store's address. If your store only has a myshopify.com address, that is fine: the knowledge scan in the setup wizard reads your store only, never other shops on the same platform.

The wizard drafts your assistant's knowledge from your store pages (shipping, returns, sizing, about) so you can edit and approve it. Then step 5, "Install", shows your code with a copy button:

<script src="https://bot.allinaa.com/widget.js" data-bot-id="your-bot-id" defer></script>

Duplicate your theme first

Shopify itself advises duplicating a theme before editing its code. A duplicate gives you an untouched copy to go back to if anything looks wrong. In Online Store > Themes, use the theme's menu to make the copy, then edit the live theme as below.

Step by step: Edit code > layout/theme.liquid

  1. In your Shopify admin, go to Online Store.
  2. Click the three-dot menu next to your current theme and choose Edit code.
  3. In the file list, open layout/theme.liquid.
  4. Find the closing </body> tag, usually near the end of the file, paste your code on the line just before it, and click Save.

The first three steps follow Shopify's help page on editing theme code. Pasting before </body> is the standard instruction for any website. According to Shopify's developer documentation on layouts, theme.liquid is the default layout for all non-checkout pages. A page built on a different layout file, such as the password page some stores show before opening, won't show the assistant unless the code is added there as well.

Paid theme trials and theme updates

  • Theme trials: code can't be edited while you are trying a paid theme. Buy the theme first, then add the code.
  • Theme updates: updating a theme to a new version can remove your change. After any update, open the store and look for the chat button; if it is gone, paste the line again.
  • Switching themes: a newly published theme doesn't carry the code over. Add it to the new theme's theme.liquid before or right after you publish it.

Checkout pages

Shopify's checkout doesn't use theme.liquid, so the assistant does not appear there. That is usually what you want, because a customer at checkout should be paying, not chatting. Make sure the questions that come up just before checkout (delivery times, return window, gift wrapping) are answered in your approved knowledge so the assistant handles them on product and cart pages.

Check the installation

Open your storefront in a private window and look for the chat button. Then use Check my site in your Allinaa cabinet: it reads your homepage and up to two pages it links to. If your store is still behind Shopify's storefront password, the check only sees the password page, so remove the password or test by visiting the store yourself; the status in the cabinet changes to installed once the assistant loads on a page of your store. Still stuck? See chatbot not showing.

Frequently asked questions

Do I need a Shopify app to add the Allinaa chatbot?

No. There is no app to install: the assistant is one line of code in your theme's theme.liquid file.

Will the chatbot show up on my checkout page?

No. Shopify's checkout does not use theme.liquid, so the assistant appears on your storefront pages but not at checkout.

What happens to the code when I switch themes?

The new theme does not include it. Paste the same line into the new theme's layout/theme.liquid file.

Can the chatbot check a customer's order status?

No. Allinaa is not connected to Shopify orders. It can collect the order number and contact details, with the shopper's permission, so your team can reply.

Try Allinaa free for 14 days

200 AI replies, no card. After the trial, activation is arranged with Allinaa: Standard is $350/month and Premium $800/month, with no setup fee.

Questions? E-mail info@allinaa.com. AI answers can be wrong; each business approves the information its assistant uses.