The core decision
SAP stays the book of record. The portal renders, validates and queues. It holds no independent opinion on price, credit or stock.
Everything else in this document follows from that one line. Three consequences are worth stating up front:
- There is no reconciliation problem, because two systems never both believe they own an order.
- Order-to-cash controls stay where they are, so the portal sits outside your SOX boundary.
- The portal can be changed, or replaced, without touching a finance system.
How it fits together
AWS, us-east-1 primary with a warm standby in us-west-2. Shaded nodes are external.
flowchart TB
subgraph CLI["Clients"]
direction LR
BUY["Buyers and admins
browser, SSO"]
CERP["Customer ERP
OAuth2, mTLS, EDI"]
end
subgraph EDGE["Edge"]
direction LR
DNS["Route 53
failover DNS"]
CDN["CloudFront
cached catalogue"]
WAF["WAF and Shield"]
GW["API gateway
authn, quotas"]
end
subgraph APP["Application, us-east-1, three AZs"]
direction LR
WEB["Web tier
Next.js SSR"]
BFF["Backend for frontend"]
SVC["Domain services
order, credit"]
WRK["Async workers
durable queue"]
end
subgraph DATA["Portal data"]
direction LR
PG[("Aurora
multi-AZ")]
RDS[("Redis
cache")]
OSS[("OpenSearch
index")]
OBJ[("S3 Object Lock
records")]
end
subgraph EXT["Systems of record and third parties"]
direction LR
SAP["SAP S/4HANA
orders, pricing, credit"]
PSP["Payment provider
hosted fields"]
TAX["Tax engine"]
SCR["Trade screening
OFAC, BIS"]
end
DR["us-west-2 standby
RTO 30 min, RPO 5 min"]
BUY --> WAF
CERP --> GW
WAF --> WEB
GW --> BFF
SVC --> PG
PG ~~~ SAP
WRK --> SAP
OBJ -. "replicated" .-> DR
classDef ext fill:#eef3f0,stroke:#17584a,stroke-width:1px,color:#14171a;
classDef standby fill:#ffffff,stroke:#9aa39c,stroke-dasharray:4 3,color:#3f474c;
class SAP,PSP,TAX,SCR ext;
class DR standby;
- Application tier is stateless and spread across three availability zones, so it scales horizontally and survives the loss of a zone without customer impact.
- Portal data is carts, saved BOMs, search indexes, sessions and the audit trail. All of it is reconstructible.
- Identity, key management, audit capture and tracing run across every layer and are not drawn.
When something breaks
This is the part that usually separates a portal that works from one that does not. Checkout never blocks on SAP. The portal screens, prices and accepts, then hands the order to a durable queue that drains at whatever rate SAP can sustain.
sequenceDiagram
autonumber
actor B as Buyer
participant P as Portal
participant S as Screening
participant Q as Order queue
participant E as SAP
B->>P: Submit order with idempotency key
P->>P: Re-price and re-check entitlement server side
P->>S: Screen account, user, ship-to
alt List match
S-->>P: Potential match
P-->>B: Order held for compliance review
Note over P,S: Fails closed. No release without clearance.
else Clear
S-->>P: Clear
P->>Q: Enqueue, persist durably
P-->>B: Acknowledged, portal reference issued
Q->>E: Create sales order
alt SAP reachable
E-->>Q: SAP order number
Q-->>B: Confirmed
else SAP unreachable
Q->>Q: Retry with backoff, dead-letter on exhaustion
Q-->>B: Confirmed when SAP returns
Note over Q,E: Buyer is never asked to resubmit.
end
end
| Unavailable | What customers see |
|---|---|
| An availability zone | nothing capacity absorbed by the other two |
| SAP pricing and stock | Cached figures, labelled indicative, re-priced at confirmation |
| SAP order intake | Order accepted and acknowledged. Confirmed when SAP returns. No resubmission. |
| Payment provider | Credit-line and PO checkout unaffected, which is most of the volume |
| Screening service | order held fails closed, never released unscreened |
| The whole region | Failover to us-west-2 inside 30 minutes |
Fail open or fail closed is decided per dependency
Commercial dependencies fail open so a customer can keep transacting. Compliance dependencies fail closed so nothing reaches an unscreened party. That choice is built into the services and is not left to someone's judgement at 2am.
Scale
The sizing constraint is catalogue breadth, not checkout volume. Search and availability across a large part master is what drives the design.
| Target | How |
|---|---|
| 100,000+ parts, search p95 under 300 ms | Served from a dedicated search index. SAP is not in the browse path. |
| Price and stock p95 under 400 ms | Short-lived cache with request coalescing. SAP re-prices authoritatively at confirmation. |
| No fixed session ceiling | Stateless tiers, autoscaled. Anonymous catalogue traffic never reaches the origin. |
| Order bursts above SAP intake rate | Queue absorbs the peak. Customer API and EDI run on separate capacity from the storefront. |
US regulatory position
For a semiconductor distributor the binding constraint is trade compliance, not payments. Screening sits inside the order lifecycle rather than acting as a check before despatch.
| Area | Position |
|---|---|
| Export control | ECCN on the part master and shown per line. Licence logic at order entry. End-use attestation at checkout. Controlled parts blocked by destination. Five-year record retention in write-once storage. |
| Denied party screening | Accounts, users and ship-to addresses screened against OFAC and BIS lists at onboarding, at order submission, and again whenever a list is republished. |
| PCI DSS | Card data goes into provider-hosted fields and never enters our environment. That holds the assessment at SAQ A, the cheapest scope available. Tokens only. |
| SOC 2 Type II | Controls built in from the first sprint and evidence collection automated, so the observation window opens at go-live rather than a year later. |
| Privacy and residency | CPRA covers business contact data, so B2B users get consumer-grade handling. All processing and backup in US regions. |
| Accessibility | WCAG 2.1 AA checked in the build pipeline and confirmed by independent audit. |
NIST SP 800-171 and CMMC are available as a scoped extension if defense-sector customers need it.
What we need from you
Four things decide the schedule. None of them is the user interface.
- SAP integration surface. API inventory, pricing and ATP call semantics, order intake contract. This is the critical path.
- Part-master data quality. ECCN coverage determines how much export-control logic can run automatically rather than through a compliance queue.
- Compliance boundary. Final PCI scope with your QSA and the export-control reading with your trade counsel.
- Platform. This assumes AWS and SAP S/4HANA. Both are substitutable. Confirm or redirect.
Delivery runs in six phases: foundation, catalogue, transact, account, integrate, assure. Usable function reaches customers from phase three, well before the programme completes.