How sypnosis2019/auto-fulfillment-location-routing works
This is a Shopify embedded app for configuring automatic fulfillment routing. An administrator authenticates, chooses a fallback location and enables routing; Shopify order-created webhooks then trigger a service that finds eligible out-of-stock Continue-policy items and moves them through the Admin GraphQL API. The graph also shows login, session persistence, and documented webhook handling. Source excerpts establish the settings and order-routing calls; less detailed webhook behavior is documented or omitted where its implementation was not sampled.
Main entry points: shopify.server.ts Shopify integration · auto-routing.server.ts Routing settings records · db.server.ts Prisma database · route.tsx Login flow
Components 16
App access
- Entry page
app/routes/_index/route.tsx - Login flow
app/routes/auth.login/route.tsx - Login errors
app/routes/auth.login/error.server.tsx - Embedded app shell
app/routes/app.tsx - Shopify integration
app/shopify.server.ts - Scope-update webhook
app/routes/webhooks.app.scopes_update.tsx - Uninstall webhook
app/routes/webhooks.app.uninstalled.tsx
Routing settings
- Routing settings UI
app/routes/app.settings.tsx - Routing dashboard
app/routes/app._index.tsx
Order routing
- Auto-routing service
app/services/auto-routing.server.ts - Order-created webhook
app/routes/webhooks.app.orders_create.tsx
Persistence
- Session storage adapter
app/shopify.server.ts - Prisma database
app/db.server.ts - Routing settings records
app/services/auto-routing.server.ts
Other components
- Shop administrator
- Shopify platform
Connections 24
- Shop administrator → Entry page: opens
app/routes/_index/route.tsx - Entry page → Login flow: submits login
app/routes/_index/route.tsx - Login flow → Shopify integration: validates login
app/routes/auth.login/route.tsx - Login flow → Login errors: formats errors
app/routes/auth.login/route.tsx - Shopify platform → Shopify integration: authenticates
README.md - Embedded app shell → Shopify integration: authenticates admin
app/routes/app.tsx - Shop administrator → Routing settings UI: configures routing
README.md - Shop administrator → Routing dashboard: views settings
app/routes/app._index.tsx - Routing settings UI → Shopify integration: authenticates admin
app/routes/app.settings.tsx - Routing dashboard → Shopify integration: authenticates admin
app/routes/app._index.tsx - Routing settings UI → Routing settings records: reads and saves
app/routes/app.settings.tsx - Routing dashboard → Routing settings records: reads and saves
app/routes/app._index.tsx - Order-created webhook → Shopify integration: authenticates webhook
app/routes/webhooks.app.orders_create.tsx - Shopify platform → Order-created webhook: sends order event
README.md - Order-created webhook → Auto-routing service: processes order
app/routes/webhooks.app.orders_create.tsx - Auto-routing service → Routing settings records: loads settings
app/services/auto-routing.server.ts - Auto-routing service → Shopify platform: queries and moves fulfillment
app/services/auto-routing.server.ts - Shopify integration → Session storage adapter: configures sessions
app/shopify.server.ts - Session storage adapter → Prisma database: persists sessions
app/shopify.server.ts - Routing settings records → Prisma database: queries and writes
app/services/auto-routing.server.ts - Scope-update webhook → Shopify integration: authenticates webhook
app/routes/webhooks.app.scopes_update.tsx - Scope-update webhook → Prisma database: uses database
app/routes/webhooks.app.scopes_update.tsx - Uninstall webhook → Shopify integration: authenticates webhook
app/routes/webhooks.app.uninstalled.tsx - Uninstall webhook → Prisma database: uses database
app/routes/webhooks.app.uninstalled.tsx