MerchantFlowMerchantFlow Docs
Profit & Loss

COGS Management - Product Cost Tracking

Manage Cost of Goods Sold in MerchantFlow to calculate accurate profit margins. Add COGS individually, in bulk, sync from Shopify inventory data, and schedule future supplier price changes with effective dates.

COGS Management

Cost of Goods Sold (COGS) tracking in MerchantFlow is the foundation for calculating accurate product-level profit margins. COGS represents the direct cost of producing or purchasing each product you sell, and without it, MerchantFlow cannot determine true profitability. You can add COGS individually, in bulk using percentage or flat-rate rules, sync costs directly from Shopify inventory data, schedule future supplier price changes with effective dates, and review the full cost history for each SKU.

This page is the starting point for cost tracking. Four deep-dive guides cover the surrounding configuration:

What Is COGS?

Cost of Goods Sold is the direct cost associated with each product you sell:

  • Product manufacturing or wholesale cost
  • Shipping from supplier to your warehouse
  • Import duties and tariffs
  • Packaging materials

Why it matters: Without accurate COGS, you cannot calculate true profit. A product with $1,000 revenue might only generate $100 profit if COGS and ad spend are high.

How to Access COGS Management

Navigate to Dashboard > P&L > COGS to manage product costs.

Three tabs available:

  1. All COGS - view and edit existing entries
  2. Missing COGS - products without costs defined
  3. Coverage - track how much of your catalog has COGS

Understanding COGS Coverage Metrics

The coverage report shows how well your COGS data covers your business:

  • Product Coverage: Percentage of products with COGS defined (e.g., 75 out of 100 products = 75%)
  • Unit Coverage: Percentage of sold units with COGS (e.g., 850 out of 1,000 units = 85%)
  • Revenue Coverage: Percentage of revenue with known COGS (e.g., $50,000 out of $60,000 = 83%)

Why revenue coverage matters: High-revenue products impact profitability calculations more. Focus on adding COGS to your best sellers first.

How to Add COGS

Method 1: Bulk Update (Recommended)

For multiple products at once:

  1. Go to Dashboard > P&L > COGS
  2. Click "Missing COGS" tab
  3. Select products using checkboxes
  4. Click "Mass Update" button
  5. Choose update method (see below)
  6. Enter value and reason
  7. Click "Apply to X Products"

Method 2: Individual Entry

For single products:

  1. Go to "All COGS" tab
  2. Find the product in the table
  3. Click the pencil icon to edit
  4. Enter cost amount
  5. Optionally set an effective date - leave it blank for today or choose a future date to schedule a supplier price change
  6. Add a reason (e.g., "Updated from supplier invoice")
  7. Click "Save"

Method 3: Sync from Shopify

If you use Shopify inventory tracking:

  1. Go to Dashboard > P&L > COGS
  2. Click "Sync from Shopify" button
  3. MerchantFlow imports costs from Shopify inventory items
  4. Review synced costs in "All COGS" tab

Requirements:

  • Shopify integration connected
  • Inventory tracking enabled in Shopify
  • Cost per item entered in Shopify admin

Variant-Level COGS

For Shopify products with multiple variants (size, colour, material), MerchantFlow tracks COGS per variant SKU, not just at the product level. This matters whenever variants of the same product have different supplier costs.

Editing Variants Inline

In the All COGS tab, click any product with more than one variant to expand the row. Each variant SKU appears with its own cost, effective date, and history. Edits at the variant level only affect that SKU; the parent product row shows a weighted average for reference.

Note: With the per-product fulfillment method enabled, the variant editor also shows an amber "Fulfilment cost per unit" input next to the cost field. That value is not COGS - it feeds the separate fulfillment line of your P&L. See Fulfillment Costs.

Bulk Updates with Variant Pricing

When you open Mass Update on a multi-variant selection, the modal lets you:

  • Enter a single cost that applies to every selected variant, or
  • Enter a per-variant cost grid so each variant SKU receives the correct cost in one save.

