ix
ix

informatix

PL version Book a discovery call
E-commerce (anonymous) Case study

Omnichannel Sales Integration

How a PrestaShop store selling on Allegro and Amazon rebuilt a failing integration: order idempotency, retry queues, stock buffers and drift alerts.

KS Krzysztof Słonina Published: Updated: 9 min read

Key takeaways

The problem was not a missing integration — it was an unreliable one. Orders were duplicated, stock levels drifted apart, and the team verified everything by hand. The fix did not require changing platforms. It required rebuilding the flow: idempotency, retry queues, a stock buffer and drift monitoring. Result: order handling 40% faster and no more manual verification.

Challenge

The PrestaShop store sold through three channels at once: its own storefront, Allegro and Amazon. Stock and price synchronisation was manual — an employee retyped data between panels. The result: selling products that were not physically in stock, customer complaints, delayed fulfilment and a team that stopped trusting the system. The integration technically existed and “worked” — in the sense that data flowed. The problem was the quality of that flow: duplicate orders, drifting stock levels and no failure signal whatsoever.

Solution

We designed and built an integration based on the BaseLinker API and webhooks, running on Laravel. Every marketplace order carries its own identifier, used as an idempotency key — duplicates never come into existence instead of being filtered out afterwards. API calls go through a rate-limited queue with three priority levels, and transient errors return to the queue with exponential backoff. External channels see stock reduced by a safety buffer, and a marketplace order immediately reserves the item in the store. An event log and drift alerts turned problem detection from “we will hear it from a complaint” into “we will know within the hour”.

Result

Order handling time cut by 40%. Zero duplicate orders — eliminated at the source, not filtered after the fact. Consistent stock and prices across every channel. Drift detected within the hour by alerts, not by customer complaints. Around 15 hours of work saved every week. The team stopped verifying every order by hand — the most important outcome of the project.

Results before and after

Metric Before After
Order handling time baseline −40%
Duplicate orders regular occurrence 0
Manual order verification every order exceptions only
Stock drift detection from customer complaints alert within the hour
Orders needing manual intervention low double digits % below 2%

Starting point — an integration that “worked”, yet nobody trusted it

The PrestaShop store sold across three channels: its own storefront, Allegro and Amazon. The marketplace integration existed, but it was unreliable in the details that decide everything in e-commerce. The same order landed in the store twice whenever an API response timed out and the system retried the request. Stock levels updated at different moments, so occasionally a product sold that was not physically available. The team stopped trusting the automation and checked every order in two systems — the integration added work instead of saving it. Problems surfaced through customer complaints, not through the system. This is the classic state where an integration formally exists but has been organisationally abandoned, because nobody trusts it.

Order idempotency — duplicates eliminated at the source

Every marketplace order carries its own identifier. We introduced an idempotency key based on that identifier and a check before saving: if an order with the same identifier already exists, the system updates it instead of creating a new one. That removed duplicates at the source — not by filtering them later, but by not letting them come into existence. Idempotency is the foundation of every resilient integration: the network may lose a response, but the system must not lose an order or duplicate it when a request is retried.

A retry queue instead of parallel requests

Marketplace API calls go through a rate-limited queue rather than being fired in parallel — so we never exceed API limits and never lose jobs. The queue has three priority levels: orders and bestseller stock, stock of remaining products, then descriptions and prices. When the API returns a transient error (rate limit, timeout, brief unavailability), the job returns to the queue with exponential backoff instead of being lost. Every retry is logged, so unstable integrations become visible.

Stock buffer and real-time reservation

External channels see stock reduced by a safety buffer, and a marketplace order immediately reserves the item in the store. The buffer is configurable per product: larger for bestsellers, smaller or zero for slow-moving items. This simple mechanism removes the most expensive scenario in multi-channel selling — selling goods you do not have — and buys time to reconcile stock levels without risking complaints.

Event log and drift alerts — monitoring that works

Every event — an order received, a stock change, an API error, a retry — lands in the event log. A separate mechanism compares stock between the store and the channels and raises an alert when drift exceeds a threshold. That changed problem detection from “we will hear it from a complaint” into “we will know within the hour”. In practice monitoring turned out to be more important than the integration itself: an integration without alerts is a system whose failures you learn about from your customer.

Testing on a data sample before go-live

Before running the process on the full dataset, we pushed a sample of orders through it, including edge cases: bulk orders, cancellations after reservation, returns and discontinued products. The most time-consuming part was not the code but mapping product variants and reconciling status differences between channels. Testing on a data sample caught those differences before production, not after the first wave of orders.

Omnichannel integration architecture — PrestaShop store and ERP connected through a Laravel middleware to Allegro and Amazon marketplaces and carriers
The architecture: one data flow between the store, ERP, marketplaces and carriers instead of manual retyping.
Order flow from marketplace to store — webhook, priority queue, idempotency key, stock reservation, stock buffer, event log and drift alerts
The rebuilt order flow: an idempotency key and a retry queue eliminate duplicates, alerts detect drift within the hour.
Before and after results — order handling time 40 percent shorter, zero duplicates, stock drift detected within the hour, manual interventions below 2 percent
Operational metrics before and after the rollout — data from an anonymised e-commerce project.

