Symptom
Every customer asking about their order gets "estimated delivery date is unavailable" even though the ShopFlow API returns the data.
The order ID, status, items, total, and tracking number all show correctly -- only the delivery date is missing.
What you know
The platform builds AI customer support agents. When a customer asks about an order, the system calls the ShopFlow API, maps the response to a clean format, and passes it to the LLM for response generation.
The ShopFlow API response includes a delivery_estimate field, but the mapped result always shows "unavailable".
Pipeline Flow
Customer Message → Intent Classifier → Action Executor → Response Generator
↑
Calls ShopFlow API
Maps response fields
Log excerpt (Message 1)
// ShopFlow API raw response:
{
"order_id": "SF-40821",
"status": "shipped",
"items": ["UltraBoost 5 (Size 10)"],
"total": "$189.99",
"shipped_at": "2024-11-15T14:30:00Z",
"delivery_estimate": "2024-11-18T00:00:00Z",
"tracking_number": "1Z999AA10123456784"
}
// Mapped result passed to LLM:
{
"order_id": "SF-40821",
"status": "shipped",
"estimated_delivery": "unavailable" <- Should be "2024-11-18"
}
Hints
TypeScript
TypeScript ready
Test Output
▶
Click "Run Tests" to execute your code