If you enter values for some variants but not others, the unselected variants keep their existing COGS. The save button validates that no variant is left with a non-numeric or negative cost before submitting.

Manual SKU Override

When MerchantFlow cannot automatically match a variant to a Shopify inventory item (for example, when SKUs are missing or duplicated across stores), you can apply a manual SKU override:

  1. Open the variant's Cost History drawer
  2. Click Override SKU
  3. Enter the SKU MerchantFlow should track this variant under
  4. Save

Overrides persist across syncs and take precedence over the platform's SKU mapping.

Auto-Sync Cleanup for Backdated Entries

When a Shopify cost sync detects that the effective date of an imported cost is earlier than your most recent manual entry, MerchantFlow now automatically removes superseded auto-sync entries so the cost history remains chronological and the active cost on any given date is unambiguous. Manual entries are never deleted by an auto-sync.

Bulk Update for Historical Dates

The Mass Update modal includes a Backdate option that lets you apply a new cost from a date in the past (for example, when a supplier reissues an invoice covering the previous month). MerchantFlow recomputes the affected P&L snapshots and order margins automatically once the backdated entry is saved.

Use backdating sparingly - it triggers a recalculation of every order from the effective date forward, which can briefly delay the next P&L refresh.

Live-Only Filtering for Sync and Coverage

The COGS sync and the coverage tab both expose a "Live products only" toggle. When enabled, MerchantFlow filters out products that are draft, archived, or otherwise not actively sold. This gives a coverage percentage that reflects what your storefront is actually selling, not your full historical catalog.

Switch the toggle off to include drafts and archived products when you want a literal whole-catalog coverage number.

Effective Dates, History, and Upcoming Changes

MerchantFlow resolves COGS by effective date. For any order or report date, it uses the most recent cost entry whose effective date is on or before that date. This means historical P&L keeps the correct historical cost, while future-dated supplier changes activate automatically when their date arrives.

Schedule a Future Supplier Price Change

  1. Go to Dashboard > P&L > COGS
  2. Add or edit the COGS entry for the SKU
  3. Enter the new cost and choose a future effective date
  4. Add notes such as the supplier quote, invoice period, or contract reason
  5. Save

Future-dated entries appear in the Upcoming Price Changes panel until they become active.

Review Cost History for a SKU

Open Cost History for any SKU to see:

  • Previous, current, and scheduled costs in one timeline
  • Percentage changes between cost revisions
  • Effective dates and any notes saved with each change

Bulk Update Methods Explained

Percentage of Price

Apply COGS as a percentage of the product's sale price.

Use when: You have consistent margins across products.

  • Example: All products cost 40% of retail price
  • A $100 product gets $40 COGS
  • A $50 product gets $20 COGS

Best for: Products from the same supplier or category with similar margin structures.

Flat Rate

Apply the same fixed cost to all selected products.

Use when: Products have similar costs regardless of price.

  • Example: All t-shirts cost $15 to produce
  • Both $30 and $50 t-shirts get $15 COGS

Best for: Products with standardized manufacturing costs.

Target Margin

Calculate COGS based on your desired profit margin.

Use when: You know what margin you want to achieve.

  • Example: Target 60% margin on all luxury items
  • A $100 product needs $40 COGS (100 x (1 - 0.60) = 40)

Formula: COGS = Price x (1 - Margin)

Best for: Premium products where you have strict margin requirements.

How Profit Is Calculated with COGS

Once COGS is added, MerchantFlow calculates:

Gross Profit:

Gross Profit = Net Revenue - COGS

Gross Margin:

Gross Margin % = (Gross Profit / Net Revenue) x 100

Ad spend is deducted later in the waterfall, at the contribution margin line, together with fulfillment and payment fees - see the P&L Overview for the full calculation.

Example:

  • Product sells for $100 (net revenue after refunds)
  • COGS is $40
  • Gross profit = $100 - $40 = $60
  • Gross margin = ($60 / $100) x 100 = 60%
  • With $15 ad spend, contribution margin = $60 - $15 = $45

