Skip to main content

How to connect Shopify

Goal: Link your Shopify store so support or commerce assistants can use order/catalog context and event-driven CRM automations.

Who does what

RoleTasks
You (admin)Install the Shopify Marketplace app, enter your Shopify app client ID and secret, shop domain, then Connect Shopify
EngineeringQefro Runtime HTTPS callback (PUBLIC_API_URL) — not Shopify app credentials

What you need

  • Owner or Admin on the Qefro organization
  • Shopify store admin access
  • A target AI Workspace (e.g. Support or Commerce)
  • The Shopify Marketplace app installed on that workspace
  • A Shopify Partner app (client ID and secret) for this workspace

Steps (operator)

  1. Open app.qefro.com → your organization.
  2. Open the AI Workspace that should own commerce answers and tools.
  3. Open Tools → Marketplace app and install Shopify if it is not already installed.
  4. Under Store connection, enter:
    • your-store.myshopify.com
    • Shopify app client ID and secret from Partners (this workspace only — Qefro does not use a shared app secret)
    • Click Connect.
  5. Approve the requested scopes in Shopify (products, customers, orders — from the app metadata).
  6. After redirect, the card shows Connected. Tokens are never shown in the UI.
  7. Confirm knowledge is ready for policies (shipping, returns) — Knowledge Base.
  8. From Admin Console chat, try:
    • “List all orders” (shop-wide, staff only)
    • “Where is order 1001?”
    • “What is your return window?” (should cite knowledge, not invent policy)
  9. Optional: enable website widget or WhatsApp on the same workspace — Channels. On WhatsApp, “show my recent orders” uses that customer’s Hub email (OTP-verified if missing), not the shop-wide staff list.
  10. Optional outcomes: Order tracking, Abandoned cart.

Reconnect runs OAuth again and replaces credentials. Disconnect revokes the token and deletes stored credentials; tools then fail safely until you connect again.

Workflow

Shopify connected

  1. Pick workspaceSupport vs Commerce isolation.
  2. Install Shopify appMarketplace metadata app on this workspace.
  3. Connect storeTenant Shopify app credentials + OAuth; shop cannot be stolen by another workspace.
  4. Verify tools in chatReal order IDs in a safe environment first.
  5. Turn on channelWidget and/or WhatsApp.

Events (webhooks)

After Connect, Qefro registers webhooks for the topics declared in the app metadata. Inbound requests hit a generic Qefro webhook (/webhooks/http/shopify), not a Shopify server in the package.

HMAC is checked on the raw body first. The shop domain header selects the workspace — the payload cannot pick a workspace. Topics map to Business Events:

Shopify topicBusiness Event
orders/createorder.created
orders/updatedorder.updated
orders/cancelledorder.cancelled
customers/createcustomer.created
customers/updatecustomer.updated

Those events go onto orchestration_events and can start CRM Automation. People are matched through Customer Hub (email/phone/existing mapping). Shopify customer ids are never used as Person IDs.

Troubleshooting

SymptomWhat to check
Assistant cannot see ordersConnected? Correct workspace? Scope read_orders granted? Protected customer data approved in Partner?
WhatsApp shows no orders / asks for emailPerson needs a verified Hub email matching the Shopify customer. Reply with the email, then the OTP. Shop-wide list_orders is staff-only.
Customer sees another person's orderShould not happen — ownership is checked after Shopify responds. File a bug if it does.
Wrong store dataConfirm which shop is bound to this workspace
“Already connected to another workspace”Disconnect the other workspace first
Events not starting flowsEvent names + CRM Automation trigger — Event-driven triggers
Connect button failsClient ID/secret for this workspace? Shop domain *.myshopify.com? Partner redirect URL matches Qefro callback?