What omnichannel selling actually is

Omnichannel selling is a model where customers buy across many channels — the online store, marketplaces, a mobile app, a physical shop — and every channel works from shared data: stock levels, orders, prices and customer history. The key word is “shared”: in omnichannel, channels are not merely next to each other, they are synchronised in near real time. The foundation of that model is system integration — without it, omnichannel exists only in the name, while employees retype data between panels by hand.

Omnichannel vs multichannel — the difference that changes architecture

Multichannel means selling across many channels run independently: separate stock, separate descriptions, often separate teams. Omnichannel means the same channels bound together by a shared data layer and shared processes — one source of truth for stock, one order queue, one customer history. The difference is architectural, not marketing: multichannel can be run by hand up to a point, while omnichannel cannot exist without integration. Keep that distinction in mind at every rollout decision — selling on Allegro and Amazon without synchronisation is still multichannel.

Lessons for your store

An integration without monitoring does not exist — if you have no alert on stock drift, you do not know whether the integration works; you only know you have not received a complaint yet. Duplicates are a design problem, not an operational one — they cannot be handled by hand in a durable way; they must be eliminated through an idempotency key. Team trust is a metric — the biggest gain was not the 40% faster handling, but the fact that the team stopped verifying every order by hand; until that happens, automation never pays for itself no matter how well it works.

How long it takes and what it costs

Rebuilding the flow with idempotency, a queue and monitoring usually takes 3–6 weeks, depending on the number of channels and catalogue quality. Mapping product variants and testing edge cases takes the most time. Cost depends on scope: e-commerce integrations start at a few thousand PLN, while projects with a dedicated middleware and ERP reach tens of thousands of PLN net. If you run a multi-channel store and want a ballpark budget for your case, get in touch — I prepare quotes after a free scope analysis.

Frequently asked questions

Do we need to rebuild the integration from scratch?

Usually not. If data flows but fails in the details — duplicates, stock drift, no monitoring — only those elements need rebuilding. In this project the platform and the connections stayed; what changed was the processing logic (idempotency, queue) and the observability layer (event log, alerts).

How long does an omnichannel integration rebuild take?

Rebuilding the flow with idempotency, a queue and monitoring usually takes 3–6 weeks, depending on the number of channels and catalogue quality. Mapping product variants and testing edge cases — bulk orders, cancellations after reservation, returns — takes the most time.

How much does an omnichannel sales integration cost?

The cost depends on the number of channels, the systems to connect (ERP, accounting, carriers) and the amount of custom business logic. E-commerce integrations start at a few thousand PLN net, while projects with a dedicated middleware and ERP reach tens of thousands of PLN. I prepare a final quote after a free scope analysis.

How do we avoid duplicate orders in an integration?

The key is idempotency: every marketplace order carries its own identifier, stored alongside the order in the store. Before saving, the system checks whether an order with that identifier already exists — if so, it updates it instead of creating a new one. A retried request after an API timeout can no longer create a duplicate.

How often should stock levels sync between channels?

Stock should flow event-driven, in near real time: every order and every stock change triggers updates of the other channels through a webhook or queue. On top of that, run a periodic reconciliation (e.g. hourly) with an alert when drift exceeds a threshold. Event-driven updates alone are not enough — network errors and API limits always produce some drift.

What is the difference between omnichannel and multichannel?

Multichannel is selling across many channels run independently — separate stock, descriptions and often teams. Omnichannel binds the same channels with a shared data layer: one source of truth for stock, one order queue and one customer history. Multichannel can be run by hand up to a point; omnichannel cannot exist without integration.

What should we do when stock drifts between Allegro and the store?

First, establish one source of truth for stock (usually the store warehouse) and publish stock reduced by a safety buffer on external channels. Second, reserve items immediately when a marketplace order arrives. Third, run a reconciliation comparing stock across channels with an alert above a threshold — so drift is detected within the hour, not through complaints.

Is a BaseLinker integration enough, or do we need a dedicated one?

BaseLinker covers standard flows: offers, orders, stock, carriers and accounting. A dedicated integration makes sense when custom business logic appears: non-standard pricing rules (B2B, customer groups), multiple warehouses, complex order workflows or specific ERP requirements. The best results come from combining both: BaseLinker as the channel hub plus a dedicated layer for processes the hub does not handle.

KS

Krzysztof Słonina

Full-stack developer · 16 years of experience

I build and stabilize web applications, e-commerce integrations and automations. If your integration duplicates orders or lets stock drift apart — describe the problem and I will get back to you within 24 hours.

About the author

Technologies

Laravel PHP 8.4 Baselinker API PostgreSQL Redis Webhooks RabbitMQ

Similar problem in your store?

Free consultation — we will map your integration and estimate the fix.

Book a call

Related service

E-commerce integrations

API, webhook and marketplace integrations with queues, retries and monitoring.

See the service

Related services

Related articles

Want similar results?

Let us talk about your project. Free consultation.

Book a call