Skip to content
E-invoicingIntegrations

Connecting Shopify and managing e-commerce orders in SamBooks

Reading time

10 min read

Download PDF

From connecting your store to the invoice or daily-takings record for each order, through returns and shipments: how the Shopify integration works, what it does on its own, and what stays an action you take.

What this covers

Connecting your Shopify store to SamBooks imports catalog and orders without retyping them, and SamBooks handles the Italian tax side of every order for you: it records the daily takings (corrispettivo) for a private customer, tracks the OSS threshold for EU distance sales, or prepares an invoice for a customer with a VAT number — never the VAT calculated by the marketplace, always VAT recalculated under Italian rules. From each imported order you can also generate a return or a shipment, with dedicated actions that show up right on the order.

This is the only guide on the Shopify integration: it covers the whole journey, from connecting the store to managing a single order. It does not cover general order logistics (fulfilling into a delivery note, confirming, carriage-paid vs. customer-collect terms): for that see Manage sales orders, which applies to an order from Shopify too. It also doesn't cover sending an invoice to the SDI, covered in Send an invoice to the tax exchange system (SDI).

Before you start

  • You need a role with write access on the Warehouse/Logistics area — Gestore (full-access manager), Amministrativo, or Logistica — to connect the integration and use the tax actions on an order.
  • You'll need your store's .myshopify.com domain (found in your Shopify settings): it's the only thing you type by hand, the rest goes through OAuth authorization.
  • The connection is per company: each SamBooks company connects its own Shopify store, with its own token.

Step by step

1. Connect your Shopify store

Open Settings → Company → Integrations and press "Connect" on the Shopify card, or — quicker if you're already working on orders — go to Orders and press the "Integrate Shopify" button at the top: both paths lead to the exact same connection window. Three steps, identical either way:

  1. Enter your store domain (e.g. my-store.myshopify.com).
  2. Press "Connect Shopify": SamBooks takes you to Shopify to authorize the app.
  3. On return the store is connected: you can import the catalog and orders, and sync stock.

The OAuth token stays encrypted and is never shown in the interface. If the connection fails, check that you typed the right domain (ending in .myshopify.com) and try again.

2. Sync catalog, orders and stock

Once connected, the same window shows "Connected" status, the store domain, the last sync time, and three buttons:

  • Catalog — imports products and photos into SamBooks items.
  • Orders — imports recent orders as sales (up to 50 per run).
  • Inventory — pushes SamBooks quantities to the store, in the opposite direction: from SamBooks to Shopify.

Every sync lands in the "Recent syncs" list, with type, origin (manual or automatic), status and outcome (for catalog: created/updated; for orders: imported/already present; for inventory: how many stock levels were pushed). A Catalog sync can be undone as long as the items it created haven't been used elsewhere yet — undoing only removes those, not items already tied to an order or a stock movement; the action itself can't be reversed once confirmed, but you can re-sync at any time.

At the bottom of the window is "Disconnect": it removes the saved token without deleting anything already imported; you can reconnect the store whenever you like.

3. How an order arrives, and what SamBooks does on its own

A Shopify order enters SamBooks either via webhook (in real time) or through the manual "Orders" sync: SamBooks always recognizes it, never duplicating it even if it arrives twice. For every order:

  • items are matched by SKU or, failing that, by a description identical to an item already on file, so the catalog doesn't get duplicated; if nothing matches, SamBooks creates the item from the real product — name, code, VAT rate taken from the order line's actual tax information, or from the rate already set on the item if one exists; only when neither is available does it fall back to a fixed 22%;
  • the customer becomes a company in your directory if it has a valid VAT number (B2B), or a private individual with first name, last name, tax code and email (B2C); here too, no duplicate for the same Shopify customer;
  • a sales order is created with the lines already net of tax, the discount applied to the gross amount before that, shipping costs, and the payment method taken from Shopify's payment gateway; the order starts already confirmed, with stock committed right away.

An imported order carries the "E-commerce" badge, both in the list and in the detail header: it's how you tell at a glance an order that came from Shopify apart from one created by hand.

4. Tax qualification: daily takings, OSS or invoice — decided by SamBooks

For every imported order, SamBooks decides the right tax document on its own, recalculating VAT under Italian rules — "never the marketplace tax", as the connection window itself puts it:

  • An Italian private customer, or an EU private customer below the distance-sales threshold → a daily takings record is created (channel "E-commerce"), including the shipping and payment lines. That record reads and downloads like any other daily-takings record, described in Record daily takings.
  • An EU private customer above the distance-sales threshold → the order enters OSS (one-stop-shop) tracking instead, with no Italian daily-takings record.
  • A non-EU private customer → a daily-takings record with non-taxable nature.
  • A customer with a valid VAT number (B2B) → the order is flagged for an immediate TD01 invoice (because payment was already collected at checkout), but the invoice itself isn't created in this step: it's created when you press "Issue invoice", or automatically if you've turned that on — see step 5.

The connection window also tracks the OSS threshold: a card shows the year's cumulative total against the EU B2C distance-sales threshold, with the badge "Threshold exceeded → OSS" once you're past it, or "Below threshold" while you're still under it.

