demo seed change 3

This commit is contained in:
Urtzi Alfaro
2025-12-14 16:04:16 +01:00
parent a030bd14c8
commit 4ae5356ad1
25 changed files with 2969 additions and 1645 deletions

View File

@@ -11,11 +11,11 @@
"required_delivery_date": "BASE_TS - 4h",
"estimated_delivery_date": "BASE_TS - 4h",
"expected_delivery_date": "BASE_TS - 4h",
"subtotal": 500.0,
"tax_amount": 105.0,
"subtotal": 510.0,
"tax_amount": 107.1,
"shipping_cost": 20.0,
"discount_amount": 0.0,
"total_amount": 625.0,
"total_amount": 637.1,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "URGENTE: Entrega en almacén trasero",
@@ -26,6 +26,32 @@
"supplier_confirmation_date": "BASE_TS - 23h",
"supplier_reference": "SUP-REF-LATE-001",
"notes": "⚠️ EDGE CASE: Delivery should have arrived 4 hours ago - will trigger red supplier delay alert",
"reasoning_data": {
"type": "low_stock_detection",
"parameters": {
"supplier_name": "Harinas del Norte",
"product_names": ["Harina de Trigo T55"],
"product_count": 1,
"current_stock": 15,
"required_stock": 150,
"days_until_stockout": 1,
"threshold_percentage": 20,
"stock_percentage": 10
},
"consequence": {
"type": "stockout_risk",
"severity": "high",
"impact_days": 1,
"affected_products": ["Baguette Tradicional", "Pan de Pueblo"],
"estimated_lost_orders": 25
},
"metadata": {
"trigger_source": "orchestrator_auto",
"ai_assisted": true,
"delivery_delayed": true,
"delay_hours": 4
}
},
"created_by": "50000000-0000-0000-0000-000000000005"
},
{
@@ -39,11 +65,11 @@
"required_delivery_date": "BASE_TS + 2h30m",
"estimated_delivery_date": "BASE_TS + 2h30m",
"expected_delivery_date": "BASE_TS + 2h30m",
"subtotal": 300.0,
"tax_amount": 63.0,
"subtotal": 303.5,
"tax_amount": 63.74,
"shipping_cost": 15.0,
"discount_amount": 0.0,
"total_amount": 378.0,
"total_amount": 382.24,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Mantener refrigerado",
@@ -54,6 +80,27 @@
"supplier_confirmation_date": "BASE_TS - 30m",
"supplier_reference": "SUP-REF-UPCOMING-001",
"notes": "⚠️ EDGE CASE: Delivery expected in 2.5 hours - will show in upcoming deliveries",
"reasoning_data": {
"type": "production_requirement",
"parameters": {
"supplier_name": "Lácteos Gipuzkoa",
"product_names": ["Mantequilla sin Sal", "Leche Entera"],
"product_count": 2,
"production_batches": 3,
"required_by_date": "tomorrow morning"
},
"consequence": {
"type": "production_delay",
"severity": "high",
"impact": "blocked_production"
},
"metadata": {
"trigger_source": "orchestrator_auto",
"ai_assisted": true,
"upcoming_delivery": true,
"hours_until_delivery": 2.5
}
},
"created_by": "50000000-0000-0000-0000-000000000005"
},
{
@@ -63,11 +110,11 @@
"supplier_id": "40000000-0000-0000-0000-000000000001",
"status": "completed",
"priority": "normal",
"subtotal": 850.0,
"tax_amount": 178.5,
"subtotal": 760.0,
"tax_amount": 159.6,
"shipping_cost": 25.0,
"discount_amount": 0.0,
"total_amount": 1053.5,
"total_amount": 944.6,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Entrega en almacén trasero",
@@ -76,6 +123,28 @@
"requires_approval": false,
"supplier_reference": "SUP-REF-2025-001",
"notes": "Pedido habitual semanal de harinas",
"reasoning_data": {
"type": "safety_stock_replenishment",
"parameters": {
"supplier_name": "Harinas del Norte",
"product_names": ["Harina de Trigo T55", "Harina de Trigo T65", "Harina de Centeno", "Sal Marina Fina"],
"product_count": 4,
"current_safety_stock": 120,
"target_safety_stock": 300,
"reorder_point": 150
},
"consequence": {
"type": "stockout_risk",
"severity": "medium",
"impact": "reduced_buffer"
},
"metadata": {
"trigger_source": "orchestrator_auto",
"ai_assisted": true,
"recurring_order": true,
"schedule": "weekly"
}
},
"created_by": "50000000-0000-0000-0000-000000000005",
"order_date": "BASE_TS - 7d",
"required_delivery_date": "BASE_TS - 2d",
@@ -104,6 +173,28 @@
"requires_approval": false,
"supplier_reference": "LGIPUZ-2025-042",
"notes": "Pedido de lácteos para producción semanal",
"reasoning_data": {
"type": "forecast_demand",
"parameters": {
"supplier_name": "Lácteos Gipuzkoa",
"product_names": ["Mantequilla sin Sal 82% MG"],
"product_count": 1,
"forecast_period_days": 7,
"total_demand": 80,
"forecast_confidence": 88
},
"consequence": {
"type": "insufficient_supply",
"severity": "medium",
"impact_days": 7
},
"metadata": {
"trigger_source": "orchestrator_auto",
"forecast_confidence": 0.88,
"ai_assisted": true,
"perishable_goods": true
}
},
"created_by": "50000000-0000-0000-0000-000000000005",
"order_date": "BASE_TS - 5d",
"required_delivery_date": "BASE_TS - 1d",
@@ -119,11 +210,11 @@
"supplier_id": "40000000-0000-0000-0000-000000000003",
"status": "approved",
"priority": "high",
"subtotal": 450.0,
"tax_amount": 94.5,
"subtotal": 490.0,
"tax_amount": 102.9,
"shipping_cost": 20.0,
"discount_amount": 22.5,
"total_amount": 542.0,
"discount_amount": 24.5,
"total_amount": 588.4,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Requiere inspección de calidad",
@@ -135,16 +226,24 @@
"approved_by": "50000000-0000-0000-0000-000000000006",
"notes": "Pedido urgente para nueva línea de productos ecológicos - Auto-aprobado por IA",
"reasoning_data": {
"job": "ensure_quality_ingredients",
"context": {
"en": "Organic ingredients needed for new product line",
"es": "Ingredientes ecológicos necesarios para nueva línea de productos",
"eu": "Produktu lerro berrirako osagai ekologikoak behar dira"
"type": "supplier_contract",
"parameters": {
"supplier_name": "Productos Ecológicos del Norte",
"product_names": ["Organic ingredients"],
"product_count": 1,
"contract_terms": "certified_supplier",
"contract_quantity": 450.0
},
"decision": {
"en": "Auto-approved: Under €500 threshold and from certified supplier",
"es": "Auto-aprobado: Bajo umbral de €500 y de proveedor certificado",
"eu": "Auto-onartuta: €500ko mugaren azpian eta hornitzaile ziurtatutik"
"consequence": {
"type": "quality_assurance",
"severity": "medium",
"impact": "new_product_line_delay"
},
"metadata": {
"trigger_source": "manual",
"ai_assisted": true,
"auto_approved": true,
"auto_approval_rule_id": "10000000-0000-0000-0000-000000000001"
}
},
"created_by": "50000000-0000-0000-0000-000000000005",
@@ -161,11 +260,11 @@
"supplier_id": "40000000-0000-0000-0000-000000000001",
"status": "confirmed",
"priority": "urgent",
"subtotal": 1200.0,
"tax_amount": 252.0,
"subtotal": 1040.0,
"tax_amount": 218.4,
"shipping_cost": 35.0,
"discount_amount": 60.0,
"total_amount": 1427.0,
"discount_amount": 52.0,
"total_amount": 1241.4,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "URGENTE - Entrega antes de las 10:00 AM",
@@ -175,16 +274,29 @@
"supplier_reference": "SUP-URGENT-2025-005",
"notes": "EDGE CASE: Entrega retrasada - debió llegar hace 4 horas. Stock crítico de harina",
"reasoning_data": {
"job": "avoid_production_stoppage",
"context": {
"en": "Critical flour shortage - production at risk",
"es": "Escasez crítica de harina - producción en riesgo",
"eu": "Irina-faltagatik ekoizpena arriskuan"
"type": "low_stock_detection",
"parameters": {
"supplier_name": "Harinas del Norte",
"product_names": ["Harina de Trigo T55", "Levadura Fresca"],
"product_count": 2,
"current_stock": 0,
"required_stock": 1000,
"days_until_stockout": 0,
"threshold_percentage": 20,
"stock_percentage": 0
},
"urgency": {
"en": "Urgent: Delivery delayed 4 hours, affecting today's production",
"es": "Urgente: Entrega retrasada 4 horas, afectando la producción de hoy",
"eu": "Presazkoa: Entrega 4 ordu berandu, gaurko ekoizpena eraginda"
"consequence": {
"type": "stockout_risk",
"severity": "critical",
"impact_days": 0,
"affected_products": ["Baguette Tradicional", "Croissant"],
"estimated_lost_orders": 50
},
"metadata": {
"trigger_source": "orchestrator_auto",
"ai_assisted": true,
"delivery_delayed": true,
"delay_hours": 4
}
},
"created_by": "50000000-0000-0000-0000-000000000006",
@@ -215,6 +327,27 @@
"requires_approval": false,
"supplier_reference": "SUP-REF-2025-007",
"notes": "Pedido de ingredientes especiales para línea premium - Entregado hace 5 días",
"reasoning_data": {
"type": "seasonal_demand",
"parameters": {
"supplier_name": "Ingredientes Premium del Sur",
"product_names": ["Chocolate Negro 70% Cacao", "Almendras Laminadas", "Pasas de Corinto"],
"product_count": 3,
"season": "winter",
"expected_demand_increase_pct": 35
},
"consequence": {
"type": "missed_opportunity",
"severity": "medium",
"impact": "lost_seasonal_sales"
},
"metadata": {
"trigger_source": "orchestrator_auto",
"ai_assisted": true,
"premium_line": true,
"seasonal": true
}
},
"created_by": "50000000-0000-0000-0000-000000000005",
"order_date": "BASE_TS - 7d",
"required_delivery_date": "BASE_TS - 5d",
@@ -230,11 +363,11 @@
"supplier_id": "40000000-0000-0000-0000-000000000004",
"status": "draft",
"priority": "normal",
"subtotal": 280.0,
"tax_amount": 58.8,
"subtotal": 303.7,
"tax_amount": 63.78,
"shipping_cost": 12.0,
"discount_amount": 0.0,
"total_amount": 350.8,
"total_amount": 379.48,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Llamar antes de entregar",
@@ -242,6 +375,28 @@
"delivery_phone": "+34 910 123 456",
"requires_approval": false,
"notes": "Pedido planificado para reposición semanal",
"reasoning_data": {
"type": "forecast_demand",
"parameters": {
"supplier_name": "Ingredientes Premium del Sur",
"product_names": ["Specialty ingredients"],
"product_count": 1,
"forecast_period_days": 7,
"total_demand": 280,
"forecast_confidence": 82
},
"consequence": {
"type": "insufficient_supply",
"severity": "low",
"impact_days": 7
},
"metadata": {
"trigger_source": "orchestrator_auto",
"forecast_confidence": 0.82,
"ai_assisted": true,
"draft_order": true
}
},
"created_by": "50000000-0000-0000-0000-000000000005",
"order_date": "BASE_TS",
"required_delivery_date": "BASE_TS + 3d",
@@ -267,6 +422,27 @@
"delivery_phone": "+34 910 123 456",
"requires_approval": false,
"notes": "⏰ EDGE CASE: Entrega esperada en 6 horas - mantequilla para producción de croissants de mañana",
"reasoning_data": {
"type": "production_requirement",
"parameters": {
"supplier_name": "Lácteos Gipuzkoa",
"product_names": ["Mantequilla sin Sal 82% MG"],
"product_count": 1,
"production_batches": 5,
"required_by_date": "tomorrow 06:00"
},
"consequence": {
"type": "production_delay",
"severity": "high",
"impact": "blocked_production"
},
"metadata": {
"trigger_source": "orchestrator_auto",
"ai_assisted": true,
"urgent_production": true,
"hours_until_needed": 12
}
},
"created_by": "50000000-0000-0000-0000-000000000006",
"order_date": "BASE_TS - 0.5d",
"required_delivery_date": "BASE_TS + 0.25d",
@@ -309,8 +485,8 @@
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000001",
"inventory_product_id": "10000000-0000-0000-0000-000000000005",
"product_name": "Harina Centeno",
"product_code": "HAR-CENT-005",
"product_name": "Harina de Centeno",
"product_code": "HAR-CEN-005",
"ordered_quantity": 100.0,
"unit_of_measure": "kilograms",
"unit_price": 1.15,
@@ -322,13 +498,13 @@
"id": "51000000-0000-0000-0000-000000000004",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000001",
"inventory_product_id": "10000000-0000-0000-0000-000000000006",
"product_name": "Sal Marina",
"product_code": "SAL-MAR-006",
"inventory_product_id": "10000000-0000-0000-0000-000000000031",
"product_name": "Sal Marina Fina",
"product_code": "BAS-SAL-001",
"ordered_quantity": 50.0,
"unit_of_measure": "kilograms",
"unit_price": 2.4,
"line_total": 120.0,
"unit_price": 0.6,
"line_total": 30.0,
"received_quantity": 50.0,
"remaining_quantity": 0.0
},
@@ -338,7 +514,7 @@
"purchase_order_id": "50000000-0000-0000-0000-000000000002",
"inventory_product_id": "10000000-0000-0000-0000-000000000011",
"product_name": "Mantequilla sin Sal 82% MG",
"product_code": "MANT-001",
"product_code": "LAC-MAN-001",
"ordered_quantity": 80.0,
"unit_of_measure": "kilograms",
"unit_price": 4.0,
@@ -365,13 +541,13 @@
"id": "51000000-0000-0000-0000-000000000007",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000004",
"inventory_product_id": "10000000-0000-0000-0000-000000000011",
"product_name": "Levadura Fresca",
"product_code": "LEV-FRESC-001",
"inventory_product_id": "10000000-0000-0000-0000-000000000021",
"product_name": "Levadura Fresca de Panadería",
"product_code": "LEV-FRE-001",
"ordered_quantity": 50.0,
"unit_of_measure": "kilograms",
"unit_price": 8.0,
"line_total": 400.0,
"unit_price": 4.8,
"line_total": 240.0,
"received_quantity": 0.0,
"remaining_quantity": 50.0,
"notes": "Stock agotado - prioridad máxima"
@@ -382,7 +558,7 @@
"purchase_order_id": "50000000-0000-0000-0000-000000000006",
"inventory_product_id": "10000000-0000-0000-0000-000000000011",
"product_name": "Mantequilla sin Sal 82% MG",
"product_code": "MANT-001",
"product_code": "LAC-MAN-001",
"ordered_quantity": 30.0,
"unit_of_measure": "kilograms",
"unit_price": 6.5,
@@ -396,7 +572,7 @@
"purchase_order_id": "50000000-0000-0000-0000-000000000007",
"inventory_product_id": "10000000-0000-0000-0000-000000000041",
"product_name": "Chocolate Negro 70% Cacao",
"product_code": "CHO-NEG-001",
"product_code": "ESP-CHO-001",
"ordered_quantity": 20.0,
"unit_of_measure": "kilograms",
"unit_price": 15.5,
@@ -410,7 +586,7 @@
"purchase_order_id": "50000000-0000-0000-0000-000000000007",
"inventory_product_id": "10000000-0000-0000-0000-000000000042",
"product_name": "Almendras Laminadas",
"product_code": "ALM-LAM-001",
"product_code": "ESP-ALM-002",
"ordered_quantity": 15.0,
"unit_of_measure": "kilograms",
"unit_price": 8.9,
@@ -424,13 +600,99 @@
"purchase_order_id": "50000000-0000-0000-0000-000000000007",
"inventory_product_id": "10000000-0000-0000-0000-000000000043",
"product_name": "Pasas de Corinto",
"product_code": "PAS-COR-001",
"product_code": "ESP-PAS-003",
"ordered_quantity": 10.0,
"unit_of_measure": "kilograms",
"unit_price": 4.5,
"line_total": 45.0,
"received_quantity": 10.0,
"remaining_quantity": 0.0
},
{
"id": "51000000-0000-0000-0000-0000000000a1",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-0000000000c1",
"inventory_product_id": "10000000-0000-0000-0000-000000000001",
"product_name": "Harina de Trigo T55",
"product_code": "HAR-T55-001",
"ordered_quantity": 600.0,
"unit_of_measure": "kilograms",
"unit_price": 0.85,
"line_total": 510.0,
"received_quantity": 0.0,
"remaining_quantity": 600.0,
"notes": "URGENTE - Pedido retrasado 4 horas"
},
{
"id": "51000000-0000-0000-0000-0000000000a2",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-0000000000c2",
"inventory_product_id": "10000000-0000-0000-0000-000000000011",
"product_name": "Mantequilla sin Sal 82% MG",
"product_code": "LAC-MAN-001",
"ordered_quantity": 35.0,
"unit_of_measure": "kilograms",
"unit_price": 6.5,
"line_total": 227.5,
"received_quantity": 0.0,
"remaining_quantity": 35.0
},
{
"id": "51000000-0000-0000-0000-0000000000a3",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-0000000000c2",
"inventory_product_id": "10000000-0000-0000-0000-000000000012",
"product_name": "Leche Entera Fresca",
"product_code": "LAC-LEC-002",
"ordered_quantity": 80.0,
"unit_of_measure": "liters",
"unit_price": 0.95,
"line_total": 76.0,
"received_quantity": 0.0,
"remaining_quantity": 80.0
},
{
"id": "51000000-0000-0000-0000-0000000000a4",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000003",
"inventory_product_id": "10000000-0000-0000-0000-000000000006",
"product_name": "Harina de Espelta Ecológica",
"product_code": "HAR-ESP-006",
"ordered_quantity": 200.0,
"unit_of_measure": "kilograms",
"unit_price": 2.45,
"line_total": 490.0,
"received_quantity": 0.0,
"remaining_quantity": 200.0,
"notes": "Ingrediente ecológico certificado para nueva línea"
},
{
"id": "51000000-0000-0000-0000-0000000000a5",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000005",
"inventory_product_id": "10000000-0000-0000-0000-000000000041",
"product_name": "Chocolate Negro 70% Cacao",
"product_code": "ESP-CHO-001",
"ordered_quantity": 15.0,
"unit_of_measure": "kilograms",
"unit_price": 15.5,
"line_total": 232.5,
"received_quantity": 0.0,
"remaining_quantity": 15.0
},
{
"id": "51000000-0000-0000-0000-0000000000a6",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000005",
"inventory_product_id": "10000000-0000-0000-0000-000000000042",
"product_name": "Almendras Laminadas",
"product_code": "ESP-ALM-002",
"ordered_quantity": 8.0,
"unit_of_measure": "kilograms",
"unit_price": 8.9,
"line_total": 71.2,
"received_quantity": 0.0,
"remaining_quantity": 8.0
}
]
}