Skip to main content

Profit Leak Radar: formulas and rules

Profit Leak Radar recalculates profit from net sales to net income with 14 deterministic rules, and publishes every formula, threshold and evidence trail.

SKU profit ladder

Sample · USD
Net sales
1,000
Gross profit
600
CM1 · After fulfillment
540
CM2 · Before ads
470
CM3 · After ads
270
Pre-tax contribution profit
260
Net income
$208
leakage detection rules
14
spend categories covered
4
profit tiers, recalculated
6
confidence grades
3

Profit accounting first. Evidence before action.

Seamline calculates pre-tax contribution profit for each Shopify SKU, allocating order-level costs to line items. 14 deterministic rules check the result.

What a finding means

Each finding reports estimated impact, confidence, and the source records behind it. The estimate is not money promised back to you. Recommendations are advisory; the merchant reviews and decides.

Current availability

Shopify install
Shopify installation is not open yet. Book a demo to assess fit.
Billing
Billing is not enabled. Published plans and prices are not a charge.
Book a demo

Core workflow

  1. Install & set up

    One click from the Shopify App Store; OAuth sets up your shop automatically.

  2. Configure costs & channels

    Connect ad and payment platforms via OAuth or credentials, then configure SKU cost profiles, carrier rates, and platform overhead.

  3. Auto sync & calculate

    Scheduled collection pulls orders, ads, FX rates, and gateway flows; a rule-based engine builds SKU-level profit reports.

  4. Daily briefing & leak handling

    A daily briefing appears in the findings view; triage findings as false positives or resolved.

Explicit boundaries

These capabilities are not part of the current product:

  • CAPI or pixel configuration
  • Dispute representment
  • Dispute recovery
  • Win-rate prediction
  • Payout-to-bank reconciliation
  • Automatic case closure
  • Automated merchant actions

How profit is calculated, tier by tier

An order’s revenue sheds fulfillment costs first, then payment and after-sales, then ads — every tier leaves a number you can reconcile against the books. The middle column is the engine’s formula; the right column says it in plain words.

MetricFormulaIn plain words
Gross profitNet sales − product cost (COGS)Net sales minus the product cost — the merchandise margin on its own.
CM1 · After fulfillmentGross profit + shipping income − duties − last-mile logistics − warehouse feesAdds back the shipping the customer paid, then deducts duties, last-mile logistics and warehousing — profit once the order has shipped.
CM2 · Before adsCM1 − payment processing fees − platform fees − refund losses − return fees − fixed fees − COD rejection lossesThen deducts the selling costs — payment processing, platform, refunds, returns — the real contribution before any advertising.
CM3 · After adsCM2 − ad spendAfter ad spend: this tier shows whether advertising actually pays for itself.
Pre-tax contribution profitCM3 + FX gain/lossBrings the FX gain/loss (settlement rate vs order rate) back in — the base income tax applies to.
Net incomePre-tax contribution profit − income taxWhat remains after income tax.

Recompute the ladder from the top (USD): net sales 1,000, product cost 400, gross profit 600. Add shipping income 60; deduct duties 20, last-mile logistics 90 and warehousing 10 → CM1 = 540. Deduct payment fees 30 and refund losses 40 → CM2 = 470. Deduct ad spend 200 and an FX loss of 10 → pre-tax contribution profit 260. Deduct income tax 52 → net income 208. Any account not listed is zero in this example.

Where each number comes from and how it is computed

Every number in a report has a source: where it is fetched, what rule computes it, and what happens when data is missing. Read this section to check definitions.

