What a chat agent can do in a Shopify store
Most shopper questions arrive before the purchase, on a product page or in the cart: Will this fit? When will it arrive? Can I return it? An agent that answers those from your own policies removes a reason to abandon the page and spares your inbox the repeats.
- Answer shipping zones, delivery times, returns and care questions from pasted text.
- Know which product the visitor is looking at, because the page URL and page title are available to the prompt.
- Collect an email when a product is out of stock or the question needs a human, then hand off.
- Look up an order if you build the tool for it (see below).
The broader picture is in AI chatbots for ecommerce and for customer support.
The Shopify install in five steps
This is the summary; the Shopify install guide shows the exact screens and the code.
Create the site and agent
Publish an agent in SiteTrellis and copy the snippet. Add your custom domain and, if people can reach it, your
myshopify.comaddress to Allowed origins.Duplicate your theme
In Online Store, themes, duplicate the live theme and edit the copy, so you can preview before publishing.
Paste into theme.liquid
Under Layout, open
theme.liquidand paste the snippet on a new line directly above the closing body tag. Save.Preview, then publish the theme
Check the storefront in a private window, then publish the copy.
Test the pages that matter
Product, collection, cart and content pages should show the launcher.
Themes built for Online Store 2.0 also offer a Custom Liquid block. It avoids editing code files, but a block on one page template loads only there, and some themes strip scripts from blocks. If it does not show, use theme.liquid.
Switching themes, or a theme update that replaces theme.liquid, removes the snippet. Re-add it and check the storefront.
Checkout pages: what to expect
Shopify restricts custom scripts on checkout and the customer account area on most plans, so the widget normally does not appear there. Stores with checkout customization may be able to add it through Shopify’s supported extension mechanisms; the Shopify Help Center says what your plan allows. For most stores the chat that matters is on product, cart and content pages, which work with the snippet alone.
If the launcher gets in the way on some pages, use page rules in widget customization to exclude them, for example a landing page with its own form, without touching the theme again.
Order status: build a tool, there is no Shopify connector
SiteTrellis has no native Shopify integration. To let the agent say where an order is, you create a custom HTTP tool that calls an endpoint you control, which in turn talks to Shopify. The tool takes parameters, such as an order number and email, and your server decides what to return.
Where is my order 4821?
Happy to check. What email did you use at checkout?
It shipped with DHL and is due on 10 October. Anything else I can help with?
- Your endpoint must check that the order number and email belong together and return nothing otherwise; the visitor typed both and anyone can type anyone’s.
- Return compact JSON with only what the agent should say.
- Never paste a Shopify Admin API token into the prompt. Store credentials as an agent secret.
- Custom tools are limited by plan: Free 2, Starter 5.
The pattern is in custom HTTP tools. Browser-side identify data is not verified, so never use it to reveal private order data.
What to paste as knowledge for a store
- Shipping: regions, carriers, typical delivery times, cut-off times, free-shipping threshold.
- Returns and exchanges: the window, condition rules, who pays, how to start.
- Sizing charts and care instructions, written out as text.
- Product-line differences that shoppers ask about, such as materials or scent strength.
- A strict “do not promise” block: no discounts, no stock guarantees, no delivery dates beyond what your policy says.
With strict knowledge mode on, the agent declines what it was not given. It cannot see live stock or prices unless you build a tool, so say so in the prompt and offer a human or an email capture instead. See the prompt guide.
Shopify troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| No launcher anywhere | Edited a draft theme, or the snippet sits outside the closing body tag. | Check the live theme and move the snippet. |
| Works on the custom domain, not on myshopify.com | The second address is a different origin. | Add it to Allowed origins. |
| Only some pages show it | Custom Liquid block on one template, or page rules. | Use theme.liquid, or review the page rules. |
| Gone after a theme change | The new theme lacks the snippet. | Add it again. |
| Missing at checkout | Shopify restricts scripts there. | Expected on most plans. |
Further fixes are on the troubleshooting page.
Honest limits for Shopify stores
No product catalog sync, no cart or discount actions, no live inventory and no voice or WhatsApp. Replies arrive whole, and the agent can still be wrong, so keep the human handoff path visible. See the integrations overview and the BYOK overview for cost and key choices.