{
  "version": 1,
  "structures": [
    {
      "name": "order_triage_response",
      "description": "Classification of the order inquiry",
      "example": {
        "inquiry_type": "status_update",
        "order_lookup": "order #10432",
        "urgency": "medium",
        "needs_agent": false
      },
      "schema": {
        "type": "object",
        "properties": {
          "inquiry_type": {
            "type": "string",
            "enum": [
              "status_update",
              "delivery_delay",
              "change_request",
              "other"
            ]
          },
          "order_lookup": {
            "type": "string"
          },
          "urgency": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "needs_agent": {
            "type": "boolean"
          }
        },
        "required": [
          "inquiry_type",
          "order_lookup",
          "urgency",
          "needs_agent"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "order_reply_response",
      "description": "Drafted reply about the order",
      "example": {
        "status_explanation": "The order is packed and ready for pickup.",
        "customer_reply": "Your order #10432 is packed and should ship today.",
        "next_steps": "Track it at your account page"
      },
      "schema": {
        "type": "object",
        "properties": {
          "status_explanation": {
            "type": "string"
          },
          "customer_reply": {
            "type": "string"
          },
          "next_steps": {
            "type": "string"
          }
        },
        "required": [
          "status_explanation",
          "customer_reply",
          "next_steps"
        ],
        "additionalProperties": false
      }
    }
  ],
  "workflows": [
    {
      "name": "order_triage_workflow",
      "description": "Classifies the order inquiry and starts the reply pipeline",
      "provider": "openai",
      "model": "gpt-5.6-terra",
      "backups": [
        {
          "provider": "anthropic",
          "model": "claude-haiku-4-5-20251001"
        }
      ],
      "request_type": "chat",
      "system_instructions": "Classify the order inquiry: status update, delivery delay, change request, or other. Identify the order reference, set urgency, and flag anything that needs a human agent.",
      "structure": "order_triage_response",
      "customer_fields": [
        "order_id",
        "customer_message"
      ],
      "test_mode": false,
      "cache_window_seconds": 600,
      "backend_pipeline": {
        "enabled": true,
        "events": [
          {
            "name": "inquiry_received"
          },
          {
            "name": "draft_reply",
            "target_workflow": "order_reply_workflow"
          },
          {
            "name": "reply_ready"
          }
        ]
      }
    },
    {
      "name": "order_reply_workflow",
      "description": "Drafts a helpful reply about the order",
      "provider": "anthropic",
      "model": "claude-haiku-4-5-20251001",
      "backups": [
        {
          "provider": "openai",
          "model": "gpt-5.6-terra"
        }
      ],
      "request_type": "chat",
      "system_instructions": "Draft a clear, friendly reply about the order. Explain the status, avoid inventing tracking details, and point the customer to where they can track it themselves.",
      "structure": "order_reply_response",
      "customer_fields": [
        "order_id",
        "customer_message"
      ],
      "test_mode": false
    }
  ]
}
