The client is described by industry and scale, without a name. KPI figures are targets agreed with the client after a baseline measurement.
In brief
- Problem
- Inventory levels are synchronized with a delay, which leads to selling products that are not in stock.
- Approach
- A central order and inventory service that collects orders from all channels, reserves stock, and passes orders to the logistics operator.
- Goal
- Lost or duplicated messages: 0 in resilience tests; API p99 latency: ≤ 300 ms.
Client context
Online retail runs on the rhythm of campaigns and seasonal peaks: Black Friday, the holidays, sales. An outage at the peak means lost revenue that cannot be recovered. The client is a cosmetics manufacturer selling through its own store and several marketplaces, with an external logistics operator.
Challenge
Inventory levels are synchronized with a delay, which leads to selling products that are not in stock. Orders from marketplaces are re-keyed by hand.
Requirements and constraints
- The Omnibus Directive and the Polish act on price information require showing the lowest price from the 30 days before a discount, and disclosing how reviews are verified and whether the seller is a business. The pricing engine and the catalog must store price history. (source)
- GDPR, that is Regulation (EU) 2016/679, requires data minimization, a legal basis for processing, and processing agreements, and for high-risk processing also a data protection impact assessment (DPIA). In practice it rules out copying production data into test environments without anonymization or pseudonymization. (source)
- KSeF (Poland's National e-Invoicing System) introduces mandatory structured invoices in the FA(3) format. Finance and accounting systems must handle sending, receiving, fallback modes, and KSeF numbers throughout the document flow. (source)
- Project constraints: work only on anonymized or synthetic data outside production, access to systems through the client's infrastructure, and every deliverable shipped with documentation that the client's team can take over.
Approach and architecture
We design integrations starting from the contract: an OpenAPI or AsyncAPI specification is written and agreed with consumers before anyone writes code. We build asynchronous communication on events, with a schema registry and compatibility rules, and the transactional outbox pattern and idempotent consumers protect against duplicates and message loss. Every integration has an owner, metrics, and alerts.
A central order and inventory service that collects orders from all channels, reserves stock, and passes orders to the logistics operator. Inventory synchronization is event-driven, and a daily reconciliation detects discrepancies.
Key elements of the solution:
- A central order and inventory service
- Marketplace adapters
- Integration with the logistics operator's WMS
- Daily inventory reconciliation
Team and roles
| Role | Count | Responsibility |
|---|---|---|
| Integration engineer | 2 | API contracts, Kafka, ESB, contract tests |
| Backend developer (Java/Kotlin) | 2 | domain services, API, unit tests |
| Test analyst (ISTQB) | 1 | designing and executing test cases, reporting defects |
| Product owner and domain experts (client side) | as needed | priorities, business decisions, acceptance |
Phased schedule
| Phase | Weeks | Deliverable |
|---|---|---|
| 1. Integration inventory | 1–4 | flow map, interface catalog |
| 2. Contract and platform design | 5–9 | API specifications, schema registry |
| 3. Build and incremental migration | 10–19 | new interfaces, traffic cutovers |
| 4. Contract and resilience testing | 20–23 | contract tests, failure scenarios |
| 5. Retiring the old connections | 24–24 | decommissioning plan, documentation |
Technology stack
Node.js or Java, Kafka or RabbitMQ, PostgreSQL, marketplace APIs, Pact.
Risks and how we mitigate them
| Risk | How we mitigate it |
|---|---|
| A large number of integrations with unclear owners | an integration catalog with owners, contract tests, prioritization by criticality |
| Dependence on an external vendor and its deadlines | early agreement on API contracts, a stub environment, a weekly dependency review |
| Loss or duplication of messages when switching flows | transactional outbox, idempotent consumers, daily reconciliation of events against the source |
Measurable goals and KPIs
The values below are targets that we agree with the client after a baseline measurement in the first phase.
| KPI | Target | How it is measured |
|---|---|---|
| Lost or duplicated messages | 0 in resilience tests | chaos tests, event reconciliation |
| API p99 latency | ≤ 300 ms | APM |
| Critical defects found after go-live | 0 critical defects in the first 30 days | production incident register |
Lessons learned and good practices
Reserving stock at the moment of ordering eliminates selling products that are not in stock. Daily reconciliation is a safety net for every integration. The most expensive integrations are the ones nobody has inventoried.
Why B2B.net
B2B.net S.A. has operated since 2015 and has worked for more than 50 brands, mainly where audits are routine: in banks, insurers, and critical infrastructure. We are an accredited exam center, so a test methodology is not a declaration for us but a working standard. We give a first proposal of specialists within 24 hours, and a team can start within 5 business days.
Acceptance criteria
Each phase ends with a formal acceptance against criteria agreed at the start. In this implementation, acceptance covers: flow map, interface catalog; API specifications, schema registry; new interfaces, traffic cutovers; contract tests, failure scenarios; decommissioning plan, documentation. Final acceptance requires a KPI measurement report against the baseline, complete documentation handed over to the client's team, and a list of recommendations for the next stage, with a cost and risk assessment for each.
Next step
Let's talk about your project. We will get back to you within 24 hours with a quote or a proposal of engineers, and a team can start within 5 business days. Contact: office@b2bnetwork.pl.
What would this look like for you?
Book a 30-minute call. We will prepare a plan for the first weeks and a team matched to your system.
Let's talkB2Bnetwork · B2B.net S.A. · accredited exam center. We describe clients by industry and scale, without names.