NetSuiteCOGSShopify PlusIntegration

NetSuite COGS Integration for Shopify Margin Enforcement

A margin floor is only as honest as the cost behind it. Here is how to pipe live landed COGS from NetSuite into the margin check on every Shopify order, so enforcement runs on the truth.

By Herzel Mishel, CEO & Co-Founder, Hycos.ai
··Updated

A margin floor is only as honest as the cost number behind it. And on most Shopify Plus stores, that number is a lie.

Not on purpose. It is just that the real cost of a SKU lives in your ERP, where landed cost, freight allocations, duty, and vendor rebates actually get reconciled. The number in Shopify is a copy someone pasted in once and has not touched since. Enforce a margin floor against that copy and you are protecting a fiction.

If you run NetSuite, you already have the truth. This is about getting it to the one place it changes a decision: the margin check on each order, before it ships.

Why Shopify's cost field is not enough

Shopify has a "cost per item" field. It is fine for a rough markup view. It is not where your real cost lives, for three reasons.

It is static. NetSuite recalculates item cost as POs land, FX moves, and freight gets allocated. The Shopify field does whatever a human last typed.

It is incomplete. The Shopify number is usually unit cost. Your real landed cost includes freight in, duty, insurance, and any vendor rebate that nets it back down. NetSuite tracks all of that. Shopify does not have fields for most of it.

It is disconnected from the order. Cost is not just a SKU attribute. The true margin on an order also depends on outbound freight to the customer's zone, which Shopify's cost field knows nothing about.

So when you set a profit floor and it quietly uses Shopify's cost, you get a floor that looks right and protects nothing.

What actually needs to sync

A clean NetSuite-to-Shopify cost integration moves four things into the margin engine:

  • COGS per SKU from NetSuite item records, the real landed cost, not unit price
  • Landed cost allocations: freight in, duty, insurance, spread across units
  • Purchase order unit costs, so cost reflects what you most recently paid
  • Vendor rebate schedules, so net cost accounts for money coming back

With those four, the margin math on each order is running on the same number your finance team closes the books on. That is the entire point. Reporting and enforcement finally agree.

How the sync runs

Agentis connects NetSuite and Shopify through Celigo. Two cadences, depending on how fast your costs move:

Scheduled, every 5 minutes by default. For most catalogs this is plenty. Costs do not change second to second; they change when a PO lands or a rebate posts.

Real-time webhook, optional. A SuiteScript user-event trigger pushes a cost change to the margin engine the moment it happens in NetSuite. Use this if you are in a category where cost genuinely moves intraday.

Either way, the cost data lives in the margin layer, so each order's margin check does not wait on a live ERP round-trip, and nothing runs in your checkout at all. Each order is evaluated within 60 seconds of being placed, on NetSuite-accurate cost.

What it changes before an order ships

Once real cost is flowing, enforcement gets sharp. The layer pulls live COGS from NetSuite, adds freight for the customer's zone and any FX, subtracts the discount stack, and checks the result against your floor, within 60 seconds of the order being placed. Below-floor orders get flagged, or held before fulfillment under rules you approve. An order ships without a second look only if it clears the floor on the true number.

The reason this matters more than it sounds: stale cost hides the exact orders you most want to catch. A SKU whose cost crept up 9 percent last quarter is now losing money on promos that used to be fine, and your old cost number swears everything is healthy. Live COGS is what makes checkout margin erosion visible while you can still stop it.

Do you need real-time, or is 5 minutes fine?

Honest answer: most stores do not need the webhook. A 5-minute sync covers the vast majority of catalogs because cost is event-driven, not continuous. Reach for real-time webhooks when you are dealing with commodity inputs, FX-heavy sourcing, or daily vendor price changes. Otherwise the scheduled sync is simpler and does the job.

I would rather you run the simple version well than the fancy version you have to babysit.

FAQ

Does the integration write back to NetSuite? The cost sync is one-way into the margin engine. It reads cost from NetSuite. It does not change your ERP.

Will querying NetSuite slow down checkout? No. Agentis does not run in checkout. Cost is synced into the margin layer ahead of time, and each order is checked after it is placed.

We use a different ERP, not NetSuite. The pattern is the same: get real landed cost out of the system of record and into the margin decision on each order. NetSuite via Celigo is the paved path. See the NetSuite integration page for specifics.

How current is the cost when an order is checked? Within 5 minutes by default, or near-instant with the optional webhook.


Margin enforcement is only worth running if it runs on real cost. If your COGS lives in NetSuite and your floor lives in Shopify, close that gap first.

See it work end to end: start a free trial. Then read the foundation piece, checkout vs pre-fulfillment margin enforcement on Shopify Plus.

Share

Get margin insights weekly

One email per week on per-order profitability, ecommerce margin strategy, and Shopify Plus optimization. No spam.