Net sales
What customers actually paid for the goods: line amounts after line-level discounts, then order-level discounts. Shipping income, taxes collected and refund losses are listed separately, never merged into sales.
Product cost (net)
What the sold unit really cost: purchase cost, first-mile freight and packaging. Sources, in order: the cost profiles you maintain, Shopify product costs, then configured estimated costs; any duty already inside the cost is stripped out first, and duties are deducted once, separately, in the fulfillment tier.
Shipping income & collected tax
Shipping paid by the customer counts as income and lands in the after-fulfillment tier. Taxes collected are pass-through money — displayed, never counted in profit.
Last-mile logistics
The leg from warehouse to buyer. Sources, in order: carrier invoices → store shipping rules → last-mile rate profiles. Order-level fees default to allocating across lines by volumetric weight; when weight is missing, allocation falls back to units and the reason is logged. A rate profile’s estimate = applicable unit price × units.
Refund & rejection losses
Refund losses attach to the line that was returned. When a COD parcel is refused, the loss is estimated as the rejected items’ cost × the store’s loss rate.
Ad spend
Ad spend is first matched to attributed orders; the remainder is spread across the day’s lines in proportion to discounted net sales. AppLovin has no attribution data and skips the attribution pass. Each SKU sees only its allocated share; the store view uses total ad spend (allocated plus unallocated).
FX gain/loss
The difference between converting the same money at the settlement rate and at the order-date rate. COD orders have no settlement flow until the money arrives, so FX gain/loss stays blank — never estimated.
Order count & units sold
Within the reporting period, orders are deduplicated by order and units are counted per item. An order with several SKUs counts toward each SKU; bundles are split into child SKUs before counting.
Margins & income tax
Margin = the tier’s profit ÷ net sales. Income tax accrues only on lines with positive contribution margin, at the effective rate, then rolls up into reports; when a tax rate is not maintained, after-tax metrics stay blank.
Ad efficiency
ROAS = net sales ÷ ad spend; the ad cost ratio (ACoS) is the inverse. Breakeven ROAS = net sales ÷ CM2 — only above that line does advertising actually make money.
After-sales ratios
Refund loss rate = refund losses ÷ net sales (money basis, not unit returns); the COD rejection loss rate works the same way.
Dates, currencies & blanks
Report dates follow the store’s time zone; multi-currency totals are converted into one currency. Missing rates or missing inputs stay blank, never padded with zero; ratios always use the aggregated numerator and denominator, and stay blank when the denominator ≤ 0.

Missing data stays blank — never estimated. Duties, warehousing, return fees, fixed fees, COD rejection losses — when the whole group is missing it is treated as no such cost and enters the ladder as zero; when only part is missing, that account stays blank.

What the radar watches

14 leakage detection rules cover the four spend categories: Payments & FX, Logistics & Refunds, Ads & Marketing, Cost & Data Quality. Open any rule to see when it fires and how its impact is computed. For review, the finding record’s configuration and rule version govern.

Payment fee rate above baseline
Trigger condition
A gateway’s effective fee rate for the day runs at least 0.5 percentage points above the 30-day volume-weighted baseline rate, with day volume of $1,000 or more.
Impact
Rate gap × day volume — the processing fees paid above baseline.
FX gain/loss spike
Trigger condition
The store’s net FX loss rate reaches 1% for the day, at least 0.5 percentage points above the 7-day baseline, with net FX losses of $100 or more.
Impact
(Day loss rate − baseline rate) × day revenue; gains offset losses first, so only the net loss counts.
Platform fee ratio surge
Trigger condition
Platform fees as a share of revenue run at least 0.5 percentage points above the 7-day baseline, with a derived gap of $100 or more.
Impact
Share gap × day revenue.
Order-vs-gateway reconciliation gap
Trigger condition
For the same store, business day and currency, the net amounts on the order side and the gateway side diverge: the gap reaches 200 units of the original currency or more, and exceeds 5% of the larger side.
Impact
The gap is shown in the original currency; only USD stores convert the estimated impact into dollars.
Dispute & chargeback spike
Trigger condition
One gateway accumulates 5 or more disputes in a 7-day sliding window, with the window’s daily average reaching at least 3× the 30-day baseline; when baseline days average zero, the count threshold decides.
Impact
Disputed amount in the window × assumed loss rate (default 100%) — a risk estimate, not an actual loss.
Shipping overcharge
Trigger condition
The store’s actual last-mile logistics cost for the day runs at least 10% above the estimate, with a gap of $50 or more.
Impact
Actual logistics cost − estimate. Actuals may include estimated components; the detail drills down to individual orders.
Refund loss-rate spike
Trigger condition
A SKU’s or country’s refund loss rate runs at least 5 percentage points above the 7-day baseline, with at least 10 orders that day.
Impact
Rate gap × day revenue.
Return fee surge
Trigger condition
The store’s return fees reach $100 for the day and at least 2× the 7-day valid daily average; when baseline days average zero, the amount threshold decides.
Impact
Day return fees − baseline daily average, floored at zero.
Unallocated ad spend
Trigger condition
The store has $50 or more of ad spend for the day not yet allocated to specific orders.
Impact
The unallocated amount in full — where this spend went is still awaiting attribution checks.
Campaign ROAS below breakeven
Trigger condition
A campaign spends at least $100 for 3 consecutive days while attributed ROAS (attributed revenue ÷ spend) stays below 1.
Impact
The positive gap between spend and attributed revenue — money spent that attributed revenue has not covered.
Loss-making SKUs still spending
Trigger condition
A SKU absorbs $100 or more of allocated ad spend over 7 consecutive days while its pre-tax contribution margin totals zero or less.
Impact
The absolute value of the window’s pre-tax contribution margin — budget that keeps flowing to a loss-maker.
SKU contribution margin drop
Trigger condition
A SKU’s revenue reaches $500 for the day, and either its contribution margin falls below the floor (0%) or slides at least 5 percentage points below the 7-day baseline.
Impact
The larger of the two deterioration measures (below-floor vs below-baseline) × day revenue.
SKU missing cost profile
Trigger condition
A SKU has sales in the selected period, but the product cost on every one of its lines is empty.
Impact
Impact cannot be quantified yet — the unaccounted revenue scale is listed to prompt completing cost profiles.
Stale data source
Trigger condition
A data source fails to sync, or not-ready rows reach 20% of the day.
Impact
Impact cannot be quantified yet — failed sources, missing accounts and the affected scope are listed.

