{
  "tello_export": "1.2",
  "kind": "scenario_bundle",
  "exported_at": "2026-09-15T00:00:00.000Z",
  "scenario": {
    "name": "택배 배송 조회",
    "keywords": [
      "배송 조회",
      "배송 상태",
      "어디쯤 왔나요",
      "도착 예정일",
      "운송장 번호"
    ],
    "flow_config": {
      "$schema": "tello-scenario-v1",
      "meta": {
        "name": "택배 배송 조회",
        "trigger_description": "택배가 어디쯤 왔는지, 언제 도착하는지 알고 싶을 때"
      },
      "nodes": [
        {
          "id": "start",
          "type": "initial",
          "data": {
            "task_messages": [
              {
                "role": "system",
                "content": "시작 노드입니다. 안내 문장(\"배송 조회를 도와드리겠습니다\")은 이미 자동으로 재생됐으니 다시 말하지 마세요. 고객이 이 용건을 원하면 아무 말 없이 곧바로 start_tracking을 호출하세요. 다음 단계 안내는 자동으로 나옵니다. 다른 용건이면 짧게 답한 뒤 이 용건을 도와드릴지 물어보세요."
              }
            ],
            "functions": [
              {
                "name": "start_tracking",
                "description": "고객이 택배 배송 위치나 도착 예정일을 확인하려는 경우",
                "properties": {},
                "required": [],
                "next_node_id": "collect_tracking"
              }
            ],
            "respond_immediately": true,
            "pre_actions": [
              {
                "type": "tts_say",
                "text": "배송 조회를 도와드리겠습니다."
              }
            ]
          }
        },
        {
          "id": "collect_tracking",
          "type": "node",
          "data": {
            "task_messages": [
              {
                "role": "system",
                "content": "키패드 입력 안내 멘트는 자동으로 재생되니 같은 안내를 다시 말하지 마세요. 고객이 키패드로 누르면 자동으로 수집됩니다. 고객이 번호를 말로 불러주면 숫자만 모아 수집 함수를 호출하세요. 고객이 정보를 일부만 말하거나 나눠 말하면 이미 받은 부분은 그대로 두고 빠진 부분만 이어서 물어보세요. 고객이 값을 말하기 전에는 수집 함수를 부르지 마세요."
              }
            ],
            "functions": [
              {
                "name": "collect_tracking_no",
                "description": "고객이 운송장 번호를 입력하거나 말하면 수집",
                "properties": {
                  "tracking_no": {
                    "type": "string",
                    "description": "운송장(송장) 번호. 숫자만"
                  }
                },
                "required": [
                  "tracking_no"
                ],
                "next_node_id": "lookup"
              }
            ],
            "dtmf": {
              "function": "collect_tracking_no",
              "param": "tracking_no",
              "prompt": "운송장 번호를 누르신 후 우물 정 자를 눌러 주세요. 다시 입력하시려면 별표를 눌러 주세요.",
              "min_digits": 10,
              "max_digits": 14,
              "terminator": "#",
              "timeout_sec": 6,
              "max_retries": 2,
              "readback": "입력하신 운송장 번호 {value} 맞으신가요?"
            }
          }
        },
        {
          "id": "lookup",
          "type": "node",
          "data": {
            "task_messages": [
              {
                "role": "system",
                "content": "수집된 정보로 연결된 API를 호출하세요."
              }
            ],
            "functions": [
              {
                "name": "lookup_delivery",
                "description": "수집 완료된 파라미터로 연결 Tool 실행",
                "properties": {},
                "required": [],
                "call_tool": true,
                "tool_id": 1,
                "error_text": "죄송합니다, 배송 조회 중 문제가 발생했습니다. 운송장 번호를 다시 한번 확인해 주시겠어요?",
                "next_node_id": "end"
              }
            ],
            "pre_actions": [
              {
                "type": "tts_say",
                "text": "조회 중입니다. 잠시만 기다려주세요."
              }
            ]
          }
        },
        {
          "id": "end",
          "type": "end",
          "data": {
            "task_messages": [
              {
                "role": "system",
                "content": "방금 실행한 도구의 결과([도구 실행 결과])에 고객이 요청한 값이 있으면 그 값을 먼저 정확히 안내하세요. 결과에 없는 값은 지어내지 말고, 숫자·날짜·금액은 이름이 _ko 로 끝나는 값을 그대로 읽으세요. 고객이 묻지 않은 내부 식별자(고객번호·계량기번호·청구번호 등)는 읽지 마세요. 그 다음 \"배송 조회 안내를 마쳤습니다.\"라고 마무리하고 다른 문의가 있는지 물어보세요."
              }
            ]
          }
        }
      ]
    },
    "default_ref": "tool_1",
    "completion_message": "배송 조회 안내를 마쳤습니다.",
    "fallback_message": "배송 조회를 취소했습니다."
  },
  "tools": [
    {
      "ref": "tool_1",
      "function_name": "mock_search_deliveries",
      "name": "[배송] 운송장 번호로 배송 조회",
      "tool_type": "api_request",
      "endpoint_url": "https://api-mock.telloai.io/delivery/orders",
      "http_method": "GET",
      "auth_type": "none",
      "request_schema": {
        "type": "object",
        "required": [
          "tracking_no"
        ],
        "properties": {
          "tracking_no": {
            "type": "string",
            "description": "운송장(송장) 번호. 숫자만"
          }
        }
      },
      "description": "운송장(송장) 번호로 택배 배송 상태·현재 위치·도착 예정일을 조회한다. 고객이 배송 위치나 도착 예정일을 물을 때 사용한다.",
      "timeout_sec": 15,
      "config": {
        "url": "https://api-mock.telloai.io/delivery/orders",
        "body": {
          "type": "object",
          "required": [
            "tracking_no"
          ],
          "properties": {
            "tracking_no": {
              "type": "string",
              "description": "운송장(송장) 번호. 숫자만"
            }
          }
        },
        "method": "GET",
        "timeoutSec": 15,
        "variableExtraction": {
          "schema": {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "found": {
                    "type": "boolean"
                  },
                  "results": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "memo": {
                          "type": "string",
                          "description": "배송 메모"
                        },
                        "phone": {
                          "type": "string",
                          "description": "주문자 연락처"
                        },
                        "status": {
                          "enum": [
                            "배송준비중",
                            "배송중",
                            "배송지연",
                            "배송완료",
                            "주문취소",
                            "반품접수"
                          ],
                          "type": "string",
                          "description": "배송상태"
                        },
                        "address": {
                          "type": "string",
                          "description": "배송지 주소"
                        },
                        "courier": {
                          "type": "string",
                          "description": "택배사"
                        },
                        "summary": {
                          "type": "string",
                          "description": "에이전트가 그대로 읽어줄 한 줄 요약"
                        },
                        "order_no": {
                          "type": "string",
                          "description": "주문번호"
                        },
                        "quantity": {
                          "type": "integer",
                          "description": "수량"
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "order_date": {
                          "type": "string",
                          "description": "주문일 YYYY-MM-DD"
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "tracking_no": {
                          "type": "string",
                          "description": "송장번호"
                        },
                        "delay_reason": {
                          "type": "string",
                          "description": "지연/취소 사유"
                        },
                        "orderer_name": {
                          "type": "string",
                          "description": "주문자 이름"
                        },
                        "product_name": {
                          "type": "string",
                          "description": "상품명"
                        },
                        "shipped_date": {
                          "type": "string",
                          "description": "출고일"
                        },
                        "expected_date": {
                          "type": "string",
                          "description": "도착 예정일"
                        },
                        "delivered_date": {
                          "type": "string",
                          "description": "배송 완료일"
                        },
                        "current_location": {
                          "type": "string",
                          "description": "현재 위치"
                        }
                      }
                    }
                  }
                },
                "description": "API 업무 응답 데이터"
              },
              "message": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                ],
                "description": "한국어 한 줄 요약(또는 검증 오류 다건). 음성 에이전트가 그대로 읽어줄 수 있다."
              },
              "status_code": {
                "type": "integer",
                "description": "HTTP 상태 코드와 동일"
              }
            }
          },
          "aliases": [
            {
              "key": "찾음",
              "value": "{{ $.data.found }}"
            },
            {
              "key": "건수",
              "value": "{{ $.data.count }}"
            }
          ]
        }
      }
    }
  ],
  "tool_refs": {
    "1": "tool_1"
  }
}
