{
  "version": 1,
  "structures": [
    {
      "name": "billing_triage_response",
      "description": "对账单咨询进行分类",
      "example": {
        "inquiry_type": "failed_payment",
        "urgency": "high",
        "customer_intent": "想更新支付方式",
        "needs_agent": false
      },
      "schema": {
        "type": "object",
        "properties": {
          "inquiry_type": {
            "type": "string",
            "enum": [
              "invoice_question",
              "failed_payment",
              "plan_change",
              "refund_question",
              "other"
            ]
          },
          "urgency": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "customer_intent": {
            "type": "string"
          },
          "needs_agent": {
            "type": "boolean"
          }
        },
        "required": [
          "inquiry_type",
          "urgency",
          "customer_intent",
          "needs_agent"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "billing_resolution_response",
      "description": "草拟的解决方案与客户回复",
      "example": {
        "resolution_summary": "客户支付失败，银行卡被拒绝。",
        "customer_reply": "你的付款没有成功，请更新银行卡信息，我们会自动重试。",
        "next_steps": [
          "在设置中更新支付方式",
          "如出现重复扣款请联系客服"
        ]
      },
      "schema": {
        "type": "object",
        "properties": {
          "resolution_summary": {
            "type": "string"
          },
          "customer_reply": {
            "type": "string"
          },
          "next_steps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "resolution_summary",
          "customer_reply",
          "next_steps"
        ],
        "additionalProperties": false
      }
    }
  ],
  "workflows": [
    {
      "name": "billing_triage_workflow",
      "description": "分类账单咨询并启动解决方案流水线",
      "provider": "openai",
      "model": "gpt-5.6-terra",
      "backups": [
        {
          "provider": "anthropic",
          "model": "claude-haiku-4-5-20251001"
        }
      ],
      "request_type": "chat",
      "system_instructions": "对账单咨询分类：判断咨询类型、设定紧急程度、总结客户诉求，并标记任何需要财务或客服人员介入的情况。",
      "structure": "billing_triage_response",
      "customer_fields": [
        "customer_id",
        "invoice_number",
        "customer_message"
      ],
      "test_mode": false,
      "cache_window_seconds": 600,
      "backend_pipeline": {
        "enabled": true,
        "events": [
          {
            "name": "inquiry_received"
          },
          {
            "name": "draft_resolution",
            "target_workflow": "billing_resolution_workflow"
          },
          {
            "name": "resolution_ready"
          }
        ]
      }
    },
    {
      "name": "billing_resolution_workflow",
      "description": "为客户草拟清晰的解决方案回复",
      "provider": "anthropic",
      "model": "claude-haiku-4-5-20251001",
      "backups": [
        {
          "provider": "openai",
          "model": "gpt-5.6-terra"
        }
      ],
      "request_type": "chat",
      "system_instructions": "为账单咨询撰写清晰、令人安心的回复。概括解决方案，给出客户可以执行的步骤；除非消息中明确提供，否则不要承诺金额或退款。",
      "structure": "billing_resolution_response",
      "customer_fields": [
        "customer_id",
        "invoice_number",
        "customer_message"
      ],
      "test_mode": false
    }
  ]
}
