Shopify
Ideal for abandoned cart recovery and order tracking solutions.
Installation
- Install the Shopify Marketplace app on the target AI Workspace.
- In the workspace Tools tab, Connect Shopify: shop domain plus that tenant’s Shopify app client ID and secret.
- Chat tools use the workspace HTTP connection (shop host + encrypted Admin API token).
- Webhooks POST to Qefro
/webhooks/http/shopify. HMAC is verified with that workspace’s app secret on the raw body; topics map to Business Events via package metadata, thenorchestration_events→ CRM Automation.
Operator steps: Connect Shopify. Package internals: shopify-runtime.
Authentication
OAuth authorization code. Client id/secret are entered per workspace at
Connect and encrypted at rest. Shop domain is validated (*.myshopify.com);
OAuth state is workspace- and session-bound. Workspace A cannot steal
workspace B’s shop.
Do not put Shopify app secrets in package YAML or process environment.
Events
| Event name | Source topic (metadata) |
|---|---|
order.created | orders/create |
order.updated | orders/updated |
order.cancelled | orders/cancelled |
customer.created | customers/create |
customer.updated | customers/update |
Envelope fields (idempotency, correlation, TTL): Event reference.
Tools
Lookup products, customers, and orders through generic HTTP tools
(read_products, read_customers, read_orders). Staff Console can
list the shop. Customers on WhatsApp/widget see only their own orders
(Hub email, OTP if needed, ownership after the response). Missing scopes
reject execution. Keep PII minimization and least privilege.
Details: HTTP tools.
Webhooks
- Receive provider webhook at the generic Qefro endpoint.
- Identify the workspace from the shop identity header (selects that tenant’s app secret).
- Verify HMAC on the raw body with that secret (constant-time). Reject missing/invalid signatures.
- Map topic → Business Event via metadata; emit onto
orchestration_events. - CRM Automation consumes the bus. Replay uses the Shopify webhook id.
Workflow checklist
Shopify go-live
- Auth — Connect Shopify OAuth with per-workspace app credentials; tokens encrypted at rest.
- Webhooks — Generic HMAC ingest; map to `order.*` / `customer.*`.
- Flows / CRM — Chat tools + automations on Business Events.
- Test emit — Idempotent webhook; watch Flow Runs / CRM.
- Observe — Connection status + event list + dead-letter retry.