How to read the impact. It may be a rule-priced estimate, a gap awaiting reconciliation, or spend not yet fully allocated. Several findings can point at the same cost — adding them up does not equal a confirmed loss.

The full arithmetic of one finding

Sample · Payment fee rate above baseline
Day volume
$20,000
30-day volume-weighted baseline rate
3.40%
Day actual rate
4.50%
Estimated impact = 20,000 × (4.50% − 3.40%)
$220
Confidence: highSeverity: medium12 valid baseline days met the bar and sample counts were unavailable — graded high confidence; severity is banded separately on impact, and $220 falls in the medium band.

How sure the radar is, on every finding

After a rule fires, the radar grades confidence by how complete the evidence is: high, medium or low. Defaults are a minimum sample of 10 and at least 5 valid baseline days; each rule can set its own.

Judged in order after a rule fires; the first match stops the checksConfidence
Sample counts exist but sit below the minimum sampleLow
A baseline applies but valid baseline days fall shortLow
Valid baseline days meet the bar and no small-sample downgrade firedHigh
The rule uses no baseline and no small-sample downgrade firedMedium

A sample can be an order, a line, a campaign or a dispute. Without sample counts, the small-sample check is skipped. For payment fee rates, a baseline day counts as valid only when it has both fee records and positive volume.

Try the confidence grading

A sample size of 0 means counts are unavailable.

Confidence

High

Valid baseline days meet the bar and no small-sample downgrade fired.

Speaking the same language as the standards

The formulas invent no concepts: revenue, cost, currency conversion, tax and segment contribution align with existing concepts in the accounting standards. Items tagged “Formula verified” can be checked verbatim in profit_formulas.yaml; items tagged “Basis aligned” coincide at the concept level.

Revenue & costs

ASC 606 · IFRS 15

Net revenue presentation and inventory landed cost (IAS 2 / ASC 330)

Discounts & refunds shown netBasis aligned
Net sales deduct line- and order-level discounts first; refund losses are listed separately, never merged into revenue.
Collected taxes are not revenueBasis aligned
Taxes collected are pass-through money — displayed separately and excluded from profit.
Duties deducted once, separatelyFormula verified
Product cost is stripped of any duty it contains; duties are deducted once, independently, in the fulfillment tier.
Last-mile fees allocated by volumetric weightFormula verified
Order-level fees allocate to lines by volumetric-weight share; when weight is missing, allocation falls back to units and the reason is logged.

FX & tax

IAS 21 · IAS 12

Realized FX differences and income tax accrual (ASC 740)

Realized FX gain/lossFormula verified
FX gain/loss = settled principal × settlement rate − order principal × order rate
The difference between converting the same principal at the settlement rate and at the order-date rate — the realized-translation concept of IAS 21.
Income tax accrues on positive contributionFormula verified
Income tax = positive contribution margin × the store’s effective income tax rate
Losses accrue no tax; when a rate is not ready, after-tax metrics stay blank.

Segment contribution & data trust

IFRS 8 · ISO/IEC 25012

Management-accounting contribution basis (ASC 280 · CIMA principles)

SKU-level contribution ladderBasis aligned
CM1→CM2→CM3→contribution margin is the segment-contribution basis; SKUs and stores are the segment dimensions.
Blanks, not estimatesBasis aligned
Completeness, accuracy, consistency, traceability — four basic data-quality characteristics.
Formula versions traceableFormula verified
Every formula records its version triple; report rows keep the version in force, ready to recompute under past configuration.

Basis alignment is not an audit opinion. This section explains how the formula language corresponds to standard concepts; it does not constitute compliance certification. For formal reporting and tax treatment, defer to your accountant and tax authority.

Every cent accounted for, end to end

Numbers with sources, formulas you can recompute, conclusions you can reconcile — the delivery standard of every finding. To see what they look like first, browse the sample findings on the Profit leaks page.