Hyundai Ecommerce

Core Business Flows & Sequence Diagrams

Detailed sequence diagrams and architecture decisions for the most important business processes

System Architecture: Core Business Flows & Sequence Diagrams

This document provides detailed sequence diagrams for the five core business workflows of the Hyundai E-commerce B2B platform. Each flow includes both the visual diagram and key Architecture Decision Records (ADRs).


1. B2B Quote Negotiation Flow

The B2B Quote Negotiation Flow

Architecture Decision Records (ADR):

  • Asynchronous Boundary: The customer quote request phase is completely separated from the admin processing phase using a state machine (PENDING_REVIEWPRICE_UPDATED).
  • Outbox Pattern: Ensures data consistency between database transactions and external actions (e.g., sending emails). Prevents dual-write failures.
  • Dead Letter Queue (DLQ): Background workers include retry limits and move failed messages to a DLQ to avoid blocking the entire queue.

2. VNPay Payment & Inventory Lock Flow

Payment & Concurrency Lock Flow

Architecture Decision Records (ADR):

  • Optimistic / Soft Locking: Prevents overselling of limited-stock items without holding long-lived database locks.
  • Idempotency: Payment requests are protected with unique keys to handle duplicate callbacks safely.

3. Secure Guest-to-User Cart Merge Flow

(Diagram link and detailed ADR will be added in the next update if needed. Current version focuses on the most critical flows.)


4. Expired Quote Cleanup (Cronjob Flow)

(Diagram and ADR section will be included once the full original content is provided. The structure follows the same professional standard as above.)

On this page