Lockstock

Docs / Connect

Connect Shopify

Connect a Shopify development store and its orders become Lockstock sales orders, matched to your items by SKU. Read-only.

Partly in the demo

Built and proven against a development store: connect, Sync now, SKU matching and the webhook handler. Shopify's own live webhook delivery has not been proven yet, and a live shop cannot be connected.

What it does

  • Each Shopify order becomes a sales order with the channel Shopify, and its lines are matched to items by SKU. Open it from Orders or from the synced orders list on the Shopify screen.
  • New, changed and cancelled orders arrive by webhook. A daily check and the Sync now button catch anything missed. Sync reads the last 60 days of orders.
  • An order that arrives twice, or again in an order file, makes no second sales order. Lockstock matches on the order name, such as #1001.
  • Read-only: Lockstock never changes anything in your store, and it does not push stock levels back to Shopify.
  • An order already fulfilled in Shopify does not take stock in Lockstock.

Before you connect

Do these in your own free Shopify development store.

  1. Create a development store in your Shopify Partners account and add some test products with SKUs.
  2. In the Dev Dashboard, create an app with read-only access: read_orders, read_products, read_inventory and read_locations. Nothing writes to your store.
  3. Copy the app's client id and client secret.
  4. To read a customer's name and ship-to address, select the Name and Address fields under Protected customer data access for the app. Development stores need no review for this. Without it, orders arrive with no address.

Connect

  1. Sign in as the owner and open Shopify under Stock.
  2. Enter the store address (your-store.myshopify.com), the client id and the client secret, and press Connect Shopify.
  3. Lockstock checks them with Shopify. If the store is not a development store, the app lacks one of the three read accesses, or a value is wrong, nothing is saved, the reason is shown and what you typed stays.
  4. On success the screen shows the store, a Development store badge, In sync, the last sync time and how many orders are in Lockstock. The first sync runs on its own.

The secret is stored encrypted on the server and is never shown again. Lockstock trades it for a short-lived Admin API token each time it syncs, about 24 hours, and does not keep the token. Only the owner connects, syncs or disconnects. Everyone else who can open Orders sees the status.

Syncing and the sync log

  • Sync now reads the store again. The sync log lists each run with what started it (connect, webhook, Sync now or daily check), its counts (read, new, changed, cancelled) and whether it finished or failed.
  • Repeating Sync now changes nothing that is already level: it reports the orders as unchanged.
  • If a sync fails, the status turns to Out of sync with the reason, the owner gets an alert, and what already imported is kept. The next webhook, Sync now or daily check tries again.
  • The Access list shows whether Lockstock holds read access to orders, products and inventory, and the Order webhooks list shows which of the three are registered.

Orders that need a SKU match

An order with a line whose SKU matches no item is not created. It waits under Needs SKU match, and the owner picks the Lockstock item for each SKU once. Lockstock remembers the match, creates the waiting orders and matches the same SKU on its own next time. A line with no SKU at all cannot be matched here: add a SKU to that product in Shopify, then press Sync now. Others can see the list, and the owner fixes it.

Limits to know

  • Orders: Shopify returns the last 60 days of orders to an app without the all-orders permission, which this app does not ask for.
  • A changed order raises quantities on the existing sales order in place. It does not set aside extra stock for the added quantity.
  • If an order is changed in Shopify after part of it has shipped in Lockstock, the change is not applied. The order shows under Orders that failed with that reason, and its lines stay as they were.
  • An order with no ship-to, or only a name, still imports. Customer name and address on a live store would need Shopify's own approval of the app, which has not been requested.
  • Webhook handling was proven with locally signed copies of a real order from the development store. Real deliveries from Shopify to the live site have not been seen yet.
  • You can still import a Shopify order export on Orders. Each row is one order line. An order that is already synced is skipped.

Disconnect

Disconnect asks Shopify to drop the order webhooks and deletes the saved credentials. Orders already synced stay in Lockstock. If Shopify cannot be reached, the connection is kept so you can try again.