Home / E-commerce
For e-commerce operators

Which products actually make money after discounts, returns and ad spend?

Revenue by product is easy. Margin by product is where stores get it wrong — because the discounts sit on the order, the refunds arrive weeks later, and the ad spend was never attached to a product at all. Quiriz subtracts all three the same way every month.

Try it on sample store data → No signup, no app install on your store.

Most store owners can tell you their top seller by revenue and cannot tell you whether it is profitable. The gap is not effort — it is that four costs live in four exports at three different grains, and stitching them together by hand produces a different answer each time you do it.

The metrics come pre-defined

Every formula, so you can check it against how you already measure before uploading anything.

MetricDefinitionWhat it is for
Net salesgross sales − discountsRevenue after line and order discounts, excluding shipping and tax — the Shopify definition.
Net revenuegross sales − discounts − refundsRevenue net of returns, with each refund matched back to the order's own period.
Gross profitnet sales − COGSProfit before marketing. Needs unit cost on your variants.
Contribution marginnet sales − COGS − ad spend − refundsWhether a category pays for itself once advertising and returns are taken out.

Contribution margin is not net profit, and the page will not pretend otherwise. It excludes overhead and fixed costs. It is commonly called “net profit by category” in store dashboards, which is where a lot of confident, wrong decisions start.

The part everyone gets wrong

An order-level discount does not belong to a product until you decide how to split it. A refund arrives after the sale. Ad spend belongs to a campaign, not a category. Three different grains, three chances to double-count.

Discounts recorded on the order are split across its lines by each line's share of revenue — so a category that carried more of the order absorbs more of the discount.

Refunds are attributed to the categories of the order being refunded, and counted in that order's period — not the period the money moved.

Ad spend is split across categories by the mix of orders attributed to each campaign. Spend that matches no order is reported as Unallocated rather than quietly spread across everything.

That last word is the point. A tool that silently spreads unattributed spend gives you a tidy table where every category looks slightly worse than it is, and no way to see how much of the number was a guess. An explicit Unallocated row tells you how much of your advertising you cannot yet trace — usually the most useful number on the page.

The exports it reads

Exports, not a live connection. There is no app to install on your store and nothing to authorise. The trade is honest: your numbers are as current as your last export, so this suits the weekly or monthly margin review, not a live sales ticker.

What it breaks down by

Governed answers break down by product category, over any window you ask for. That is deliberately a short list — a breakdown is only published here once it is implemented end to end, because a “by channel” answer that quietly returns categories is worse than no answer at all.

Why the number holds still

Ask a chat assistant for margin by product twice and you will get two numbers, because it re-decides each time whether shipping counts, whether refunds belong to the sale month, and what to do with unattributed ad spend. Quiriz routes the question to a stored definition that compiles to SQL, so the same question returns the same figure — and every answer states whether it came from those definitions or was answered freehand.

Ask the sample store → Then upload one month of your own exports and check it against a figure you already trust.

Pricing

You pay for workspaces and the people who build them — not for everyone who asks a question. Your VA checking margin on a SKU costs nothing. See pricing →

Your files stay yours, and we do not train on your data. Privacy policy →

Related reading

Questions

Does Quiriz connect to Shopify directly?
No. It reads the exports Shopify, your ad platforms and your accounting tool already produce — no app on the store, nothing to authorise. Your numbers are as current as your last export, which suits a weekly or monthly margin review rather than a live dashboard.
What is contribution margin, exactly?
Net sales minus COGS, ad spend and refunds. It excludes overhead and fixed costs, so it is not net profit — it answers whether a category pays for itself once advertising and returns are taken out.
How is ad spend attributed to a product category?
By the mix of orders attributed to each campaign. Spend that matches no order is reported as an explicit Unallocated row, so you can see how much of your advertising is untraceable instead of having it spread evenly across categories.
Do I need unit costs for this to work?
For gross profit and contribution margin, yes — unit cost on your variants is what makes COGS computable. Net sales and net revenue work without it.
Can it break results down by acquisition channel?
Not as a governed answer today. Product category is the breakdown that is implemented end to end, and we would rather say so than publish a channel breakdown that silently returns categories.