Architecture & Tech Stack9 minute read
Shopify Middleware: Build, Buy, or Both — an Architect’s Guide
“Do we need middleware?” is really two questions wearing one coat, and most of the trouble in an enterprise integration comes from answering them as if they were one.
The first question is whether a given system should connect to Shopify through a layer at all, or connect directly. The second, only if the first is yes, is whether that layer should be a commercial connector you buy, code you build, or a connector with a thin custom layer around the parts it can’t handle. Teams that skip the first question over-engineer connections that should have been native. Teams that skip the second either build what they could have bought or bolt an off-the-shelf connector onto a problem it was never shaped for. This guide separates the two and gives the test we actually use to answer each.
First decision: does this even need a layer?
Plenty of the enterprise stack should connect to Shopify with no middleware at all. Subscription platforms, email and SMS tools, reviews, support desks, and most of the app ecosystem expose native Shopify integrations that are well-maintained and correct. Putting a layer in front of them adds cost, latency, and one more thing to monitor for no benefit. The default for anything with a native, well-supported connection is: use it.
A system needs a layer when one or more of four things is true, and they cluster around the same root cause — a data model that doesn’t match Shopify’s.
- Transformation. An ERP, an enterprise CRM, or a PIM usually needs data reshaped on the way through, because its objects don’t map one-to-one onto Shopify’s.
- A durable queue, so a failed or duplicated write is retried or de-duplicated rather than lost or doubled.
- Somewhere to absorb Shopify’s API rate limits under load, so a traffic spike doesn’t become a sync failure.
- A place to compute something neither side owns cleanly — available-to-promise being the canonical example, where on-hand from the warehouse has to become sellable inventory before Shopify ever sees it.
If none of those is true, you’re looking at a native connection and the second decision doesn’t arise. If one or more is true, you have a layer, and the only remaining question is what kind.
Worth saying plainly, because it runs against the instinct to standardize: this is a per-integration judgment, not a per-project one. The same stack can have a native Recharge connection and a custom ERP layer, and both are correct. What matters is that the decision gets made for each integration and recorded with the reasoning, so the next architect can see why — the connection nobody can explain is a dependency on whoever built it.
Second decision: buy, build, or both
Once a system needs a layer, the default is to buy it. A commercial connector or iPaaS recipe is maintained by someone else, ships with the edge cases already found, and doesn’t commit your team to owning code forever. Buy when the system is well-supported by a connector, the transformations you need are standard, and the volume and latency fit what the connector offers. Most of the long tail of an enterprise stack lands here, and it should — buying is the cheaper standing cost, and standing cost is what integrations quietly accumulate.
Build when the logic is genuinely specific to how your business runs and nothing on the market handles it. This is the narrow exception, and it’s narrow on purpose. The tell is that the requirement encodes something about your operation that a generic connector can’t know: a shipping calculator tuned to perishable transit times, a rental system that governs textbook check-ins across online and in-store, an allocation model particular to how you split inventory. Trade Coffee’s AI-driven taste-profile engine and Thesis’s signature Product Quiz are both this case — differentiating logic worth preserving through a replatform rather than flattening into something off the shelf. When the thing you’re integrating is part of what makes the business the business, build.
“Both” is the answer more often than either alone at enterprise scale, and it’s the one people forget is available. You buy the connector for the eighty percent it handles well, and you build a thin layer that owns the twenty percent it can’t — the transformation the connector doesn’t express, the reconciliation it doesn’t do, the silence detection it doesn’t provide. The discipline in a “both” is keeping the custom layer thin: it should own only what the connector genuinely can’t, so you get the connector’s maintained coverage and your own control exactly where control matters, without rebuilding the connector’s job by hand.
The cost that decides between these isn’t the build cost you see at kickoff. It’s the standing cost you don’t: every custom line is yours to maintain, monitor, and carry through your next migration, while every bought connector is a subscription and a dependency on someone else’s roadmap. Build looks cheaper the day you write it and more expensive every day after; buy is the reverse. The right answer weighs the whole life of the integration, not the first sprint.
The topology and the products are separate questions
Two questions sit next to this one and get tangled with it. The first is topology: whether your integrations connect point-to-point, through an iPaaS platform, or through custom middleware — a question about the shape of the whole stack, not about any single connection. The second is product selection: if you’re buying an iPaaS, which one. Both deserve their own treatment rather than a paragraph here.
The short version for this guide: point-to-point is fine until the number of connections makes the web unmanageable, at which point a hub — iPaaS or custom middleware — earns its place by giving every integration one place to live, monitor, and reason about. And the iPaaS products in common use for Shopify ERP work each have a shape they fit best; the choice between them is a fit question, not a ranking, and the fit is decided by the transformations you need and the volume you run them at. For the topology decision and what iPaaS as a category trades away, see the architecture guide.
What “both” looks like in practice
The clearest way to see the framework is a stack that made all three calls at once. When Nuts.com moved off the commercetools composable stack it had run for nine years, the goal was to cut reliance on custom code — which fell by an estimated 85% — without losing the things that made the business itself. That meant deciding, system by system, build versus buy versus both.
Most of the stack was bought. Subscriptions went to Skio, after Ordergroove had been tried and disliked and Recharge and Awtomic were evaluated alongside it. Search went to Algolia, across a catalog where filtering by roast, salt level, diet, and packaging is how customers actually shop. Customer service went to Gladly, lifecycle messaging to Braze, personalization to Dynamic Yield. None of those needed to be custom, and making them native or connector-based is where most of the 85% went. Discounts and cart transformation moved onto Shopify Functions and operational automation onto Shopify Flow — native, not middleware at all.
A few things were kept custom, integrated rather than replaced, because they encoded how Nuts.com actually operates: a custom OMS, a twenty-year-old custom WMS, and a shipping calculator carrying twenty years of its own logic. Anatta bridged the shipping calculator into Shopify checkout and integrated the existing OMS and WMS rather than rebuilding them. That’s the build exception applied with a scalpel — not “the platform was custom, so rebuild it custom,” but “these specific components are the business, so integrate them and buy everything around them.”
The result is a “both” at the level of the whole stack: connectors and native features carrying the commodity load, a thin custom layer carrying only what genuinely differs. Nuts.com’s own business case projects total cost of ownership down 28% in the first year and 41% by the second — the structural saving that comes from owning less code, not more. Explore the Nuts.com success story →
Before you sign anything
Who owns your integrations after launch?
Meet the pod who would run them, before you sign.
The test that settles it
Faced with a specific system, five questions resolve the decision in order:
- Does it have a native, well-supported connection? If yes, use it; stop here.
- Does its data model differ enough to need transformation, queuing, or rate-limit handling? If no, revisit whether it really needs a layer.
- Is there a connector or iPaaS recipe that covers your transformations at your volume? If yes, that’s your buy.
- Is there logic here that’s specific to how your business runs and unhandled by anything on the market? If yes, that part is a build — and only that part.
- Can you get the connector’s coverage and your own control by putting a thin layer around a bought connector? If yes, that’s your “both,” and it’s usually the answer at scale.
The honest way to run this is per integration, not once for the project, and to write the answer down with its reasoning next to the integration itself. A year later, when someone asks why the ERP has a custom layer and the CRM doesn’t, the answer should be readable without archaeology.
What you own, whichever way it goes
The build-buy-both decision changes what code you’re responsible for; it doesn’t change what a finished integration has to include. Either way, the same artifacts make it survivable: a data contract naming the owner, conflict rule, sync frequency, and acceptable delay for every field that crosses the boundary; retry logic, alerting, and a documented recovery path on every sync before it goes live; and a current architecture diagram and runbook your team can read without the people who built it.
A bought connector doesn’t exempt you from the contract or the monitoring — it just means the connector, rather than your code, is the thing being held to them. The point of the whole exercise is a stack your own team can explain, whichever mix of build and buy got you there.
This decision sits inside a wider model: enterprise Shopify integrations covers the order chain, Shopify ERP Integration is the canonical middleware case among the systems, and the Integrations service is where the work gets scoped.
Frequently Asked Questions
Is custom middleware always more expensive than a connector?
Not always, but it’s almost always more expensive over the life of the integration than it looks on the day you build it. A connector is a subscription and someone else’s maintenance burden; custom code is yours to maintain, monitor, and carry through your next migration. Build looks cheaper at kickoff and costs more every day after. Weigh the whole life, not the first sprint.
Can we start with a connector and move to custom later?
Yes, and a “both” is often how — keep the connector and add a thin custom layer for the parts it can’t handle, rather than replacing it wholesale. Ripping out a working connector to rebuild it custom is rarely worth it unless the connector has become the thing constraining the business.
Does buying a connector mean we don’t need a data contract?
No. The contract — who owns each field, what happens on conflict, how often it syncs, what delay is acceptable — is required either way. Buying a connector just means the connector, not your code, is what gets held to it. Skipping the contract is how “the integration works” turns into a month of manual reconciliation.
When is point-to-point fine, and when do we need a hub?
Point-to-point is fine while the number of connections stays small enough to reason about. A hub — iPaaS or custom middleware — earns its place when the web of direct connections gets unmanageable, by giving every integration one place to live and be monitored. That’s a topology question, covered in the architecture guide.
Weighing build against buy on a specific system? Talk to an architect — we make this call per integration, and write down why.
Before you sign anything
Integrations need an owner, not a ticket queue.
Ninety minutes with the Account Manager and Delivery Manager who would own your account, before you sign anything. A written 90-day plan either way.










