Shopify
X-Sitter works with a Shopify shop through a connection (the access to the shop) and jobs (automatic tasks such as importing products, setting the stock or reporting tracking numbers back). You manage both under Administration › Jobs & connections (Administration › Jobs & Verbindungen) – how that works in general is described in Jobs & connections. This page covers what is special about Shopify.
Before you start
- Your user needs the permission Jobs & connections in the Administration area. As a client, your logistician must also have released the jobs mask for you – see Jobs & connections.
- Your package has room for the connection and the jobs.
- The shop owner has approved the X-Sitter app in Shopify with all requested permissions. If you connect the shop with your own access data instead, the custom app in the shop needs the same permissions (stock, locations, fulfillments and fulfillment orders).
How a shop gets connected
A connection created by an installation:
- gets the shop name from Shopify as its Comment (Bemerkung) – if Shopify returns no name, the first part of the myshopify domain. So you can tell several shops apart in the connection dropdowns of the jobs. A comment you entered yourself is kept when the merchant approves the app again.
- is automatically shared with (Teilen mit) the logistician when the shop belongs to a client. The logistician's jobs (product import, stock) can then choose the shop as their connection without seeing the access data.
X-Sitter always uses the current version of the Shopify Admin API for every shop; there is no version to choose on the connection.
Stock location in the shop
Shopify keeps stock per location. X-Sitter needs its own location in the shop, and you no longer have to look up a location ID: the job Bestände setzen (shopify-set-products-inventory) sets the location up on its first run and enters it in the connection. If the connection is set to Fulfillment service explicitly, Fetch orders (Bestellungen holen) does so as well.
Step by step
- Open Administration › Jobs & connections (Administration › Jobs & Verbindungen), click Connections (Verbindungen) and open the Shopify connection.
- Leave Stock location in the shop (Lager im Shop) on Automatic (Automatisch) – this fits in most cases – and leave Location ID (Location-ID) empty.
- Click Save (Speichern).
- Create the job Bestände setzen (
shopify-set-products-inventory) for the company that owns the articles (for a client shop: the client), choose the Shopify connection, switch Active (Aktiv) on and save. - Create the job Fetch orders (Bestellungen holen,
shopify-get-orders) with the same connection the same way – after an app installation it exists already. How it fetches the orders is described underOrders through the fulfillment service . - After the first run, the name of the location and the time of the last check appear below Location ID on the connection.
Options
The jobs check the location again at most every 6 hours.
Stock sync
The job Bestände setzen sends the available stock of the client's articles in the logistician's warehouse to the location in the shop. It repairs typical problems itself:
- An article that is not yet stocked at the location is activated there and sent again.
- If the location was deleted in the shop, the job determines it anew.
- An article that Shopify rejects is left out; all other articles are still sent. You receive a Telegram message with the rejected articles.
Only articles with a Shopify inventory ID take part. The product import sets it – except for bundles and for variants whose stock is not tracked in Shopify; their stock X-Sitter does not overwrite.
Product import: article names of variants
The product import (shopify-get-products) reads all products of the shop with all their variants, page by page. As logistician you can create one product import per client shop in your own company: choose the client's shared shop as Connection (Verbindung) and the client as Owner (Eigentümer).
With Article name for variants (Artikelname bei Varianten) in the job settings you decide how the articles of a product with several variants are named:
Existing articles are renamed with the next run. A product name that already ends with the addition stays as it is, and a product without real variants keeps its name.
Product import: categories and bundles
- Categories: A separate nightly run creates categories from the collections of the shop – all collections, also more than 50. Existing categories are renamed at most, none is deleted. If a Single category (Einzelne Kategorie) is chosen in the job, every imported article gets this category and the collections of this shop are skipped. The import does not assign a collection to the articles themselves.
- Bundles: A bundle from Shopify (a product made of several components, e.g. through the Shopify Bundles app) is created by the import as a normal article, but without stock sync. In the order Shopify sends the components as positions of their own, so the components are picked. Which bundle was ordered is not part of the order then – unless you switch on
bundles as a set in the job Fetch orders. If the shop sends a set as one position with its own SKU instead (some bundle apps), create a bill of materials (Stückliste) with this SKU; saving it resolves open orders with the set.
Orders through the fulfillment service
The job Fetch orders (Bestellungen holen, shopify-get-orders) is the only order import for Shopify. If the connection is set to Fulfillment service (the default for clients of a logistician), it works like this:
- Shopify routes an order to the logistician's location when the articles have stock there.
- The merchant requests the fulfillment in Shopify – usually automatically, otherwise with Request fulfillment on the order.
- The job takes the order with exactly the lines and quantities of this location and accepts the request. The shop then shows "Vom Lager übernommen, die Bestellung wird vorbereitet." (taken over by the warehouse).
- After shipping,
Tracking numbers back to Shopify reports the shipment.
If the merchant wants an accepted order back (Request cancellation), the job cancels the order and accepts the cancellation as long as the warehouse has not started it. Otherwise you get a Telegram message and stop the shipment yourself. An order the merchant has not requested a fulfillment for after two hours is reported by Telegram as well.
If the connection is set to Location of the shop, the job fetches all open orders of the shop – for companies that ship themselves and for shops that have not been switched yet.
Orders the merchant ships themselves
Sometimes the merchant ships an order themselves, for example from their own store, and marks it as fulfilled in Shopify. The job notices this on both ways: every run checks the orders that were fully fulfilled in Shopify since the last run, archived ones included.
An order the merchant fulfilled before the job fetched it never reaches the warehouse. Partly fulfilled orders change nothing.
Switching a shop to the fulfillment service
- The job Bestände setzen exists for the client (see
Stock location in the shop ). - On the connection, set Stock location in the shop (Lager im Shop) to Fulfillment service in the name of the logistician, empty Location ID and save. The next run creates the location in the shop, stocks the articles there and sets the stock.
- The merchant sets the stock of these articles at their previous locations to 0. Otherwise Shopify adds both locations up and keeps routing orders to the old one.
- The merchant has fulfillment requests sent automatically.
Fetching orders: release by tag, feedback and greeting cards
The job Fetch orders (shopify-get-orders) creates the orders of the shop as orders in X-Sitter. Its settings have two fields under Release and feedback via tags that let the merchant control the hand-over:
A tag the merchant sets later is found by the next run of the job at the latest, even when newer orders have been taken meanwhile. Orders placed before the date in Orders from (Bestellungen ab) are not opened, tag or not.
What the customer enters ends up in the note: the note of the order, additional cart details and the properties of a line (e.g. the text of a greeting card or an engraving) go line by line into the note of the order, prefixed with the article name for lines, e.g. Greeting card: Card text: All the best, Grandma!. The properties are stored on the position as well. Internal app fields (name starting with _) are left out. The note is shown in the order details, during picking and at the packing station.
Bundles and gift boxes as a set
If the shop sells bundles (Shopify Bundles app), for example a gift box made of three articles, Shopify only lists the components as positions in the order. Which box the customer ordered is then missing in the order: the warehouse sees loose articles and does not know what belongs together in one box. With the setting Take in bundles (e.g. gift boxes) as a set (Bundles (z. B. Geschenkboxen) als Set übernehmen) the bundle arrives in the order as a set.
- Open Administration › Jobs & connections and there the job Fetch orders (
shopify-get-orders) of the shop. - Under Bundles from the shop (Bundles aus dem Shop), choose Yes - the bundle is listed with its SKU above its components in the field Take in bundles (e.g. gift boxes) as a set.
- Click Save.
From the next run on, the job additionally asks for the bundles of every new order and creates the order like this:
This is what changes in the warehouse:
- Order details and packing station name the set below every component, e.g. "Set: 2 × Christmas Gift Box (GB-XMAS)" – quantity, name and SKU of the ordered box. The box itself is no row there. See Order details and Packing.
- Picking lists: like any set, the box only leaves the warehouse complete. The order only gets onto a picking list once all components are in stock – unless partial delivery is allowed on the order. See Orders with a set that cannot be delivered completely.
- Prices and customs papers: Shopify spreads the price of the box over its components and invoices them that way. The components therefore keep their prices, the head position is in the order with 0.00. Customs papers keep declaring the components with their prices – as on the invoice of the shop.
- Returns portal: your customer returns the box as a whole; the portal shows the sum of its components as the price. See Returns portal.
Good to know:
- The setting applies to orders taken in from now on. Orders that already exist do not change.
- The article of the box does not have to exist in X-Sitter. If there is an article with the SKU of the box, the head position is linked to it; otherwise it only carries SKU and name.
- If the job cannot read the bundles of an order once (Shopify does not answer or the app lacks the
read_ordersscope), it does not create the order in this run and tries again in the next one – the order never arrives without its box. You get a Telegram message. - With No - the components come in as separate positions (the default) everything stays as before: loose positions, the box is not named.
- If the shop sends a set as one position with its own SKU (some bundle apps), you do not need the setting – create a bill of materials for it.
Attaching the shop's invoice to the order
If the merchant creates invoices with a Shopify app such as Order Printer Pro, X-Sitter can fetch the invoice as a PDF when the order is created and attach it under Documents – handy for shipments to third countries (Switzerland, United Kingdom) where the invoice belongs to the customs papers.
- In Order Printer Pro the merchant sets up the download link under Automated PDFs › Set up PDF link and sends you the link code (one line with the placeholders for the order id and the order number,
order.idandorder.name). - Paste the link into the job Fetch orders under Invoice from the shop, field Invoice link of the shop app – the whole line with
href="…"works too. - Choose which orders get the invoice (shipments outside the EU or all orders) and whether it should be printed at the packing station – then the station prints it like an uploaded delivery note.
The invoice shows up in the order details under Documents with the kind Invoice. If an invoice cannot be fetched once (wrong link, shop answers with a page instead of a PDF), the order is still created and you get a Telegram message – attach the invoice by hand in that case.
Tracking numbers back to Shopify
The job shopify-send-tracking-back reports the tracking numbers of sent orders to Shopify, so the order in the shop is fulfilled and the end customer is notified. This also works for shops connected through the X-Sitter app or a client app – they have no API key of their own. If one order or one shop fails, the job carries on with the next one; the failed order is tried again with the next run. If an order sits at the fulfillment service and its request has not been accepted yet, the job accepts it before reporting – Shopify refuses the tracking number without the acceptance.
Good to know / Troubleshooting
Problems of the Shopify jobs reach you as the Telegram message Shopify - error (Shopify - Fehler) – set up Telegram notifications to receive them. The same message is sent at most every few hours per shop.