erp_read_orders
Lire les commandes ERP récentes pour un compte ou par ID de commande.
Schéma d’entrée
{
"type": "object",
"properties": {
"account_id": { "type": "string" },
"order_id": { "type": "string" },
"limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 },
"since": { "type": "string", "format": "date", "description": "ISO date — only orders on or after" }
},
"oneOf": [
{ "required": ["account_id"] },
{ "required": ["order_id"] }
]
}
Schéma de sortie
{
"type": "object",
"properties": {
"orders": {
"type": "array",
"items": {
"type": "object",
"properties": {
"order_id": { "type": "string" },
"account_id": { "type": "string" },
"placed_at": { "type": "string", "format": "date-time" },
"ship_by": { "type": "string", "format": "date" },
"total_eur": { "type": "number" },
"status": { "type": "string", "enum": ["draft", "confirmed", "shipped", "invoiced", "paid"] },
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sku": { "type": "string" },
"qty": { "type": "number" },
"unit_price_eur": { "type": "number" },
"line_total_eur": { "type": "number" }
}
}
}
}
}
}
}
}
Exemple d’invocation
{
"tool": "erp_read_orders",
"arguments": { "account_id": "ACME-0042", "limit": 3 }
}
Exemple de réponse
{
"orders": [
{
"order_id": "SO-2026-04-1042",
"account_id": "ACME-0042",
"placed_at": "2026-04-21T09:14:00Z",
"ship_by": "2026-04-28",
"total_eur": 1412.00,
"status": "confirmed",
"lines": [
{ "sku": "VIN-ROUGE-75", "qty": 24, "unit_price_eur": 18.50, "line_total_eur": 444.00 }
]
}
]
}
Lecture seule. Utilisez la compétence draft-order-ack pour transformer la réponse en brouillon d’email client. Pagination côté client via since + limit.