Files
2026-07-13 19:57:46 +08:00

3.0 KiB

Canonical Examples

Task-ready raw team-single operation

This is sufficient for the business system to create a task. The ERP layer must resolve the deferred fields before preflight or submit:

{
  "status": "agent_parse_passed",
  "blockers": [],
  "operation": {
    "action": "team_order_create",
    "order_nature": "test",
    "submit_mode": "dry_run",
    "data": {
      "product": { "name": "示例线路" },
      "departure_dates": ["2026-08-15"],
      "passenger_counts": {
        "adult": 2,
        "child_bed": 1,
        "child_no_bed": 0,
        "infant": 0,
        "leader": 0,
        "expected_total": 3
      },
      "room_counts": { "DBL": 2 },
      "prices": { "adult": 500, "child_bed": 200 },
      "op_user": { "name": "示例 OP" },
      "sales_user": { "name": "示例销售" },
      "test_marker": "RAWTEST-ERP-20260815",
      "resolution": {
        "mode": "task_ready",
        "deferred_fields": ["customer", "route", "trip", "order_number"]
      }
    }
  }
}

Ready team-single operation

{
  "status": "agent_parse_passed",
  "blockers": [],
  "operation": {
    "action": "team_order_create",
    "order_nature": "test",
    "submit_mode": "dry_run",
    "data": {
      "customer": { "name": "示例渠道" },
      "product": { "name": "示例线路" },
      "route": { "name": "示例专线" },
      "trip": { "days": 4, "nights": 3, "label": "4D3N" },
      "order_number": { "prefix": "TEST", "suffix": "20260815" },
      "departure_dates": ["2026-08-15"],
      "passenger_counts": {
        "adult": 2,
        "child_bed": 1,
        "child_no_bed": 0,
        "infant": 0,
        "leader": 0,
        "expected_total": 3
      },
      "room_counts": { "SGL": 0, "TWN": 0, "TRP": 1, "DBL": 0, "HNM": 0, "TL": 0 },
      "prices": { "adult": 500, "child_bed": 200, "child_no_bed": 0, "infant": 0, "leader": 0 },
      "op_user": { "name": "示例 OP" },
      "sales_user": { "name": "示例销售" },
      "test_marker": "RAWTEST-ERP-20260815",
      "resolution": {
        "mode": "task_ready",
        "deferred_fields": []
      }
    }
  }
}

Block mixed operations

{
  "status": "agent_parse_blocked",
  "blockers": ["ambiguous_action:create_and_export_in_one_message"],
  "operation": null
}

Block guessed or incomplete data

{
  "status": "agent_parse_blocked",
  "blockers": [
    "missing_field:data.product",
    "missing_field:data.departure_dates",
    "ambiguous_reference:data.product"
  ],
  "operation": null
}

Update operation shape

{
  "status": "agent_parse_passed",
  "blockers": [],
  "operation": {
    "action": "order_update",
    "order_nature": "formal",
    "submit_mode": "dry_run",
    "data": {
      "existing_refs": { "identifier": "EXAMPLE-ORDER-001" },
      "updates": {
        "actions": [
          { "target": "rooms.TWN", "operation": "set", "value": 4 },
          { "target": "remark", "operation": "append", "value": "客户备注" }
        ]
      }
    }
  }
}