erp_read_orders

Read recent ERP orders for one account or by order ID.

Category
ERP
Stability
Beta
Version
v1
Auth
cf-access

Input schema

{
  "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"] }
  ]
}

Output schema

{
  "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" }
              }
            }
          }
        }
      }
    }
  }
}

Example invocation

{
  "tool": "erp_read_orders",
  "arguments": { "account_id": "ACME-0042", "limit": 3 }
}

Example response

{
  "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 }
      ]
    }
  ]
}

Read-only. Use draft-order-ack skill to turn the response into a customer-facing email draft. Paginates client-side via since + limit.