Product

Build vs Buy in African B2B Retail: Rebuilding an ERP Integration Engine for 45 Nigerian Supermarket Outlets

A
Adebayo FalojuPrincipal Systems Architect
November 6, 20267 min read
Build vs Buy in African B2B Retail: Rebuilding an ERP Integration Engine for 45 Nigerian Supermarket Outlets

When a 45-store Nigerian retail chain tried connecting their point-of-sale hardware to enterprise ERP using off-the-shelf SaaS connectors, 34% of inventory updates failed due to flaky connectivity. Here is how we evaluated build-vs-buy, architected an offline-first Go sync engine, and saved ₦14.2M monthly in phantom inventory losses.

Most B2B SaaS founders and engineering leads start with a simple assumption: standard integrations should be bought, not built. If your client needs their point-of-sale (POS) terminal to update inventory in an Enterprise Resource Planning (ERP) platform like Odoo or SAP, you plug in an off-the-shelf IPaaS (Integration Platform as a Service) like Zapier, Make, or Celigo. It takes two days to set up, costs $150 a month, and lets your team focus on core product features.

In Western markets with 99.99% uptime internet infrastructure and predictable broadband, that calculation holds up. In Nigeria, that assumption falls apart within 72 hours of scaling past five physical retail branches.

Last year, Neobot Tech was brought in to salvage the IT operations of a fast-growing supermarket chain operating 45 outlets across Lagos, Port Harcourt, and Abuja. The company was losing an estimated ₦14.2 million every month due to phantom inventory—items showing as available on their central stock database that had already been sold in physical stores hours earlier, leading to failed B2B wholesale fulfillments and massive checkout friction.

Here is the postmortem of why their initial off-the-shelf SaaS integration failed, the technical architecture we built to replace it, and the decision framework technical founders in emerging markets should use when evaluating build-vs-buy.

The Constraints: 3G Failovers, Power Cuts, and Phantom Stock

Each of the client’s 45 stores operated between three and eight POS cashier terminals running Windows 10 IoT. Each store had a primary fiber internet link backed up by an LTE/3G router, connected to an automated diesel generator setup.

Despite the redundant infrastructure, the reality of local retail hardware operations introduced brutal edge cases:

  1. Transient Connectivity Drops: The transition between primary fiber and backup LTE caused silent connection drops lasting anywhere from 45 seconds to 12 minutes. Standard HTTP clients executing requests during this window simply timed out.
  2. Frequent Micro-Outages: Sudden power switchovers between NEPA/DisCo grid power and branch generators caused hard reboots on local networking equipment while cashiers were mid-checkout.
  3. High Burst Transaction Volume: During peak hours (4:30 PM to 8:00 PM), each store processed roughly 40 transaction line-items per minute. A single drop in internet connectivity meant hundreds of stock deduction events accumulated locally with zero upstream sync.

The business mandate was simple: cashiers must be able to process sales and issue receipts continuously, even if the branch internet went down for six hours straight. When internet restored, central inventory had to reconcile perfectly without duplicate subtractions or missed stock updates.

The "Buy" Experiment: Why Off-the-Shelf SaaS Middleware Failed

Before bringing in Neobot Tech, the client’s internal product team had opted for the standard "Buy" route. They purchased enterprise subscriptions to a popular cloud middleware platform and wired webhooks from their POS database directly to their cloud-hosted Odoo ERP.

Within three weeks, the architecture broke down completely under local operational pressures.

+-------------------------------------------------------------------------+
|                        THE FAILED "BUY" ROUTE                           |
|                                                                         |
|  [POS Terminal] --(Direct HTTP Webhook)--> [Cloud SaaS Middleware]      |
|                                                    |                    |
|                                           (Network Timeout?)            |
|                                                    v                    |
|                                           [Cloud Odoo ERP]              |
|                                         (Data Lost / Un-synced)         |
+-------------------------------------------------------------------------+

1. The Dollar Cost Trap

SaaS IPaaS providers price their plans on tasks or operations. A single retail checkout containing 12 distinct items triggered 12 individual stock movement webhooks, plus 1 invoice record creation event, plus 1 customer record update. A single branch processing 800 sales a day generated roughly 11,200 operations daily.

Across 45 branches, the chain was hitting nearly 15 million operations per month. The SaaS middleware bill ballooned from an expected $200/month to over $3,400/month. Because the billing was in US Dollars, every fluctuation in the Parallel FX rate hit the company’s operating margin directly—a challenge we documented in our analysis of pricing B2B SaaS in Naira under extreme volatility.

2. Lack of Idempotency and Local Queueing

When an LTE router stalled mid-transaction, the cloud middleware retried the HTTP request up to three times. If the response from Odoo was delayed due to network latency, the middleware assumed failure and fired the event again. Because the off-the-shelf connector lacked custom idempotency key validation, single purchases were decremented twice or thrice on the central ERP database.

Conversely, when a store lost internet entirely for two hours, the local POS saved transactions to a flat file. When internet returned, the store manager ran a script that fired thousands of HTTP POST requests simultaneously. The cloud middleware rate-limited the store’s IP address, throwing HTTP 429 errors and silently dropping 34% of the batch updates.

The "Build" Architecture: An Offline-First Sync Engine in Go and SQLite

Realizing that no cloud-first middleware could survive local network realities, we scrapped the IPaaS setup entirely. We decided to build a lightweight, custom sync daemon installed directly on the local store server (a dedicated mini-PC present in every branch), paired with an ingestion engine on the central backend.

+-------------------------------------------------------------------------+
|                        THE 

Neobot Engineering Standard

Every system deployed by Neobot Tech incorporates enterprise baseline practices. We continuously audit our database topologies, REST API query paths, and frontend modular bundles to prevent latency spikes and ensure top-tier security posture.

Tags:#Product Strategy#Build vs Buy#Retail Tech#Go#SQLite#Architecture

Discussion

Comments Coming Soon

We are currently migrating our discussion engine to a new real-time database schema. Check back shortly to join the conversation.