Quick start (5 min)
- Install from the Shopify App Store → search "Flowgration" → Add app. Shopify walks you through the OAuth consent screen.
- After install, the embedded app opens in Apps → Flowgration inside Shopify admin.
- Pick one path:
- I have a Flowgration account → paste an API key from Settings → API keys (must start with sk_live_).
- I don't have an account yet → click Auto-onboard. The app sends a magic link to the store's primary owner email.
- Click the magic link. Flowgration creates the org, the user and the starter CRM, then drops you back into the embedded app.
- The store dashboard turns green and webhooks start flowing within ~10 seconds.
Two ways to connect
Flow A — existing account
Shopify (embedded app) Flowgration
│ │
│ POST /onboarding/initiate (mode=connect, api_key=sk_live_…)
├─────────────────────────────►│
│ │ verify key → upsert PluginIntegration
│ ◄────────────────────────────┤ 200 { review_url, suggested_mappings }
│
│ redirect to /app/integrations?integration_id=…- Generate an API key in Flowgration.
- Paste it into the embedded app's "Connect existing account" panel.
- The app POSTs /api/plugin/onboarding/initiate with mode=connect, platform=shopify, store.url=<myshop>.myshopify.com.
- Flowgration upserts the PluginIntegration row and returns a URL to review mappings.
Flow B — auto (magic link)
Shopify Flowgration Store owner inbox
│ │ │
│ POST /onboarding/initiate (mode=auto) │
├────────────────────►│ │
│ │ create PluginOnboarding │
│ ├──── magic-link email ─────►│
│ │ │
│ │ ◄── owner clicks link ─────┤
│ │ materialize_crm
│ │ 302 → /plugin-callback- App scans the shop (counts, currency, primary domain, themes).
- POSTs the discovery payload + owner email to /onboarding/initiate.
- Owner clicks the one-time link (TTL 24h).
- Flowgration creates org + user + CRM, mints an API key, and redirects to /plugin-callback.
- The embedded app polls /onboarding/blueprint?token=… and shows the loading screen while the CRM materialises.
Compatibility
- Shopify Admin API Shopify Admin API version 2024-10 (rotates quarterly; the app bumps the version with each Shopify release window).
- Embedded app — runs inside the Shopify admin iframe. Polaris UI for visual consistency.
- App Bridge App Bridge v4 for navigation, toasts and resource pickers.
- Plan tiers — works on Basic Shopify and above. Shopify Plus features (multi-store, GraphQL Bulk Operations) are not yet exposed; backfill still works via REST.
What gets synced
| Event | Topic | When it fires | What Flowgration does |
|---|---|---|---|
order.created | orders/create | New order placed (any status) | Creates Order + line items, links to Contact |
order.updated | orders/updated | Order edited | Updates Order; diff is written to Activity log |
order.cancelled | orders/cancelled | Order cancelled | Marks Order cancelled, fires journey trigger |
order.fulfilled | orders/fulfilled | Fulfilment created | Marks Order fulfilled, fires journey trigger |
customer.created | customers/create | New customer record | Creates Contact with mapped fields |
customer.updated | customers/update | Customer edited | Updates Contact |
product.created | products/create | New product published | Mirrors product to Flowgration catalog |
product.updated | products/update | Product edited | Updates catalog row |
product.deleted | products/delete | Product deleted | Soft-deletes catalog row |
cart.abandoned | checkouts/update | Checkout abandoned ≥30 min, email known | Fires cart.abandoned trigger for journeys |
Each webhook payload is idempotency-keyed by X-Shopify-Webhook-Id, so retries from Shopify (which can repeat for 48h) are deduped.
Discovery
On first connect Flowgration calls Shopify's REST API to read non-PII metadata:
- Counts — orders.count, customers.count, products.count, abandoned_checkouts.count.
- Currency — shop's base currency from /shop.json.
- Themes — the active theme name and version.
- Primary domain — used as the store identifier on PluginIntegration.
No customer, order or product data is read at this stage — that arrives later via webhooks (and the optional backfill).
Backfill
The integration page has a Backfill button per object (Orders, Customers, Products). It:
- Uses Shopify REST pagination (250 per page, max page size).
- Posts each page through the same /sync pipeline as live webhooks.
- Persists the cursor server-side; if interrupted, resumes from the last cursor on the next click.
- Deduplicates against PluginEventLog so re-running is safe.
Typical throughput: ~2 000 records/minute within Shopify's REST rate limit (40 calls/burst, 2/sec sustained).
GDPR mandatory webhooks
Shopify requires every public app to implement three webhooks. They are configured in shopify.app.toml and registered automatically on install.
| Webhook | Trigger | What Flowgration does |
|---|---|---|
customers/data_request | Customer requests their data | Queues a job; emails the merchant a JSON export of every Contact + Order + Activity tied to the customer email within 30 days. |
customers/redact | Customer requests deletion (30d grace) | Wipes PII (first_name, last_name, email, phone, street, city, country, postal_code, job_title, company_name, notes) on the matching Contact. Keeps the row so referencing Orders/Activities don't break. |
shop/redact | Shop uninstalled (48h grace) | Wipes the entire PluginIntegration, revokes the API key, and runs customers/redact-style wipe on every Contact that originated from this shop. |
All three return HTTP 200 within the Shopify-mandated 5-second window by enqueueing the work and processing it in a worker.
Required scopes
These are the scopes the app requests on install (from shopify.app.toml):
| Scope | Why |
|---|---|
read_orders | Read order data for live sync and backfill |
read_customers | Read customer profiles to create Contacts |
write_customers | Optional. Used when the merchant grants data_write so Flowgration can push tag/segment updates back to Shopify customers |
read_products | Mirror product catalog |
read_checkouts | Detect abandoned checkouts |
read_inventory | Surface stock levels in the Flowgration product view |
read_fulfillments | Track order fulfilment status |
read_shipping | Map shipping addresses to Contact address fields |
read_locales | Set Contact language from the order locale |
read_marketing_events | Attribute orders to Flowgration campaigns |
The app does not request write_orders, write_products or any financial scope. Refunds and order edits stay inside Shopify.
Troubleshooting
- Shopify's OAuth screen showed scope checkboxes the merchant unchecked. Open Partner Dashboard → App setup → Scopes and compare against the list above.
- Re-install with all scopes granted.
- A previous app/scopes_update event revoked a scope the webhook depends on. Check the lastScopes column on the PluginIntegration row.
- Re-grant scopes via /admin/apps/flowgration/grant.
- Confirm Shopify's webhook status: Settings → Notifications → Webhooks. Failed deliveries are visible there.
- Guest checkouts have no Shopify Customer record. Flowgration falls back to order.customer.email (or order.email) and creates a Contact with that address.
- If both are absent, the order is dropped with a warning in PluginEventLog. This happens when a merchant disables "require email at checkout" — we recommend against it.
- The webhook payload's currency field is forwarded as-is. The Order row stores the original currency.
- Flowgration's reporting layer converts to the org's base currency using daily FX rates from openexchangerates.org. Reports show both values.
- Per-order FX rates are not stored at write-time — if you need point-in-time rates, enable Audit-grade FX under Settings → Currencies (Business plan).
- Webhooks are processed with the enqueue-then-forward pattern: the HTTP handler returns 200 in <5s after writing to the job queue. Shopify never waits on your CRM.
- If Shopify's webhook log shows long response times from Flowgration, check https://status.flowgration.com.
- The shop's session token expired (Shopify rotates these aggressively). Re-open the app from Apps → Flowgration; App Bridge will refresh the token automatically.
- If the banner persists, uninstall and reinstall. Re-installation is idempotent — the same PluginIntegration row is reused.
- Shopify only sends checkouts/update if the customer entered an email address at checkout. Guest carts without email are invisible to apps.
- The 30-min threshold is enforced client-side by Flowgration's worker, not by Shopify. If you see events firing for carts younger than 30 min, that's a different abandoned-cart app.
- The shop was uninstalled, the customers/redact job ran, then the app was reinstalled the next day. The redact wiped emails on Contacts → the new sync creates fresh ones because dedup is by email.
- Use Settings → Duplicates in Flowgration to merge them. Or reinstall within the 48h shop/redact grace window — the redact job won't have run yet.
- Each shop must connect with its own API key. Reusing one key across multiple stores in mode=connect is supported but experimental.
- The PluginIntegration row is keyed by (organization_id, platform, store_url), so different <shop>.myshopify.com domains route correctly even on the same key. Same domain = same row.
- Shopify rotated the shared secret. This happens automatically on app re-install. Flowgration regenerates its copy on the next successful auth callback.
- If it persists, manually rotate the secret in the Partner Dashboard and click Settings → Refresh secret in the embedded app.
Privacy & data
What leaves your shop
- Only the events listed in What gets synced, plus customer and order fields covered by the granted scopes.
- No raw card data (Shopify never sends it).
- No images or theme files.
Where it goes
Frankfurt, EU (AWS eu-central-1). Frankfurt, EU (AWS eu-central-1). Data never leaves the EU in normal operation.
Retention
- Webhook events live in PluginEventLog for 90 days then are aggregated.
- Contact and order data persist until you uninstall the app or the merchant deletes the contact.
- customers/redact wipes PII immediately; aggregate analytics keep anonymous counters.
Uninstall
From Shopify
Apps → Flowgration → Uninstall. Shopify revokes the OAuth token, fires app/uninstalled, and (after 48h) fires shop/redact.
What gets cleaned
- In Flowgration (Prisma side): the PluginIntegration row goes to disconnected; the API key is revoked. Synced data is kept until shop/redact arrives, at which point all Contacts and related PII originating from this shop are wiped.
- In Shopify (server side): all webhook subscriptions are removed. The merchant's customer/order records are untouched — Flowgration never wrote to Shopify.