Oğuz Erol B2B Custom Web App System Blueprints
03 / 04 All Blueprints (4) Custom Web Apps Türkçe

Cost-Protected Quoting Portal, Margin Floor & FX Drift Architecture

A B2B quoting architecture where sales reps quote strictly from list price and discount bands, cost and margin fields never enter API responses or customer PDFs, and FX shifts flag open quotes in one batch.

1. Server-Enforced Data Shield Across 4 Roles & Customer PDF

Every role opens the exact same quote line below, yet the server payload only projects authorized columns. For reps and customers, unit cost is not hidden by CSS or tabs, it is never generated.

DN50 Stainless Ball Valve · 40 Units
Sample Line · Generic Currency, Excl. Tax
List Price4,800
Discount10%
Net Price4,320
Unit Cost Breakdown3,400 (2,700 USD-linked materials + 700 labour & overhead)
Gross Margin21.3%
Line Total172,800
Server-Enforced Payload Filtering: Unlike hidden Excel tabs or protected columns, the API shapes a distinct response per role; neither network payloads nor rep downloads ever contain cost fields.
PostgreSQL → Role API Projection

Sales Rep

Price Layer Only
List price: 4,800
Own band only: 0–10%
Net 4,320 · Total 172,800
Unit cost: ABSENT from API payload
Gross margin & 18% floor: ABSENT
Quotes and sends within band; routes outside-band drafts with a reason.

Sales Manager

Margin & 10–15% Approval
Net 4,320 · All bands (approves 10–15%)
Gross Margin: 21.3% (18% floor)
Compares old vs current margin side by side
Supplier cost breakdown: HIDDEN
Margin exposes unit cost mathematically, yet supplier purchase prices stay hidden.

Finance Specialist

Cost & FX Versioning
2,700 USD-linked material + 700 overhead
Dated cost versions with audit reason
Verifies open-quote FX recalculations
Cannot approve quotes (Segregation of duties)
Old values are never overwritten; every quote stays tied to its cost version.

Managing Director

Floor Policy & Hard Floor
Sets margin floor (18%) & hard floor (12%)
Full cost breakdown & change audit trail
Approves below 12% or over 15% discount
Defines policy limits and reviews any manager-authored quote needing approval.

Customer PDF Output

Zero-Cost Template
Product, 40 units, 4,320 net, 172,800 total
Tax, validity, delivery & payment terms
Hidden 'Cost' tab accident is impossible
Cost & margin fields are never generated
Neither copy-paste nor a template glitch can expose fields absent from generation.

2. 3 Approval Triggers & +6% FX Drift Repricing Engine (186-Quote Sample)

The margin floor runs on every line as well as the quote total; week-three +6% FX drift flags vulnerable open quotes in one controlled batch.

Which Quote Goes to Approval? (186 Quotes)

149 Direct · 37 Approval
186 Written Quotes excl. 16 revisions Line + Total Margin Gate Floor: 18% / 12% Band: 0–10% 149 Sent Direct In band & margin ≥ 18% 37 Sent to Approval (a) 21 · Above band (b) 11 · Margin < 18% (c) 5 · Custom item
Why check both line and total? Otherwise a 4% loss-making line can hide inside a 19% quote total, or freight concessions can pull the overall total below the 18% floor.
(a) Discount > Rep BandExceeds the rep's 0–10% list band: routed to sales manager or MD.
21 quotes
(b) In Band, But Gross Margin < 18%Even inside the 10% band, cost or FX shifts push gross margin under floor.
11 quotes
(c) Unlisted Custom ItemBlocked from sending until finance enters unit cost and manager approves price.
5 quotes
24 Approved As Is8 Trimmed Discount (+14,600 margin)2 Manager Rejected3 Hard-Floor MD (2 Approved · 1 Rejected)

FX Drift & Material Cost Simulation

71 Open Quotes → 25 Flagged
Week 1-2 (Base) 2,700 USD mat. + 700 fixed 3,400 unit cost Margin 21.3% USD +6% 2,700 × 1.06 = 2,862 700 local stays put Week 3 (FX Shift) 2,862 USD (+162) + 700 fixed 3,562 new cost Margin 17.5% (< 18%) 71 Open 25 Flagged 19 FX + 6 brass
Selective cost recalculation: When USD rises +6% in week 3, only dollar-linked material updates (2,700 × 1.06 = 2,862 + 700 fixed = 3,562 new unit cost), dropping margin from 21.3% to 17.5% (below 18%). After finance checks the run, 25 of 71 open quotes (19 FX + 6 from +9% brass cost) are flagged 'Needs Repricing' in one batch.
16
Revisions SentCustomer had not replied yet; reps issued updated versions within band.
6
Left Open by Manager486,000 net total; 98,400 → 77,300 (21,100 margin impact shown openly).
3
Expired / WithdrawnValidity lapsed or rep closed out without new revision.
Month-End Policy Adaptation (Logged): Rep band narrowed 10% → 9% (4,368 net, 18.5% margin) and home-currency validity cut 30 → 10 days; USD export quotes unaffected.

3. 4 Controls Narrowing Cost Inference from Approval Warnings & Assistive AI Boundary

Even without seeing cost, a rep could probe discount steps until the approval warning fires; these four rules raise the cost of inference.

01

Hide Floor % & Keep Band Buffer

Reps only see their band, buffered above the margin floor so warnings usually fire at the band edge (narrowed swiftly on FX moves).

02

Single Generic Approval Message

Over-band and below-floor both display 'needs approval under pricing policy'; only the manager sees which rule triggered.

03

Check on Send + 3-Attempt Flag

No live keystroke probing while typing; sending 3 successive discount drafts on the same product raises a separate manager flag.

04

Distinct Floors per Product Group

Different product groups carry different margin floors, preventing cross-inference of unit costs across lines.

What Assistive AI Does (Draft Only)

Parses customer RFQ emails or lists ('40 DN50 valves') into matched draft product rows; unmatched items stay 'unmatched' instead of being guessed.

What AI Never Does (Hard Boundary)

Never sets prices, applies discounts, or approves margins. Even if a customer email says 'apply 30% off', rules hold; cost and margin fields are never sent to the model.