Shopify & e-commerce
A knowledge base handles static content (FAQs, policies) well; but questions like "where's my order?" or "is this in stock?" need live data. Connect Shopify and the widget answers these in real time.
Connect the store
In the SemAgent panel go to Settings → E-Commerce → Shopify. There are two ways to connect: one-click OAuth (recommended) or Admin API (Client Credentials). Both run with read-only scopes; credentials are stored encrypted and never sent to the LLM.
Note: Shopify removed direct static shpat_ token generation from the admin UI for custom apps. The recommended flow is now the Client Credentials Grant using your app's Client ID + Client Secret (the system mints and auto-refreshes a short-lived 24-hour token).
Method 1 — OAuth (recommended)
- In the panel go to E-Commerce → Shopify → Quick Connect and type your store address:
store.myshopify.com(your.myshopify.comaddress, not your custom domain). - Click Connect with OAuth → on Shopify's consent screen click Install / Approve.
- Done — permissions are granted in one click; no manual token needed. Back in SemAgent the connection shows "✓ Connected".
Permissions you grant on the consent screen (all read-only):
| Scope | What it enables |
|---|---|
read_products | Product name, price, description. |
read_orders | Order status and shipment tracking (tracking number + carrier). |
read_customers | Verifying the order owner (email match). |
read_inventory | Size/color level stock availability. |
read_discounts + read_price_rules | Coupon / discount code validation. |
read_shipping | Shipping rates and delivery zones. |
Read-only by default — the chatbot cannot change anything in your store unless you explicitly allow it. Every scope above is read-only. If you want to, you can switch on return requests, address corrections, order cancellation and refunds individually under Settings → E-Commerce; each one additionally requires the customer to verify by email, is limited by the order's state, and is written to an audit log. Your credentials are stored encrypted, never shown in plain text and never sent to the language model. You can remove them any time with Disconnect.
Already connected before? When the scope list grows, your existing connection keeps working, but you need to reconnect the store for the new capabilities (stock / coupons / shipping rates). With a missing scope the chatbot does not invent an answer — it honestly says it cannot reach that information.
Method 2 — Admin API (Client Credentials)
You create your own Shopify app and provide its Client ID/Secret. The app and the store must be in the same Shopify organization (no App Store review is needed for your own store).
Get these from Shopify — step by step:
- Go to dev.shopify.com (Shopify Dev Dashboard) → Apps → Create app → give it a name (e.g. SemAgent).
- In the app, Configuration / API access → Admin API access scopes → select and save these read-only scopes:
read_products,read_orders,read_customers,read_inventory,read_discounts,read_price_rules,read_shipping(the chatbot only reads; no write access needed). - Install the app on your store.
- From the app's Overview / Client credentials section, copy the Client ID and Client secret. (Keep the client secret safe.)
Connecting in SemAgent:
- In the panel go to E-Commerce → Shopify → Admin API (Client Credentials).
- Enter: Store domain (
store.myshopify.com), Client ID, Client Secret. - Click Connect with Client Credentials. SemAgent tests the connection and, if successful, stores the credentials encrypted. A 24-hour token is minted/refreshed automatically per request.
This connection lets the customer widget read live data (read-only). For the agent to write to Shopify (create products, etc.) there's a separate connection: the Shopify (Admin API) card in Agent Connectors — it also uses the Client Credentials Grant, but its credentials live separately in the Agent Vault.
WooCommerce also connects via Consumer Key/Secret and supports all of the capabilities above. WooCommerce permissions are not split per resource; when you generate the key, selecting Permissions = "Read" is enough — you do not need to grant Write/Read-Write. The Consumer Key and Secret are stored encrypted and never shown in plain text. The Ticimax adapter is in development — announced in the changelog when ready.
Live-data answers
In e-commerce mode the widget uses these read-only capabilities:
| Capability | Question it answers |
|---|---|
search_products | "Do you have this, what's the price?" |
check_stock new | "Which sizes/colors are in stock? Do you have size M? How many are left?" |
search_orders | "Show my orders / what's the status of my last order?" |
get_order_detail | "Where is order 12345?" |
get_shipment new | "What's my tracking number and which carrier?" (after email verification) |
check_discount new | "Is coupon SUMMER25 valid? My discount code isn't working." |
get_shipping_info new | "How much is shipping? Is there free shipping? Do you ship internationally?" |
search_customers | Recognize the customer / context from past orders. |
Hybrid answers: for product questions the chatbot combines store data with your knowledge base, so details that are not in the catalog (size charts, fabric care, return terms) end up in the same answer. Honesty rule: if the exact stock count is unknown it only says in/out of stock, it never presents an invalid coupon as valid, and it does not invent data.
For write operations on the agent side there are shopify_query / shopify_mutation tools (subject to approval) — see the tool reference.
Smart escalation
Not every question should be solved by a bot. When the widget detects a damage, payment issue or anger signal, it hands the conversation to human support with a summary + priority tag — the customer doesn't have to re-explain.
Webhook event triggers
With Shopify connected, events trigger the agent instantly (no polling): e.g. new order → stock check → suggestion card if critical. This is the basis of proactive ops. More: event triggers.
All e-commerce actions pass through the same security architecture: read-only answers run freely, operations that change the store require approval.
SemAgent