Best Practices for COGS Management

1. Start with High-Revenue Products

Focus COGS entry on your top sellers first. These have the biggest impact on profit calculations. 20% of products typically generate 80% of revenue -- get accurate margins on these first.

2. Use Bulk Operations

Save time by grouping products with similar cost structures:

  • All products from Supplier A: 35% percentage rule
  • All t-shirts: $12 flat rate
  • All premium items: 65% target margin

3. Add Reasons to Every Entry

Always add a reason when creating or updating COGS for an audit trail:

  • "Q4 2025 supplier pricing"
  • "Updated from November invoice"
  • "Estimated cost for new product"

4. Review Coverage Regularly

Check your coverage metrics monthly. Targets:

  • Revenue coverage: above 90%
  • Unit coverage: above 80%
  • Product coverage: above 75%

5. Sync from Shopify Monthly

If using Shopify inventory tracking, sync regularly to catch supplier price changes.

Troubleshooting COGS Issues

Coverage shows 0% despite entries

Cause: No order data synced yet. Solution: Wait for the first order sync, or trigger a manual sync.

Bulk update does not work

Cause: Selected products are missing prices. Solution: Ensure all products have valid sale prices in your e-commerce platform.

Shopify sync returns "0 costs synced"

Cause: Shopify inventory items do not have costs entered. Solution:

  1. Go to Shopify admin
  2. Products > [Product Name] > Variants
  3. Click "Edit" on variant
  4. Enter "Cost per item"
  5. Try sync again

Frequently Asked Questions

Do I need COGS for every product?

Not necessarily. Focus on products that drive your revenue. MerchantFlow's coverage metrics help you prioritize which products to add costs for first.

What if I do not know exact costs?

Use estimated costs as a starting point. Industry averages (40% for apparel, 50% for electronics), percentage-of-wholesale rules, or competitor research all provide reasonable estimates. You can refine later.

Can I import COGS via CSV?

Yes. Go to Dashboard > P&L > COGS, click "Import", and use the CSV tab - the file needs a sku column and a cost column. MerchantFlow also supports BeProfit exports (matched by Shopify product ID) and one-click cost sync from Shopify or WooCommerce. See Importing COGS for the full column reference and import options.

Does COGS include shipping to customers?

No. COGS is the cost to acquire or produce the product, including freight from your supplier to your warehouse. Shipping sold orders to customers is a fulfillment cost - its own line in the P&L, configured separately. See Fulfillment Costs.

How often should I update COGS?

Update when supplier prices change, you switch suppliers, import duties change, or you renegotiate wholesale terms. Most businesses review COGS quarterly.

What if my Shopify sync does not bring any costs?

Verify that inventory tracking is enabled in Shopify, cost per item is entered in Shopify admin (Products > Inventory tab), and your MerchantFlow integration has proper permissions.

Can I schedule supplier price changes ahead of time?

Yes. Set a future effective date when adding or editing a COGS entry. MerchantFlow will keep showing the current active cost until that date, then switch to the new value automatically.

Will editing COGS rewrite historical profit?

No. MerchantFlow uses the cost that was active on the order date, so future changes affect future orders while historical reports keep the earlier cost history. The exception is an explicit Backdate in the Mass Update modal, which is designed to rewrite history when a supplier invoice covers a previous period. For the full resolution rules - and why pages can briefly disagree while profit recalculates - see COGS Accuracy.

How do I set different costs for size or colour variants?

Open the product in the All COGS tab and expand the row. Each variant SKU is listed with its own cost, effective date, and history. You can edit variants individually or use Mass Update with the per-variant cost grid to set a different cost for every variant in one save.

Why did some of my older auto-synced COGS entries disappear?

If you backdate a cost entry, MerchantFlow's sync cleanup removes earlier auto-synced entries that the new entry supersedes so the cost history is chronological and unambiguous. Manual entries are never removed by sync cleanup, only auto-synced ones that have been displaced.

Related Guides


Last updated: July 31, 2026