5. Issuing the invoice for a B2B order — always a draft

On a B2B order that hasn't been invoiced yet, the "Issue invoice" button appears at the top of the order detail header. Pressing it makes SamBooks register the TD01 invoice: it's created as a draft, ready for review — it is not sent to the SDI on its own. The order detail's "Chain" tab doesn't show this link: the invoice generated from an e-commerce order has to be found among Sales invoices instead (by customer or by date), from where you review it and send it yourself with "Send to SDI" (see Send an invoice to the tax exchange system (SDI)), exactly as with an invoice created by hand.

The connection window also has an "Emit B2B invoices automatically" switch (off by default, the recommended setting): turning it on makes every new B2B order generate its own draft invoice automatically at import time, instead of waiting for you to press "Issue invoice". Even with the switch on, the invoice is still only ever created as a draft: sending it to the SDI always remains an action you take, with its own explicit confirmation. There is, today, no mode that transmits an e-commerce invoice to the SDI automatically.

6. Returns: a different path for B2C and B2B

On an e-commerce order with a return still to record, you'll see "Record return" (for a B2C order, backed by a daily-takings record) or "Generate credit note" (for a B2B order, backed by an invoice): the button's label changes depending on the type of tax document the order has already produced, and confirms with "Return recorded". From the interface the return is always total in both cases: the button doesn't offer a way to select which lines are being returned.

  • B2C (daily takings) — SamBooks records a reversal of the daily takings (negative amounts that reduce the VAT already declared as due). It is not a credit note: it's the same correction described in Record daily takings, which in fact points back to this very action — the return on a B2C daily-takings record starts from the linked e-commerce order, not from the Daily takings page itself.
  • B2B (invoice) — SamBooks always records the physical return of the goods (stock coming back in); if the original invoice has already been transmitted to the SDI, it also generates a draft TD04 credit note, ready for review and to be sent like any other — see Issue a credit note. If the invoice is still a draft, the physical return is still recorded, but the credit note can only be generated after sending it — or you can edit or cancel the draft directly instead.

An order allows only one return: a second attempt on the same order returns the outcome already recorded, it doesn't create a new one.

7. Shipments: created as a draft, the label is still yours to generate

The "Create shipment" button appears as long as the order has no shipment linked yet, and prepares a draft shipment with the delivery address taken from the order — ready for rate comparison and the label with ShippyPro, if you've also connected that integration.

The "Create the shipment automatically" switch (on by default) does the same job on its own for every imported order, so the delivery address is already set up without you stepping in manually. Either way — button or automation — the shipping label stays an explicit, paid step: the switch organizes the shipment, it doesn't spend money on it, and it never generates labels on its own.

If something goes wrong

  • "Could not connect to Shopify" — check the domain: it must end in .myshopify.com.
  • An imported order has no tax document yet — check whether the linked customer has a VAT number: if so (a B2B order), press "Issue invoice"; if it's a private customer (B2C), a daily-takings record should already have been created at import time — otherwise the order may not have been qualified yet (wait for the sync to complete, or trigger it again).
  • You can't find "Generate credit note" on a B2B order — it only appears once the invoice has already been issued and linked to the order: if the order has no invoice yet, press "Issue invoice" first.
  • You're looking for the daily-takings reversal generated by a B2C return — there's no direct link on the order: look for it under Daily takings, filtering by date and channel "E-commerce".
  • You turned on automatic emission but the invoice wasn't sent to the SDI — that's expected: the automation only creates the draft, sending it always stays manual.

Frequently asked questions

How do I connect my Shopify store to SamBooks? From Settings → Company → Integrations, Shopify card, or from the "Integrate Shopify" button on the Orders page: enter your .myshopify.com domain and authorize the app on Shopify's page.

How do I invoice an imported Shopify order? If it's a B2B order (customer with a VAT number), press "Issue invoice" on the order header: a draft TD01 invoice is created, which you send to the SDI whenever you're ready. A B2C order generates a daily-takings record instead, not an invoice.

How do I handle a return on an e-commerce order? Open the order and press "Record return" (B2C, daily takings) or "Generate credit note" (B2B, invoice): the system recognizes on its own which case applies. The return is always total: there's no way from the interface to select only some lines.

Why doesn't the return on a Shopify order generate a credit note? Because the source document was a daily-takings record, not an invoice: for a B2C order, the return corrects the daily-takings record with a reversal, not a credit note, which only exists for invoices.

How do I create a shipment for an order that came from Shopify? Press "Create shipment" on the order, or leave the switch on that creates it automatically for every import: either way it's created as a draft, and you generate the label separately.

Do Shopify invoices get sent to the SDI on their own? No. Even with "Emit B2B invoices automatically" on, SamBooks only creates the draft: sending it to the SDI is always an explicit action of yours.

What happens to stock levels when I connect Shopify? The "Inventory" sync pushes SamBooks quantities to the store: it's a manual update, which you trigger whenever you want from the same connection window.

Ready to try SamBooks?

7-day free trial, no credit card required.

Start for free