App documentation

LS RealMargin: Landed Cost · Updated 19 October 2026

This guide explains how to record a shipment, write a true average cost to Shopify, and read the margin restatement. It matches the app as shipped. It does not describe FIFO layers, purchase orders, or accounting sync, because the app does not do those things.

What you need

Install the app from Shopify admin. The app reads products and inventory, writes inventory cost, and reads orders. You choose products from your catalog. You type the supplier unit cost, quantity, and any extra invoices. Nothing is written to Shopify until you preview and confirm Apply.

Create a receipt

Open New receipt. The wizard has three steps.

  1. Shipment. Enter a reference (up to 60 characters), the supplier name, and the arrival date. The arrival date is the start of the sold-units window on the preview and the margin report.
  2. Products. Search or pick variants. For each line enter quantity, the supplier unit cost, and a weight if you will allocate by weight. On Growth you can paste or upload a CSV of lines instead of picking them one by one.
  3. Extra costs. Add one or more rows: freight, duty, brokerage, insurance, fee, or other. Each row has an amount and a split method. You can use a different method on each row.

Save the draft, then open it and run Preview before Apply. A draft does not change Cost per item.

How extra costs are split

Landed unit cost is the supplier unit cost plus that line’s share of the extra costs. Amounts are calculated in integer cents so rounding does not drift.

Supplier currency

The store currency is read from Shopify. On Growth, if the supplier invoice is in another currency, enter a manual exchange rate on the receipt. The app does not fetch live rates. Free and Starter keep amounts in the store currency.

Preview

Preview reads the current Cost per item and on-hand quantity from Shopify, builds the landed cost, and shows the weighted average that Apply would write. It also shows warnings, for example when inventory is not tracked. A warning does not block the calculation. Cost is still valid on an untracked variant, but Shopify will not hold a stock count for it.

If order access is approved, preview also shows units sold since the arrival date and a margin comparison for those units. If it is not approved, preview still completes and explains that sold units stay blank. See Protected customer data below.

Apply

Apply writes the new average to each variant’s Cost per item. The previous cost is stored on the receipt so undo can restore it. Each line shows a write status. If every line succeeds, the receipt is applied. If some lines fail, the receipt is partial: successful lines stay written, and Retry failed lines tries only the rest. Apply is meant to be run once per saved plan. Running it again on an already written line does not stack a second average on top.

Free includes 3 applied receipts per calendar month. Starter and Growth do not cap the number of applies. The counter counts applies, not drafts.

Weighted average and stock already received

The new cost blends stock you already held at the old Cost per item with the units on this receipt at the landed unit cost. When “Stock is already in Shopify” is on, current on-hand is assumed to include this receipt, so the prior stock is on-hand minus the receipt quantity (never below zero). When it is off, current on-hand is treated as the stock from before the shipment. Set the default in Settings. It applies to new receipts. It does not rewrite products on its own, and it does not change receipts you have already applied.

Undo

Undo is on Starter and Growth. It writes back the Cost per item saved at apply time. Before it writes, it checks the live Shopify cost. If that cost no longer matches what the app wrote, the line is a conflict and is left unchanged so a later manual edit is not destroyed. The receipt is then marked undone, or partial when some lines conflicted. You cannot apply an undone receipt again. Duplicate it if you need a fresh draft.

A late invoice

If another freight or duty invoice arrives after Apply, open the receipt and use Add extra cost (late invoice). Confirm “Revise and re-apply”. The app undoes the previous write, adds the cost, and applies the new average. Revise is available on applied and partial receipts, and only when this receipt is still the latest write for the variants on it. A conflict on undo stops the revise until that conflict is resolved.

Duplicate

Duplicate copies the header, lines, and extra costs into a new draft. The reference is the original name plus “ copy”, or “ copy 2”, “ copy 3”, and so on. Allocated amounts, landed costs, previous costs, and write status are cleared. Opening the copy does not change Shopify.

Margin report

The margin report is on Growth. Choose a date range, optionally one receipt, and run the report. For variants on applied, partial, or undone receipts in that window, it compares:

The gap is how much cost of goods was understated, and how many points of margin that was worth. If several receipts touch the same variant, the latest arrival in the window is the one that counts. Variants with no sales in the window are listed apart from sold rows. Export CSV downloads the same rows. Dashboard percentages are shown to one decimal place. The CSV uses two decimal places.

The report does not change Shopify orders, payouts, or profit reports. Refunds and returns are not subtracted in this version. A range longer than about 60 days can miss older orders. See the next section.

Protected customer data

Sold quantity comes from orders. Shopify classifies the Order object as protected customer data. Installing the app with read_orders does not by itself allow that read. Until you approve Protected customer data, Shopify returns “This app is not approved to access the Order object.” The app catches that case. The margin report shows “Orders access needed”, and preview adds a warning. Landed-cost math still runs. Sold units stay blank until access is saved.

Approve it in the Partner Dashboard:

  1. Open Partners, then this app, then API access requests.
  2. Open Protected customer data.
  3. Select App functionality and Store management only.
  4. Leave name, email, phone, and address unchecked. Those fields are not required and the app does not ask for them.
  5. Save, then run the report or preview again.

What the query uses is the line’s current quantity and its discounted total in shop money, for variants on your receipts, from the arrival date forward. It does not request the customer’s name, email, phone, or shipping or billing address, and those values are not stored. The database holds shop, receipt, cost, and audit rows, not a customer profile.

On a development store, selecting those reasons and saving is enough. There is no App Store review for that store. For a public app, Shopify reviews the protected customer data request before stores that install from the App Store can load orders. Until that review is approved, those stores see the same orders-access notice.

Order history beyond about 60 days needs the separate read_all_orders scope, which Shopify approves on its own. This app does not include that scope. If a report window is longer than 60 days, the page notes that older orders may be missing.

Shopify’s own description of this access is at Protected customer data.

CSV

CSV import and export are on Growth. Import adds product lines to a new receipt. Export on a receipt downloads its lines and extra costs. Export on the margin report downloads the report you just ran. Files download in the browser. They are not emailed. Keep supplier costs and quantities in the columns the importer expects. A row that fails validation is reported on the form and is not saved.

Settings

Settings holds defaults for the next receipt: how extra costs are split, whether stock is already in Shopify, and the weight unit (kilograms, grams, pounds, or ounces). Currency is shown and cannot be edited. Change the shop currency in Shopify admin if you need to. The plan is not edited here. Saving settings does not write Cost per item.

When you change a setting, Shopify’s Save and Discard bar appears at the top of the admin. Discard restores the saved values. Leaving the page with no changes does not save anything.

Plans

Yearly billing is about 17 percent below twelve monthly payments. Shopify is the merchant of record. Cancel or change plan from Pricing inside the app. Downgrading removes access to features that are not on the new plan. Receipts already applied stay in your history.

Uninstall and data

Uninstalling deletes the Shopify session immediately. Remaining shop data is deleted when Shopify sends the shop redact webhook, or after the retention period in the Privacy Policy. Costs already written to products stay in Shopify. Uninstall does not roll them back. Undo before you uninstall if you need the previous costs.

Support

Email lizasolutions9@gmail.com. Include the shop domain and the receipt reference. We typically reply within one business day. Also see the FAQ, Privacy Policy, and Terms of Service.