// THE CLIENT

Nemat Enterprises distributes fragrances at B2B scale - across four manufacturing companies, multiple product categories, and hundreds of wholesale buyers.

Their catalogue spans Attars, Roll Ons, Non-Alcoholic Sprays, Agarbatti, and bulk compounds - each with different pricing logic, different discount structures, and different minimum order requirements depending on the buyer's volume.

Products are sourced from four distinct manufacturing entities. When an order is placed, the system needs to determine - automatically - which manufacturer issues the sales order, and whether it goes direct or gets consolidated through Aromas Sales.

The previous system had hardcoded Agarbatti at a flat 18% discount regardless of order value. Discount slabs were shared across all categories. Sales order routing logic was silently producing wrong outputs across multiple order scenarios. None of this was visible until orders were placed and discrepancies appeared.

// MANUFACTURER NETWORK
AS
Aromas Sales Pvt. Ltd.
Consolidation entity - handles orders below threshold
MP
Modern Perfumery Co.
Direct-issue manufacturer for qualifying orders
NF
Nemat Fragrances
Primary fragrance manufacturer - Attar & Roll On
NS
Nemat Spray Perfumes
Non-Alcoholic Sprays & Agarbatti manufacturer
MONTHLY VOLUME
150+
B2B orders processed monthly across all manufacturers
// WHAT WAS BROKEN

Three distinct systems. All producing wrong outputs.

01 - PRICING

Hardcoded discounts ignoring order value

Agarbatti was hardcoded at 18% regardless of order size. All categories shared a single discount slab. A buyer ordering ₹5,00,000 of Attar got the same discount as someone ordering ₹50,000 - because the system had no way to separate category-level logic.

02 - SALES ORDERS

Wrong manufacturer routing on live orders

The SO routing engine was producing incorrect outputs across multiple order scenarios - sending orders to Aromas Sales when they should have gone direct to the manufacturer, and vice versa. The logic evaluated all categories together instead of independently per category per manufacturer.

03 - CART

Product-level minimums blocking B2B buying behaviour

Minimum quantity requirements were enforced per product. A wholesale buyer who wanted to mix 20 pieces of Product A and 60 pieces of Product B from the same series could not - even though the combined 80 pieces met the series minimum. The system forced them to hit the minimum on each product individually.

// THE SOLUTION

Three separate engines. Each rebuilt from the correct business logic up.

ENGINE 01 - DYNAMIC DISCOUNT SLAB SYSTEM
HOW IT NOW WORKS

Discount slabs are created independently and assigned to specific categories. A slab assigned to Attar only applies to Attar products. Agarbatti has its own slab with its own tier logic - no more hardcoding.

One slab can be assigned to multiple categories simultaneously. When it is, those categories are evaluated together in a single cart card. When categories have separate slabs, they get separate cards with separate discount calculations.

The cart now shows buyers exactly how their order value maps to their discount tier - transparently, per category group.

EXAMPLE: CART WITH 3 CATEGORY GROUPS
Attar + Non-Alcoholic Sprays
Shared slab - evaluated together
₹2,100 → 40% discount applied
Roll On
Separate slab - independent card
₹500 → 20% discount applied
Agarbatti
Own slab - always separate
₹500 → 18% discount applied
ENGINE 02 - SALES ORDER ROUTING SYSTEM
THE ROUTING LOGIC

Each category is evaluated independently per manufacturer. Agarbatti is never combined with non-Agarbatti totals - even from the same manufacturer.

If a manufacturer's non-Agarbatti total reaches ₹50,000, they issue their own sales order directly. Below that threshold, those products consolidate under Aromas Sales. Agarbatti follows the same independent threshold check.

13 distinct business scenarios were mapped, tested, and verified - covering every combination of manufacturer totals, category splits, and threshold crossings.

SCENARIO COVERAGE
All under threshold
2 Aromas SOs (non-Agarbatti + Agarbatti)
One manufacturer over
Direct SO + 1-2 Aromas consolidation SOs
Both manufacturers over
All direct SOs, no consolidation needed
Agarbatti over, others under
Direct Agarbatti SO + Aromas for rest
Mixed threshold scenarios
9 additional edge cases - all passing
ENGINE 03 - SERIES-BASED CART ARCHITECTURE
THE NEW BUYING FLOW

Minimum quantity requirements now operate at the series level, not the product level. A buyer can mix any combination of products from a series - as long as the combined quantity meets the series minimum.

A sticky bottom bar accumulates selected products as they browse. The Add to Cart button activates only once the series quantity threshold is met. Until then, it shows exactly how many more pieces are needed.

The PDF generation for sales orders was also refactored - decoupled from order placement entirely, with idempotent SO number generation that creates each number exactly once regardless of how many times the document is printed.

SERIES BAG - UI FLOW
SERIES: Attar 96 London 2.5ml - Min. 80 pcs
Attar 96 Aala 20 pcs
Attar 96 Amber Oud 30 pcs
Attar 96 Baccarat 30 pcs
Combined total 80 pcs ✓
ADD TO CART - Threshold met
// THE OUTCOME

Pricing that's correct. Orders that route right. Every time.

The platform now handles the full complexity of Nemat's B2B operation without manual intervention. Discount slabs are managed dynamically by admins. Sales orders route to the correct manufacturer automatically. Buyers can place mixed-product orders the way wholesale purchasing actually works.

The pricing errors that were silently occurring on live orders are gone. The SO routing that was sending consolidation orders to the wrong entity is fixed across all 13 tested scenarios.

// AFTER K2O2
Discount logic
Category-specific slabs, fully dynamic, admin-managed
Agarbatti pricing
Own configurable slab - no more hardcoding
Sales order routing
Correct across all 13 manufacturer-threshold scenarios
Cart minimum enforcement
Series-level combined quantity - not per-product
PDF / SO generation
Decoupled, idempotent, reprints without duplicate SO numbers
Monthly order volume
150+ B2B orders processing without pricing errors
HAVE A SIMILAR PROBLEM?

Complex business logic is where we start.

If your platform has pricing logic, routing rules, or order workflows that your current team said were "too complex" - that's exactly the kind of problem we take on.

← Back to all work
Operations: India
System: Online
K2O2.Cloud Engineering Division

Engineering complex systems from Kalyan, Mumbai.
Precise inputs. Predictable outputs. Real results.

A dedicated service division is in the works. Until then - everything runs through K2O2 Cloud.

Headquarters A/801, Mohan Tribeca
Near Agrawal College, Kalyan 421301
Maharashtra, India
GSTIN: 27ABCFK9914L1Z8

[ Get Started ]

2026 K2O2 CLOUD TECHNOLOGIES LLP. All rights reserved.