Skip to content
Knowledge ERP Docs

API Reference ↗
Integrations

Shopify

Push products and inventory to Shopify, import orders as sales orders, push fulfillment back, and auto-match multi-location stock.

Availability — Included with the Inventory or Sales module. Manage modules and your plan tier in Account & Billing.

The Shopify integration keeps your storefront and Knowledge ERP in step — stock levels, orders, and fulfillment all flow between them.

Connecting #

Shopify uses a custom app token: paste your store URL and access token into the Shopify settings page — no OAuth dance required. From there you can view location mappings, see the webhook URL, and view sync stats.

You also choose the Location orders ship from when the Shopify location an order names isn't matched to one of yours. A store connected before this setting existed shows a prompt to choose one; until you do, those orders get your default Location, as before.

Saving makes one test call to your store first, and stores nothing unless the store accepts the token. If it refuses, the page shows Shopify's own error; if the store cannot be reached it says that instead, because the two mean different things.

What syncs #

  • Products (ERP → Shopify) — when a Product is saved in Knowledge ERP it is pushed to Shopify as a product; inventory levels stay aligned as stock moves. For a product already in Shopify, its name is updated and its price is set on the variant linked to it; its other variants are left as they are. A product that came from Shopify is sent its name and price only, so it keeps its vendor, product type, SKU and inventory settings there. If no variant is linked and the product has several in Shopify, its price is not sent.
  • Products (Shopify → ERP) — when you connect your store with Sync products on, the products already in it are imported into Knowledge ERP as new Products. The Shopify settings page shows how far the import has got, and how many products came in. After that, a product created or first edited in Shopify while it is connected with Sync products on is imported the same way. One that Knowledge ERP pushed to Shopify is recognized as its own. A product is imported once. After that, a change to its name in Shopify is made to the Product in Knowledge ERP too, and so is a change to its price while your store sells in your account's home currency; the Shopify settings page says when it does not. The price is the one on the variant linked to the Product. A change brought in from Shopify is not sent back to it, and is sent on to a connected WooCommerce store, as an edit made in Knowledge ERP is. If Knowledge ERP could not send a change to a product's details to Shopify, changes made to that product in Shopify are not brought in until the product is next saved in Knowledge ERP and reaches Shopify, which then has its name and price as they are in Knowledge ERP. Inbound product sync honors the Sync products toggle. A product you delete in Knowledge ERP stays deleted: when Shopify sends it again, it is skipped, not created again. Only a product's first variant is imported.
  • A linked variant deleted in Shopify — if the Shopify variant a Product is linked to is deleted in Shopify, or its whole product is, Knowledge ERP finds out from Shopify's product webhooks, or when it next sends that Product's details or price to Shopify. With Sync products on, Knowledge ERP deletes the Product too (it can be restored from History), even if it has units in stock or is on an open order. Until it is restored, its units stay in the units list without the Product's name, it is left out of the products list and the valuation report, and an open order line for it can still be shipped. With Sync products off, the Product stays, and its page says "The linked option was deleted in Shopify, so this product no longer syncs with Shopify." Either way, the Product no longer syncs with Shopify, and a Product you restore stays that way.
  • Moving your store to a new address — when you connect a store at a new address and Knowledge ERP finds products it sent to your old address there, the settings page asks whether it is the same store before importing anything. Changes the store sends meanwhile, and changes Knowledge ERP would send it, are held until you answer. If it is a different store, the changes the store sent are brought in when you answer, and the changes Knowledge ERP held for it are sent once its products are imported; the settings page shows how many of those are waiting. Answer Same store: keep its links to keep its products and orders linked to the ones already in Knowledge ERP, or It's a different store to import its products as for a new store: the ones that came from Knowledge ERP are linked to theirs, and the rest are added as new. If you answered Same store by mistake, disconnect the store and contact support.
  • Orders → sales orders — Shopify orders import as sales orders for fulfillment. An order that names one of your Shopify locations gets the Location it is matched to (see Multi-location below); any other order ships from the Location you chose for orders (your default Location, while none is chosen). An order you delete in Knowledge ERP stays deleted in the same way.
  • Fulfillment → Shopify — each shipment of an order that came from Shopify is sent to Shopify as a fulfillment of the items in it that Knowledge ERP can match to the Shopify order, with its tracking number and carrier, and Shopify is asked to tell the customer. The shipment on the order's page shows any items not sent to the store. A shipment made on the Ship screen is sent about five minutes after you ship it, so the items you ship into it under the same tracking number go together; one brought in from ShipStation is sent straight away. Items shipped into a shipment after it was sent go as another fulfillment. A send that fails is tried up to three times, about a minute apart, and then not again by itself: the shipment's items stay under Not sent to the store on the order's page, except in the case that follows. If a shipment with no tracking number may have reached Shopify without Knowledge ERP recording it, it isn't sent again, because Knowledge ERP can't tell whether Shopify got it: the shipment on the order's page says to check the order in Shopify. An order with shipments that you set to Shipped by hand is sent the rest: one last fulfillment, with no tracking number, of what Shopify still shows as unfulfilled, apart from the items in a shipment still waiting to be sent that Knowledge ERP can match to the Shopify order, which go with that shipment. Items in a shipment that Knowledge ERP isn't sure reached Shopify are left out of the rest too, so the order in Shopify can stay partly fulfilled. An order you set to Shipped by hand when it has no shipments is sent as one fulfillment of the whole order, as before.
  • Multi-location — Knowledge ERP locations are matched to Shopify locations by name automatically. Part-used units are added up by how full each is at each matched location, and only whole units are sent.

How it runs #

Observers watch Products, inventory movements, and sales orders to keep things in sync automatically, and inbound events arrive via Shopify webhooks — orders (orders/create, orders/updated) and products (products/create, products/update, products/delete). Point those webhook topics at the webhook URL shown on the settings page.

Shopify shows a signing secret for your store's webhooks, in the same place you add them (Settings → Notifications → Webhooks). Paste it into Signing secret under Webhook Setup on the settings page and choose Save secret. Each delivery is checked against that secret, and a delivery that is not signed with it is refused. Save it before you rely on the webhook: a store with no saved secret has nothing of its own to check deliveries against. Once saved it is not shown again — paste a new one to replace it.