How it installs
One app embed in the theme, one small endpoint, and your own Meta key.
The widget is 15.6 KB gzipped and loads after the page, so it doesn't hold up the storefront. The key lives only on the endpoint.
Turn it on in the theme editor
It ships as a Shopify theme app extension: an app embed the store switches on under Online Store, Themes, Customize, App embeds. No theme code is edited, and it survives theme updates. A single script tag in theme.liquid works too.
{%- comment -%} Loads the chat widget after the page; the endpoint holds the Meta key, never the theme. {%- endcomment -%}
<script
src="{{ block.settings.endpoint }}/widget.js"
defer
data-saltline-chat
data-endpoint="{{ block.settings.endpoint }}/api/chat"
data-accent="{{ block.settings.accent }}"
></script>
{% schema %}
{
"name": "Store assistant",
"target": "body",
"settings": [
{ "type": "text", "id": "endpoint", "label": "Assistant endpoint", "default": "https://assistant.example.com" },
{ "type": "color", "id": "accent", "label": "Accent color", "default": "#12324a" }
]
}
{% endschema %}<script src="https://assistant.example.com/widget.js" defer data-saltline-chat data-endpoint="https://assistant.example.com/api/chat"></script>
What the assistant can do, and where each answer comes from
| Tool | What it gives the shopper | Reads from |
|---|---|---|
| search_catalog / get_product | Products, sizes, specs, stock | Shopify Storefront API (here: a JSON catalog) |
| show_products | Cards with Add to cart | Shopify Ajax Cart API, /cart/add.js |
| lookup_order | Order status, only with order number + email | Shopify Admin API, read_orders (here: mock orders) |
| handoff_to_team | Name, email and the question | Your support inbox (here: sends nothing) |
Safeguards
- Key stays server-side. The storefront only ever talks to the endpoint.
- Rate limits per visitor: 8 messages a minute and 60 a day, configurable.
- Monthly spend cap. Every answer's cost is counted; at the cap the assistant stops and points shoppers to the support inbox.
- Only your store's domains can call the endpoint (CORS allow-list).
- Orders need two keys: the order number and the email on it, or nothing is shown.
- No training on your chats. Meta's contributor mode, which trades your prompts for a lower price, stays off.
The store writes the rules
FAQ, shipping, returns, hours and answer rules live in one plain-text file the store edits (or a Shopify metaobject, so staff edit it in the admin). The next conversation uses the new text. These are the demo's rules:
## Answer rules (from the owner) 1. Never quote a price, estimate or range for custom rigging work, swaging labor, installation or any other labor. Say that rigging work is quoted by a person in the rigging shop, and offer to pass the question to the team. 2. Only state specifications, sizes, loads and prices that appear in the catalog. If the catalog does not say, say so; do not guess. 3. For anything load-bearing (standing rigging, lifting, anchoring), give the catalog numbers and recommend confirming with a rigger. Never call a part "safe" for a use. 4. Look up an order only when the customer gives both the order number and the email on the order. 5. If a question is outside what the store sells or knows, say so plainly and offer the team. 6. When the customer wants a person, collect a name and an email address, then pass the question to the support inbox.
What's real in this demo
Real: every answer is a recorded call to Meta's Muse Spark 1.3 (through OpenRouter, which serves the same model), with its tool calls, tokens, cost and timing. The widget, the endpoint, the tools and the cart calls are the code that would ship.
Synthetic: the store, the catalog, the photos, the orders and every name. The public demo replays recordings instead of calling the model, so it costs nothing per click; on a store it runs live on the store's own Meta key.