@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Dynamic.puml

title Order to Fulfillment - Dynamic Workflow

Person(customer, "Customer")
Person(staff, "Operations Staff")

System_Ext(wordpress, "WordPress / WooCommerce", "Customer storefront and order capture")
System(system, "Kell Creations Platform", "Unified business applications and shared services")

Container(api, "API Orchestrator", "Integration Service", "Coordinates workflow and integration events")
Container(inventory, "Inventory Application", "Business Application", "Tracks finished goods and material availability")
Container(mrp, "Craft Manufacturing / MRP", "Business Application", "Plans production and fulfillment readiness")
Container(finance, "Financial Analysis", "Business Application", "Captures financial reporting and transaction impacts")
Container(notify, "Notification Service", "Messaging Service", "Sends alerts and status notifications")
Container(audit, "Audit & Logging Service", "Observability Service", "Captures workflow and compliance events")

Rel(customer, wordpress, "Places order through")
Rel(staff, inventory, "Reviews inventory status in")
Rel(staff, mrp, "Executes production and fulfillment in")

Rel(wordpress, api, "Sends order event to")
Rel(api, inventory, "Checks stock availability in")
Rel(api, mrp, "Creates production/fulfillment demand in when needed")
Rel(mrp, inventory, "Consumes materials and updates finished goods availability in")
Rel(api, finance, "Records financial event for")
Rel(api, notify, "Triggers order and exception notifications through")
Rel(api, audit, "Logs workflow events to")
Rel(mrp, audit, "Logs production and fulfillment events to")
Rel(inventory, audit, "Logs stock movement and adjustment events to")
Rel(finance, audit, "Logs financial processing events to")

@enduml